ceylon/ceylon-compiler — Issue #248: while (false) { statement(); } causes error
Author: gavinking
Created: 2011-11-30 01:28:51+00:00
State: open
Labels: BUG

The code:

while (false) { statement(); }

Results in:

/Users/gavin/ceylon.language/test/booleans.ceylon:26: unreachable statement
fail("while false");
^
1 error

Which is kinda surprising since javac accepts `if (false) { statement(); }`

Apparently we need to produce:

while (1==0) {}

at the Java level in this case.