Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Issue 397 in groovypptest: String array initialization error

19 views
Skip to first unread message

groovy...@googlecode.com

unread,
Aug 27, 2011, 3:12:45 PM8/27/11
to groovyp...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

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


groovy...@googlecode.com

unread,
Aug 27, 2011, 3:40:49 PM8/27/11
to groovyp...@googlegroups.com

Comment #1 on issue 397 by alex.tka...@gmail.com: String array
initialization error
http://code.google.com/p/groovypptest/issues/detail?id=397

I believe it does not work in pure groovy as well

Reply all
Reply to author
Forward
0 new messages