Maurizio Cimadamore 75b2a03bf9 8067883: Javac misses some opportunities for diagnostic simplification
Javac always report full inference diagnostic, even when message does not mention inference variables.

Reviewed-by: jlahoda
2015-01-06 15:46:41 +00:00

30 lines
656 B
Java

/*
* @test /nodynamiccopyright/
* @bug 8067883
* @summary Javac misses some opportunities for diagnostic simplification
*
* @compile/fail/ref=T8067883a.out -Xdiags:compact -XDrawDiagnostics T8067883.java
* @compile/fail/ref=T8067883b.out -Xdiags:verbose -XDrawDiagnostics T8067883.java
*
*/
import java.util.List;
class T8067883 {
void testMethod(List<Integer> li) {
m(null, li);
m(1, li);
}
void testDiamond(List<Integer> li) {
new Box<>(null, li);
new Box<>(1, li);
}
<Z> void m(List<Z> z, List<String> ls) { }
static class Box<X> {
Box(List<X> z, List<String> ls) { }
}
}