Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.8-rc-1
-
Fix Version/s: 1.8-rc-4
-
Component/s: None
-
Labels:None
-
Environment:Mac OS X
-
Number of attachments :
Description
attached code
import groovy.transform.Field
@Field def xxx = 3
foo = {
println xxx
}
foo()
generate following error:
Caught: BUG! exception in phase 'class generation' in source unit '/Users/uehaj/tmp/bug.groovy' tried to get a variable with the name xxx as stack variable, but a variable with this name was not created
The following patch (with tests) fixes this issue