Community
Participate
Working Groups
When an initialized array is used directly Eclipse is incompatible with JDK 1.3/1.4. Both lines compile without warning with Sun's compiler. The workaround is simple, just add parentheses. class as { { int x=new int[] { 1,3,4 }[0]; // Syntax error on token "[", ";" expected int y=(new int[] { 1,3,4 })[0]; // } } My platform is Eclipse GTK, build 200206271827, Linux Mandrake 8.2 i586.
This was fixed with the latest changes in the parser. I checked that this code compiles fine using the integration build 1210.
Verified.