Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
1.8-beta-1
-
None
-
None
Description
The following code is not supposed to go through, as it defeats the whole purpose of @Immutable. It correctly fails with ReadOnlyPropertyException on 1.7.5, but on trunk it works.
@Immutable final class Person { boolean married } person = new Person(married:false) /* should not be allowed as it is mutating the object after it is formed */ person.married = true