New issue 397 by wkw...@gmail.com: String array initialization error
http://code.google.com/p/groovypptest/issues/detail?id=397
What steps will reproduce the problem?
1. typed in this simple Java source code in a new groovyConsole window:
String[] myStringArray1 = {"Java", "is", "Cool"};
String[] myStringArray2 = new String[] {"Java", "is", "Cool"};
2.run it
What is the expected output? What do you see instead?
should give no error at all
What version of the product are you using? On what operating system?
Ubuntu 11.10 AMD64 + Java 7 x64 + Groovy++ 0.4.300 w/groovy 1.8.0
Please provide any additional information below.
the output:
groovy> String[] myStringArray = new String[] {"Java", "is", "Cool"};
1 compilation error:
unexpected token: Java at line: 1, column: 41
groovy> String[] myStringArray1 = {"Java", "is", "Cool"};
groovy> String[] myStringArray2 = new String[] {"Java", "is", "Cool"};
1 compilation error:
unexpected token: Java at line: 1, column: 28
I believe it does not work in pure groovy as well