Mon, 24 Jan 2011 15:44:51 +0000
6968793: issues with diagnostics
Summary: several diagnostic improvements
Reviewed-by: jjg
aoqi@0 | 1 | /** |
aoqi@0 | 2 | * @test /nodynamiccopyright/ |
aoqi@0 | 3 | * @bug 6943278 |
aoqi@0 | 4 | * @summary spurious error message for inference and type-variable with erroneous bound |
aoqi@0 | 5 | * @compile/fail/ref=T6943278.out -XDrawDiagnostics -Xlint:unchecked T6943278.java |
aoqi@0 | 6 | */ |
aoqi@0 | 7 | class T6943278<X extends Number & NonExistentInterface> { |
aoqi@0 | 8 | <X> T6943278<X> m() { return null;} |
aoqi@0 | 9 | <X extends Number & NonExistentInterface> T6943278<X> m(X x) { return null;} |
aoqi@0 | 10 | T6943278<?> f1 = m(); |
aoqi@0 | 11 | T6943278<?> f2 = m(""); |
aoqi@0 | 12 | } |