Community
Participate
Working Groups
Created attachment 277797 [details] Screenshot See attached screenshot. "break;" is a statement and not expression. Javac gives a nice explanatory error: unexpected statement in case, expected is an expression, a block or a throw statement
(In reply to Noopur Gupta from comment #0) > See attached screenshot. "break;" is a statement and not expression. A reduced test case: public class X { public static void foo(int i) { switch (i) { default -> break; } } } Gives the error for break (without semicolon): Syntax error on token "break", invalid Expression Essentially, some expressions are allowed (eg MessageSend). Could be improved, may be later - moving out of the blocker for 12. [Dev Note: This error is thrown in the automated parsing stage]
(In reply to Manoj Palat from comment #1) > [Dev Note: This error is thrown in the automated parsing stage] Might require an explicit rule in the grammar modeling the wrong structure, so that its consume method can raise a dedicated error.
Bulk move out of 4.13
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.