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

Tue, 06 Mar 2012 13:28:05 +0000

author
mcimadamore
date
Tue, 06 Mar 2012 13:28:05 +0000
changeset 1219
48ee63caaa93
parent 0
959103a6100f
permissions
-rw-r--r--

7144506: Attr.checkMethod should be called after inference variables have been fixed
Summary: Unify post-inference sanity check with Attr.checkMethod
Reviewed-by: jjg, dlsmith

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

mercurial