changeset 9610 | ac6200e8bf05 |
parent 9591 | fc4fca89dfad |
parent 9609 | c256c93c5f41 |
child 9613 | 4fc57aa6bbab |
9591:fc4fca89dfad | 9610:ac6200e8bf05 |
---|---|
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 causes resolution failure is rejected |
|
6 * @compile/fail/ref=Neg01.out -XDrawDiagnostics Neg01.java |
|
7 */ |
|
8 |
|
9 class Neg01 { |
|
10 |
|
11 static class Foo<X> { |
|
12 <T> Foo(T t) {} |
|
13 } |
|
14 |
|
15 Foo<Integer> fi1 = new <String> Foo<>(1); |
|
16 Foo<Integer> fi2 = new <String> Foo<Integer>(1); |
|
17 } |