Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.0
-
None
-
Windows XP
Description
Three classes:
package org.aaa
class A {
}
class B {
public static A = org.aaa.A.class
public static main(args) {}
}
public class C {
public static getA()
public static main(args) {}
}
When running B.groovy via groovy or compiling via groovyc everythings fine. If I try the same with C.groovy, I'll get the following error:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, C.groovy: 3: the name org doesn't refer to a declared variable or class. The static scope requires to declare variables before using them. If the variable should have been a class check the spelling.
@ line 3, column 10.
return org.aaa.A.class
^