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

Thu, 03 Feb 2011 09:37:28 +0000

author
mcimadamore
date
Thu, 03 Feb 2011 09:37:28 +0000
changeset 854
03cf47d4de15
child 890
3ab7bb46c5c1
permissions
-rw-r--r--

6969184: poor error recovery after symbol not found
Summary: generic type-well formedness check should ignore erroneous symbols
Reviewed-by: jjg

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

mercurial