changeset 9654 | 2fc5ecbea1ce |
parent 9653 | 6a1eff16874d |
parent 9644 | 04f88d98efe3 |
child 9655 | e19b80de8a7f |
9653:6a1eff16874d | 9654:2fc5ecbea1ce |
---|---|
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 } |