From: SourceForge.net <no...@so...> - 2005-08-23 02:02:00
|
Bugs item #1266708, was opened at 2005-08-23 02:01 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=438935&aid=1266708&group_id=44253 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Michael Dyrby Jensen (dyrby76) Assigned to: Nobody/Anonymous (nobody) Summary: Super calls can cause infinate loop Initial Comment: An old leftover bug in DynamicJava. class A { void foo() { System.out.println("inside A.foo()"); } } class B extends A { void foo() { System.out.println("inside B.foo()"); super.foo(); } } class C extends B { void foo() { System.out.println("inside C.foo()"); super.foo(); } public static void main(String[] args) { C myClass = new C(); myClass.foo(); } } Write the code in the Definitionspane, compile and start it from the interactionspane: Java C gives: > java C inside C.foo() inside B.foo() inside A.foo() Write the same code inside the interactionspane and start it from there, this gives an infinately loop of calls. inside B.foo() inside B.foo() inside B.foo() inside B.foo() inside B.foo() etc ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=438935&aid=1266708&group_id=44253 |