Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.6.4, 1.7-beta-1
-
None
-
None
Description
Groovy compiler does not complain when local variables are marked as static, as can be seen in the code below:
Script1.groovy
static int x = 3
Script2.groovy
def m() { static int x = 3 }
Script3.groovy
class Test { def m() { static int x = 3 } }
Issue reported on the mailing list in the following conversation: http://www.nabble.com/spread-code-to-multible-SourceFiles-td25500828.html
Attachments
Issue Links
- is related to
-
GROOVY-10078 Allow static variables in Scripts
- Closed