Community
Participate
Working Groups
2.1 The following code does not compile ('[' or '.' expected). Is that a bug? public void a() { if (true) int xxxx= 0; } When changed to public void a() { if (true) { int xxxx= 0; } } no problems.
Variable declarations can only occur as block statements. You thus need to wrap it inside a block. We correctly detect this (as other compilers do).