Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.0.7
-
None
-
None
Description
The transforms invoked by @Immutable generate constructor code that unconditionally makes a call to super() even when the superclass has no default constructor.
@TupleConstructor(defaults = false) abstract class AbstractClass { String a } @Immutable class ImmutableSubclass extends AbstractClass { String i }
Compiling this pair produces invokespecial AbstractClass.<init>(), which does not exist. This should at a minimum produce a compile-time error.
Attachments
Issue Links
- relates to
-
GROOVY-11154 Script subclasses cannot have constructors with arguments
- Open