Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
Consider the following:
@RecordType(defaults=false, namedVariant=false) record Person(String name, Date dob) { //Person(String,Date) //Person(String) no! //Person(Map) no! //Person() no! public Person { // implies @TupleConstructor(pre={...}) assert name.length() > 1 } Person(Person that) { this(that.name(), that.dob()) } //getAt(int i) //toList() //toMap() }
The goal is to disable all the extra constructors and @RecordType fails to do so. This is because there is an implicit @RecordType() annotation added by the parser that gets in the way of correct merged attributes.