Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Not A Bug
-
Affects Version/s: 2.0.0m2
-
Fix Version/s: 2.0.0RC1
-
Component/s: Compiler Integration
-
Labels:None
-
Testcase included:yes
-
Number of attachments :
Description
This code doesn't compile:
static GroovyCache rabattDescCache = new GroovyCache (Desc.class, 'id') { company, id ->
}
I get an error marker at "company" saying: Groovy:unexpected token company @line....
GroovyCache is a Java class with this constructor:
public GroovyCache (Class cacheName, String subName, Closure cacheEntryFactory)
When I switch back to the 1.6 compiler by deleting the entry in bundles.info, the project compiles.
I'm not sure whether the bug is in the Eclipse plugin or the 1.7 Groovy compiler. This bug also existed in m1.
Are you perhaps being hit by the change in supported syntax from 1.6/1.7 around closures/inner classes. If it also fails on the command line it is a groovy bug, if it does not then it is a groovy eclipse bug.