Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
import groovy.transform.Immutable trait T { String foo } @Immutable(allProperties=true) class C implements T { String bar } assert new C('bar', 'foo').toString() == 'C(bar, foo)'
Gives:
BUG! exception in phase 'canonicalization' in source unit 'ConsoleScript0' unexpected NullPointerException ... Caused by: java.lang.NullPointerException at groovy.transform.options.ImmutablePropertyHandler.assignFieldWithDefault(ImmutablePropertyHandler.java:237) at groovy.transform.options.ImmutablePropertyHandler.createConstructorStatementDefault(ImmutablePropertyHandler.java:225)