Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
1.7-beta-2
-
None
-
None
Description
neither final properties nor final fields are shielded from mutation if the mutator is a method in the same object.
class Person { final String name = "scott" def foo() { name = "Dierk" } } def p = new Person() p.foo() assert "Dierk" != p.name // credits: Scott Davis