On 12/23/2019 11:08 AM, Tagir Valeev wrote:
Hello!

Two samples:

record Test(int[] args) {
   public Test(int... args) {
     this.args = args;
   }
}

I agree this would probably be more logical to reject (especially in consideration of the other issue you raised, about name mismatches.)  The signature for the canonical constructor, if provided explicitly, should match the record descriptor.  (However, this does not extend to annotations, for reasons already discussed in the EG.)


and

record Test(int... args) {
   public Test(int[] args) {
     this.args = args;
   }
}

Yes, same argument.


Reply via email to