-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.1.4
-
sparc
-
solaris_2.6
allan.jacobs@Eng 1997-10-30
Javac goes into a loopus infinitus trying to compile a small
code containing inner classes. The source code is a child of Modena
test ciner078.
algol% cat X.java
class X {
C1 oc1;
int func1() { return 10; }
class C1 {
C2 oc2;
int func1() { return 20; }
// This class should possess 3 instances.
class C2 {
C3 c3 = new C3 ();
class C3 extends C2 {
int func1() { return 10; }
} // end of class C3
int func1() { return 30; }
void check_mult_instances() {
System.out.println("X.this.func1()"+X.this.func1()+"10");
System.out.println("C1.this.func1()"+C1.this.func1()+"20");
System.out.println("C2.this.func1()"+C2.this.func1()+"30");
System.out.println("this.func1()"+this.func1()+"30");
System.out.println("c3.func1()"+c3.func1()+"10");
}
} //end class C2
} //end class C1
public static void main(String argv[]) {
X ox = new X();
ox.oc1 = ox.new C1();
ox.oc1.oc2 = ox.oc1.new C2();
ox.oc1.oc2.check_mult_instances();
}
}
- duplicates
-
JDK-4089169 Inner class testcase causes javac to go into inifinite loop
-
- Closed
-