0N/A/*
0N/A * @test /nodynamiccopyright/
0N/A * @bug 4018525 4059072 4277274 4785453
0N/A * @summary Test that recursive 'extends' and 'implements' clauses are detected
0N/A * and disallowed.
0N/A *
610N/A * @compile/fail/ref=CyclicInheritance.out -XDrawDiagnostics CyclicInheritance.java
0N/A */
0N/A
0N/A
0N/A
0N/A
0N/A
0N/A
0N/Aclass C1 extends C1 {} // ERROR - Cyclic inheritance
0N/A
0N/Aclass C11 extends C12 {} // ERROR - Cyclic inheritance
0N/Aclass C12 extends C11 {} // error in previous line could correctly be reported here as well
0N/A
0N/Ainterface I1 extends I1 {} // ERROR - Cyclic inheritance
0N/A
0N/Ainterface I11 extends I12 {} // ERROR - Cyclic inheritance
0N/Ainterface I12 extends I11 {} // error in previous line could correctly be reported here as well
0N/A
0N/A//-----
0N/A
0N/Aclass C211 implements C211.I { // ERROR - may change pending resoluation of 4087020
0N/A interface I {}; // error in previous line could correctly be reported here as well
0N/A}
0N/A
0N/Aclass C212 extends C212.C { // ERROR - Cyclic inheritance, subclass cannot enclose superclass
0N/A static class C {}; // error in previous line could correctly be reported here as well
0N/A}
0N/A
0N/A
0N/Aclass C221 implements C221.I { // ERROR - Cannot access C21 (private)
0N/A private interface I {}; // error in previous line could correctly be reported here as well
0N/A}
0N/A
0N/Aclass C222 extends C222.C { // ERROR - Cannot access C22 (private)
0N/A private static class C {}; // error in previous line could correctly be reported here as well
0N/A}
0N/A
0N/A//-----
0N/A
0N/Aclass C3 {
0N/A class A {
0N/A class B extends A {}
0N/A }
0N/A}
0N/A
0N/Aclass C4 {
0N/A class A extends B {}
0N/A class B {
0N/A class C extends A {}
0N/A }
0N/A}