Accept mismatch in varargness of record and canonical constructor

GitOrigin-RevId: d377578d8cd5ef67e5d2241f956792e887aa80b2
This commit is contained in:
Tagir Valeev
2019-12-24 10:39:42 +07:00
committed by intellij-monorepo-bot
parent 962a2b176f
commit e1f4bf5bcf
3 changed files with 23 additions and 0 deletions

View File

@@ -15,6 +15,17 @@ record TypeMismatch<T>(T t) {
this.t = null;
}
}
// Current spec draft allows this
record VarArgMismatch(int... x) {
public VarArgMismatch(int[] x) {
this.x = x;
}
}
record VarArgMismatch2(int[] x) {
public VarArgMismatch2(int... x) {
this.x = x;
}
}
record Delegate(int x) {
public Delegate(int x) {
<error descr="Canonical constructor cannot delegate to another constructor">this()</error>;