Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.6.4
-
Fix Version/s: 1.6.5, 1.7-beta-2
-
Component/s: Compiler
-
Labels:None
-
Number of attachments :
Description
SomeGroovyClass.groovy:
class SomeGroovyClass {
SomeJavaClass java = new SomeJavaClass()
def " some spaces in a method name"() {}
}
SomeJavaClass.java:
public class SomeJavaClass { SomeGroovyClass groovy = new SomeGroovyClass(); }
Joint compilation produces:
SomeGroovyClass.java:16: ';' expected
public java.lang.Object some spaces in a method name() { return null;}
GMaven stub compilation has the same problem. IDEA stub compilation handles this fine.
On a related note, I'm wondering why stub compilation generates code for private members. Seems like lots of work for nothing to me (e.g. all the internal Groovy stuff). Or is it on purpose, maybe to get an error of the kind "this member is private" when trying to access such a member from Java?