-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P2
-
Affects Version/s: 7
-
Component/s: tools
-
b142
-
unknown
-
generic
-
Verified
This program does not compile even if it should:
public class DiamondTest {
static class Foo<T extends Number> {
<S extends T> Foo(S s) { }
}
public static void main(String... args) {
Object o0 = new <Integer> Foo<>(null); // javac unhappy!
}
}
public class DiamondTest {
static class Foo<T extends Number> {
<S extends T> Foo(S s) { }
}
public static void main(String... args) {
Object o0 = new <Integer> Foo<>(null); // javac unhappy!
}
}
- relates to
-
JDK-7030150 Type inference for generic instance creation failed for formal type parameter
-
- Closed
-