You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CyclicInterfaceInheritance.java 466B

123456789101112131415
  1. /** @testcase PR#567 no error for cyclic interface inheritance if no classes implement the interfaces */
  2. public class CyclicInterfaceInheritance {
  3. public static void main( String args[] ) {
  4. throw new Error("not to be run - error case ");
  5. }
  6. }
  7. // no bug if any class implements the interfaces
  8. class C {
  9. void a() { }
  10. void b() { }
  11. }
  12. interface A extends B { void a(); } //ERR: A <- B <- A
  13. interface B extends A { void b(); } //ERR: B <- A <- B