equal
deleted
inserted
replaced
|
1 /* |
|
2 * @test /nodynamiccopyright/ |
|
3 * @bug 8067883 |
|
4 * @summary Javac misses some opportunities for diagnostic simplification |
|
5 * |
|
6 * @compile/fail/ref=T8067883a.out -Xdiags:compact -XDrawDiagnostics T8067883.java |
|
7 * @compile/fail/ref=T8067883b.out -Xdiags:verbose -XDrawDiagnostics T8067883.java |
|
8 * |
|
9 */ |
|
10 |
|
11 import java.util.List; |
|
12 |
|
13 class T8067883 { |
|
14 void testMethod(List<Integer> li) { |
|
15 m(null, li); |
|
16 m(1, li); |
|
17 } |
|
18 |
|
19 void testDiamond(List<Integer> li) { |
|
20 new Box<>(null, li); |
|
21 new Box<>(1, li); |
|
22 } |
|
23 |
|
24 <Z> void m(List<Z> z, List<String> ls) { } |
|
25 |
|
26 static class Box<X> { |
|
27 Box(List<X> z, List<String> ls) { } |
|
28 } |
|
29 } |