changeset 9639 | 96f631bd1902 |
parent 9638 | a9e79f5cd83b |
parent 9615 | 92bf0655022d |
child 9640 | f85ccaa4b680 |
9638:a9e79f5cd83b | 9639:96f631bd1902 |
---|---|
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 } |