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

Thu, 27 Aug 2009 11:08:27 -0700

author
jjg
date
Thu, 27 Aug 2009 11:08:27 -0700
changeset 384
ed31953ca025
parent 29
6522ea413d23
child 611
4172cfff05f0
permissions
-rw-r--r--

6875336: some tests should use /nodynamiccopyright/
Reviewed-by: darcy

mcimadamore@5 1 /**
jjg@384 2 * @test /nodynamiccopyright/
mcimadamore@5 3 * @bug 6611449
mcimadamore@5 4 * @summary Internal Error thrown during generic method/constructor invocation
mcimadamore@5 5 * @compile/fail/ref=T6611449.out -XDstdout -XDrawDiagnostics T6611449.java
mcimadamore@5 6 */
mcimadamore@5 7 public class T6611449<S> {
mcimadamore@5 8
mcimadamore@29 9 <T extends S> T6611449(T t1) {}
mcimadamore@5 10
mcimadamore@5 11 <T extends S> T6611449(T t1, T t2) {}
mcimadamore@5 12
mcimadamore@29 13 <T extends S> void m1(T t1) {}
mcimadamore@5 14
mcimadamore@29 15 <T extends S> void m2(T t1, T t2) {}
mcimadamore@5 16
mcimadamore@5 17 void test() {
mcimadamore@29 18 new T6611449<S>(1);
mcimadamore@29 19 new T6611449<S>(1, 1); //internal error: lub is erroneously applied to primitive types
mcimadamore@5 20 m1(1);
mcimadamore@29 21 m2(1, 1); //internal error: lub is erroneously applied to primitive types
mcimadamore@5 22 }
mcimadamore@5 23 }

mercurial