mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 21:55:01 +07:00
Records: consider varargness mismatch as compilation error
There's an agreement to do this in expert group -- see http://mail.openjdk.java.net/pipermail/amber-spec-experts/2019-December/001889.html GitOrigin-RevId: 8fc465ece0b9c4bb1517793a60cabab34933b688
This commit is contained in:
committed by
intellij-monorepo-bot
parent
acffc2bef9
commit
5766652109
+2
-2
@@ -23,12 +23,12 @@ record NameMismatch(int x, int y) {
|
||||
}
|
||||
// Current spec draft allows this
|
||||
record VarArgMismatch(int... x) {
|
||||
public VarArgMismatch(int[] x) {
|
||||
public VarArgMismatch(<error descr="Incorrect parameter type for record component 'x'. Expected: 'int...', found: 'int[]'">int[]</error> x) {
|
||||
this.x = x;
|
||||
}
|
||||
}
|
||||
record VarArgMismatch2(int[] x) {
|
||||
public VarArgMismatch2(int... x) {
|
||||
public VarArgMismatch2(<error descr="Incorrect parameter type for record component 'x'. Expected: 'int[]', found: 'int...'">int...</error> x) {
|
||||
this.x = x;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user