equal
deleted
inserted
replaced
1 /* |
|
2 * @test /nodynamiccopyright/ |
|
3 * @bug 7030150 |
|
4 * @summary Type inference for generic instance creation failed for formal type parameter |
|
5 * check that explicit type-argument that does not conform to bound is rejected |
|
6 * @compile/fail/ref=Neg03.out -XDrawDiagnostics Neg03.java |
|
7 */ |
|
8 |
|
9 class Neg03 { |
|
10 |
|
11 static class Foo<X> { |
|
12 <T extends Integer> Foo(T t) {} |
|
13 } |
|
14 |
|
15 Foo<Integer> fi1 = new <String> Foo<>(1); |
|
16 Foo<Integer> fi2 = new <String> Foo<Integer>(1); |
|
17 } |
|