Mon, 08 Apr 2013 15:53:08 +0100
8010404: Lambda debugging: redundant LineNumberTable entry for lambda capture
Summary: Ignore indy entries in LineNumberTable
Reviewed-by: jjg
duke@1 | 1 | /* |
duke@1 | 2 | * @test /nodynamiccopyright/ |
duke@1 | 3 | * @bug 4018525 4059072 4277274 4785453 |
duke@1 | 4 | * @summary Test that recursive 'extends' and 'implements' clauses are detected |
duke@1 | 5 | * and disallowed. |
duke@1 | 6 | * |
jjg@611 | 7 | * @compile/fail/ref=CyclicInheritance.out -XDrawDiagnostics CyclicInheritance.java |
duke@1 | 8 | */ |
duke@1 | 9 | |
duke@1 | 10 | |
duke@1 | 11 | |
duke@1 | 12 | |
duke@1 | 13 | |
duke@1 | 14 | |
duke@1 | 15 | class C1 extends C1 {} // ERROR - Cyclic inheritance |
duke@1 | 16 | |
duke@1 | 17 | class C11 extends C12 {} // ERROR - Cyclic inheritance |
duke@1 | 18 | class C12 extends C11 {} // error in previous line could correctly be reported here as well |
duke@1 | 19 | |
duke@1 | 20 | interface I1 extends I1 {} // ERROR - Cyclic inheritance |
duke@1 | 21 | |
duke@1 | 22 | interface I11 extends I12 {} // ERROR - Cyclic inheritance |
duke@1 | 23 | interface I12 extends I11 {} // error in previous line could correctly be reported here as well |
duke@1 | 24 | |
duke@1 | 25 | //----- |
duke@1 | 26 | |
duke@1 | 27 | class C211 implements C211.I { // ERROR - may change pending resoluation of 4087020 |
duke@1 | 28 | interface I {}; // error in previous line could correctly be reported here as well |
duke@1 | 29 | } |
duke@1 | 30 | |
duke@1 | 31 | class C212 extends C212.C { // ERROR - Cyclic inheritance, subclass cannot enclose superclass |
duke@1 | 32 | static class C {}; // error in previous line could correctly be reported here as well |
duke@1 | 33 | } |
duke@1 | 34 | |
duke@1 | 35 | |
duke@1 | 36 | class C221 implements C221.I { // ERROR - Cannot access C21 (private) |
duke@1 | 37 | private interface I {}; // error in previous line could correctly be reported here as well |
duke@1 | 38 | } |
duke@1 | 39 | |
duke@1 | 40 | class C222 extends C222.C { // ERROR - Cannot access C22 (private) |
duke@1 | 41 | private static class C {}; // error in previous line could correctly be reported here as well |
duke@1 | 42 | } |
duke@1 | 43 | |
duke@1 | 44 | //----- |
duke@1 | 45 | |
duke@1 | 46 | class C3 { |
duke@1 | 47 | class A { |
duke@1 | 48 | class B extends A {} |
duke@1 | 49 | } |
duke@1 | 50 | } |
duke@1 | 51 | |
duke@1 | 52 | class C4 { |
duke@1 | 53 | class A extends B {} |
duke@1 | 54 | class B { |
duke@1 | 55 | class C extends A {} |
duke@1 | 56 | } |
duke@1 | 57 | } |