test/tools/javac/generics/inference/6611449/T6611449.java

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

author
mcimadamore
date
Tue, 06 Mar 2012 13:28:05 +0000
changeset 1219
48ee63caaa93
parent 611
4172cfff05f0
child 2525
2eb010b6cb22
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 6611449
     4  * @summary Internal Error thrown during generic method/constructor invocation
     5  * @compile/fail/ref=T6611449.out -XDrawDiagnostics T6611449.java
     6  */
     7 public class T6611449<S> {
     9     <T extends S> T6611449(T t1) {}
    11     <T extends S> T6611449(T t1, T t2) {}
    13     <T extends S> void m1(T t1) {}
    15     <T extends S> void m2(T t1, T t2) {}
    17     void test() {
    18         new T6611449<S>(1);
    19         new T6611449<S>(1, 1); //internal error: lub is erroneously applied to primitive types
    20         m1(1);
    21         m2(1, 1); //internal error: lub is erroneously applied to primitive types
    22     }
    23 }

mercurial