author | mcimadamore |
Tue, 06 Jan 2015 15:46:41 +0000 | |
changeset 28331 | 43ed6b2e0e3b |
permissions | -rw-r--r-- |
28331
43ed6b2e0e3b
8067883: Javac misses some opportunities for diagnostic simplification
mcimadamore
parents:
diff
changeset
|
1 |
/* |
43ed6b2e0e3b
8067883: Javac misses some opportunities for diagnostic simplification
mcimadamore
parents:
diff
changeset
|
2 |
* @test /nodynamiccopyright/ |
43ed6b2e0e3b
8067883: Javac misses some opportunities for diagnostic simplification
mcimadamore
parents:
diff
changeset
|
3 |
* @bug 8067883 |
43ed6b2e0e3b
8067883: Javac misses some opportunities for diagnostic simplification
mcimadamore
parents:
diff
changeset
|
4 |
* @summary Javac misses some opportunities for diagnostic simplification |
43ed6b2e0e3b
8067883: Javac misses some opportunities for diagnostic simplification
mcimadamore
parents:
diff
changeset
|
5 |
* |
43ed6b2e0e3b
8067883: Javac misses some opportunities for diagnostic simplification
mcimadamore
parents:
diff
changeset
|
6 |
* @compile/fail/ref=T8067883a.out -Xdiags:compact -XDrawDiagnostics T8067883.java |
43ed6b2e0e3b
8067883: Javac misses some opportunities for diagnostic simplification
mcimadamore
parents:
diff
changeset
|
7 |
* @compile/fail/ref=T8067883b.out -Xdiags:verbose -XDrawDiagnostics T8067883.java |
43ed6b2e0e3b
8067883: Javac misses some opportunities for diagnostic simplification
mcimadamore
parents:
diff
changeset
|
8 |
* |
43ed6b2e0e3b
8067883: Javac misses some opportunities for diagnostic simplification
mcimadamore
parents:
diff
changeset
|
9 |
*/ |
43ed6b2e0e3b
8067883: Javac misses some opportunities for diagnostic simplification
mcimadamore
parents:
diff
changeset
|
10 |
|
43ed6b2e0e3b
8067883: Javac misses some opportunities for diagnostic simplification
mcimadamore
parents:
diff
changeset
|
11 |
import java.util.List; |
43ed6b2e0e3b
8067883: Javac misses some opportunities for diagnostic simplification
mcimadamore
parents:
diff
changeset
|
12 |
|
43ed6b2e0e3b
8067883: Javac misses some opportunities for diagnostic simplification
mcimadamore
parents:
diff
changeset
|
13 |
class T8067883 { |
43ed6b2e0e3b
8067883: Javac misses some opportunities for diagnostic simplification
mcimadamore
parents:
diff
changeset
|
14 |
void testMethod(List<Integer> li) { |
43ed6b2e0e3b
8067883: Javac misses some opportunities for diagnostic simplification
mcimadamore
parents:
diff
changeset
|
15 |
m(null, li); |
43ed6b2e0e3b
8067883: Javac misses some opportunities for diagnostic simplification
mcimadamore
parents:
diff
changeset
|
16 |
m(1, li); |
43ed6b2e0e3b
8067883: Javac misses some opportunities for diagnostic simplification
mcimadamore
parents:
diff
changeset
|
17 |
} |
43ed6b2e0e3b
8067883: Javac misses some opportunities for diagnostic simplification
mcimadamore
parents:
diff
changeset
|
18 |
|
43ed6b2e0e3b
8067883: Javac misses some opportunities for diagnostic simplification
mcimadamore
parents:
diff
changeset
|
19 |
void testDiamond(List<Integer> li) { |
43ed6b2e0e3b
8067883: Javac misses some opportunities for diagnostic simplification
mcimadamore
parents:
diff
changeset
|
20 |
new Box<>(null, li); |
43ed6b2e0e3b
8067883: Javac misses some opportunities for diagnostic simplification
mcimadamore
parents:
diff
changeset
|
21 |
new Box<>(1, li); |
43ed6b2e0e3b
8067883: Javac misses some opportunities for diagnostic simplification
mcimadamore
parents:
diff
changeset
|
22 |
} |
43ed6b2e0e3b
8067883: Javac misses some opportunities for diagnostic simplification
mcimadamore
parents:
diff
changeset
|
23 |
|
43ed6b2e0e3b
8067883: Javac misses some opportunities for diagnostic simplification
mcimadamore
parents:
diff
changeset
|
24 |
<Z> void m(List<Z> z, List<String> ls) { } |
43ed6b2e0e3b
8067883: Javac misses some opportunities for diagnostic simplification
mcimadamore
parents:
diff
changeset
|
25 |
|
43ed6b2e0e3b
8067883: Javac misses some opportunities for diagnostic simplification
mcimadamore
parents:
diff
changeset
|
26 |
static class Box<X> { |
43ed6b2e0e3b
8067883: Javac misses some opportunities for diagnostic simplification
mcimadamore
parents:
diff
changeset
|
27 |
Box(List<X> z, List<String> ls) { } |
43ed6b2e0e3b
8067883: Javac misses some opportunities for diagnostic simplification
mcimadamore
parents:
diff
changeset
|
28 |
} |
43ed6b2e0e3b
8067883: Javac misses some opportunities for diagnostic simplification
mcimadamore
parents:
diff
changeset
|
29 |
} |