Name: stC104175 Date: 03/27/2000
java version "1.3.0rc1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc1-T)
Java HotSpot(TM) Client VM (build 1.3.0rc1-S, mixed mode)
The class provided compiles fine in jdk v1.1.6, jdk v.1.2.2 and jdk v1.3beta-0.
When compiling with jdk v1.3.0rc1 javac returns the following error:
CyclicInheritanceTest.java:12: cyclic inheritance involving
CyclicInheritanceTest
public interface InnerInterface{
^
1 error
public class CyclicInheritanceTest implements
CyclicInheritanceTest.InnerInterface{
public static void main(String[] args){
System.out.println(ONE);
System.out.println(TWO);
System.out.println(THREE);
}
public interface InnerInterface{
public final InnerInnerClass ONE=new InnerInnerClass("ONE");
public final InnerInnerClass TWO=new InnerInnerClass("TWO");
public final InnerInnerClass THREE=new InnerInnerClass("THREE");
public class InnerInnerClass{
public final String txt;
public InnerInnerClass(String txt){
this.txt=txt;
}
public String toString(){
return txt;
}
}
}
}
(Review ID: 102880)
======================================================================
- duplicates
-
JDK-4326631 Spurious Cyclic Inheritance Error
-
- Closed
-