您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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