test/tools/javac/generics/6969184/T6969184.java

Thu, 21 Feb 2013 15:26:46 +0000

author
mcimadamore
date
Thu, 21 Feb 2013 15:26:46 +0000
changeset 1599
9f0ec00514b6
parent 890
3ab7bb46c5c1
child 2525
2eb010b6cb22
permissions
-rw-r--r--

8007461: Regression: bad overload resolution when inner class and outer class have method with same name
Summary: Fix regression in varargs method resolution introduced by bad refactoring
Reviewed-by: jjg

mcimadamore@854 1 /*
mcimadamore@854 2 * @test /nodynamiccopyright/
mcimadamore@890 3 * @bug 6969184
mcimadamore@854 4 *
mcimadamore@854 5 * @summary poor error recovery after symbol not found
mcimadamore@854 6 * @author Maurizio Cimadamore
mcimadamore@854 7 * @compile/fail/ref=T6969184.out -XDrawDiagnostics T6969184.java
mcimadamore@854 8 *
mcimadamore@854 9 */
mcimadamore@854 10
mcimadamore@854 11 class T6969184 {
mcimadamore@854 12 static class C1<X> {
mcimadamore@854 13 void m1(C1<? extends NonExistentClass> n) {}
mcimadamore@854 14 void m2(C1<? super NonExistentClass> n) {}
mcimadamore@854 15 void m3(C1<?> n) {}
mcimadamore@854 16 }
mcimadamore@854 17
mcimadamore@854 18 static class C2<X extends NonExistentBound> {
mcimadamore@854 19 void m1(C2<? extends NonExistentClass> n) {}
mcimadamore@854 20 void m2(C2<? super NonExistentClass> n) {}
mcimadamore@854 21 void m3(C2<?> n) {}
mcimadamore@854 22 }
mcimadamore@854 23
mcimadamore@854 24 static class C3<X extends NonExistentBound1 & NonExistentBound2> {
mcimadamore@854 25 void m1(C3<? extends NonExistentClass> n) {}
mcimadamore@854 26 void m2(C3<? super NonExistentClass> n) {}
mcimadamore@854 27 void m3(C3<?> n) {}
mcimadamore@854 28 }
mcimadamore@854 29 }

mercurial