test/tools/javac/generics/inference/6838943/T6838943.java

Tue, 20 Aug 2013 17:34:06 +0400

author
kizune
date
Tue, 20 Aug 2013 17:34:06 +0400
changeset 1959
55da6b3a6940
parent 0
959103a6100f
permissions
-rw-r--r--

7182350: Regression in wording of unchecked warning message
Reviewed-by: mcimadamore, jjg

aoqi@0 1 /**
aoqi@0 2 * @test /nodynamiccopyright/
aoqi@0 3 * @bug 6838943
aoqi@0 4 * @summary inference: javac is not handling type-variable substitution properly
aoqi@0 5 * @compile/fail/ref=T6838943.out -XDrawDiagnostics T6838943.java
aoqi@0 6 */
aoqi@0 7 class T6838943 {
aoqi@0 8 static class A<X> {}
aoqi@0 9 static class B {}
aoqi@0 10 static class C<X> {
aoqi@0 11 <Z> void m(X x, Z z) {
aoqi@0 12 C<A<Z>> c = new C<A<Z>>();
aoqi@0 13 c.m(new A<B>(), new B()); //should fail
aoqi@0 14 }
aoqi@0 15 }
aoqi@0 16 }

mercurial