The following generates a "statement unreachable" error. Compiles ok under javac
class Test { public void hello() {
int a = 1;
label_1: while (true) { switch (a) { case 1: break; default: break label_1; } }
System.out.println("hello"); } }
Logged In: YES user_id=865893
The logic for checking labeled BREAK vs. labeled Statement was wrong... the "break label" statement always breaks the innermost breakable statement.
Fixed in 1.0.15.
Log in to post a comment.
Logged In: YES
user_id=865893
The logic for checking labeled BREAK vs. labeled Statement
was wrong... the "break label" statement always breaks the
innermost breakable statement.
Fixed in 1.0.15.