Details
-
Type:
Bug
-
Status: Resolved
-
Priority:
P4
-
Resolution: Fixed
-
Affects Version/s: repo-valhalla
-
Fix Version/s: repo-valhalla
-
Component/s: tools
-
Subcomponent:
-
CPU:generic
-
OS:generic
Description
Reported by Remi.
The following program triggers a verification error:
public class X {
static value class Entry<E> {
private final int value;
public Entry(int value) { this.value = value; }
public static <E> Entry<E>[] of() {
return (Entry<E>[]) (Object) new Entry<?>[0];
}
}
public static void main(String[] args) {
var entry = Entry.of();
}
}
The following program triggers a verification error:
public class X {
static value class Entry<E> {
private final int value;
public Entry(int value) { this.value = value; }
public static <E> Entry<E>[] of() {
return (Entry<E>[]) (Object) new Entry<?>[0];
}
}
public static void main(String[] args) {
var entry = Entry.of();
}
}