Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.5.x
-
None
Description
The following code compiles and runs successfully in 2.4.8 but fails in 2.5 snapshots:
class Foo { public Closure bar = { final RANKINGS = ["year": 0, "month": 10] } } new Foo().bar()
Error message is:
1 compilation error: The variable [RANKINGS] is declared final but is reassigned . At [3:9] at line: 3, column: 9
Attachments
Issue Links
- is related to
-
GROOVY-8419 Groovyc: The variable ... is declared final but is reassigned
- Closed
- links to