Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.5
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
class Test {
static field = "Hello $who"
}
new Test()
Of course it is not valid code but the error is atrocious
Is the following error message good enough?
groovy> class Test { groovy> static field = "Hello $who" groovy> } groovy> new Test() Exception thrown: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, Script30: 2: the name who doesn't refer to a declared variable or class. The static scope requires that you declare variables before using them. If the variable should have been a class check the spelling. @ line 2, column 28. 1 error org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, Script30: 2: the name who doesn't refer to a declared variable or class. The static scope requires that you declare variables before using them. If the variable should have been a class check the spelling. @ line 2, column 28. 1 error