-
Bug
-
Resolution: Not an Issue
-
P3
-
repo-valhalla
Found when fixing JDK-8224110:
public class VarArgsArray {
inline class MyInt {
int value;
public MyInt() { this(0); }
public MyInt(int v) { this.value = v; }
}
public VarArgsArray() throws Throwable {
MyInt[] a = new MyInt[0];
this.getClass().getDeclaredMethod("test", MyInt[].class).invoke(this, a); // <--- Warns, but in the case of known inline type, should be error
}
public void test(MyInt[] a) {
System.out.println(a);
}
public static void main(String[] args) throws Throwable {
new VarArgsArray();
}
}
public class VarArgsArray {
inline class MyInt {
int value;
public MyInt() { this(0); }
public MyInt(int v) { this.value = v; }
}
public VarArgsArray() throws Throwable {
MyInt[] a = new MyInt[0];
this.getClass().getDeclaredMethod("test", MyInt[].class).invoke(this, a); // <--- Warns, but in the case of known inline type, should be error
}
public void test(MyInt[] a) {
System.out.println(a);
}
public static void main(String[] args) throws Throwable {
new VarArgsArray();
}
}
- clones
-
JDK-8224110 [lworld] Reflective method invocation fails with assert: "illegal type"
-
- Resolved
-