Community
Participate
Working Groups
Better error recovery (and consequently improvised and localized error messages) would be a good step for switch expression adoption. For eg, consider the following incorrect code: public class X { @SuppressWarnings("preview") public static int foo(int i) { int yield = 100; int r = switch(i) { case 0 : yield 100; case 1 : yield yield; default: yield 0; }; return a yield + 1; } public static void main(String[] args) { System.out.println(X.foo(0)); } } The error messages need to be localized to return and not percolate to SE.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.
Manoj, what error did you see earlier? On BETA_JAVA17, I see these two: Syntax error on token "yield", AssignmentOperator expected after this token line 7 Syntax error on token "yield", delete this token line 11 Not good enough?