array MyInterface_nextFree201 integer MyInterface_firstFree463 integer MyInterface_maxIndex124 array MyInterface_typeId167 integer MyInterface_firstFree463 = 0 integer MyInterface_maxIndex124 = 0 function initGlobals175() { } function main897() { initGlobals175(); init_Test841(); } function config965() { } function init_Test841() { local integer a742 local integer b173 a_742 = new_MyInterfaceAbstractImpl143(); b_173 = new_MyInterfaceImpl193(); println595(dispatch_MyInterface_Test_MyInterface_getStr138(a_742)); println595(dispatch_MyInterface_Test_MyInterface_getStr138(b_173)); if ((dispatch_MyInterface_Test_MyInterface_getStr138(a_742) == "AAbstract") and (dispatch_MyInterface_Test_MyInterface_getStr138(b_173) == "MyInterfaceImpl")) { testSuccess737(); } else { }; } IS_NATIVE function println595(string s199) { } IS_NATIVE function testSuccess737() { } function new_MyInterfaceAbstractImpl143() returns integer { local integer this107 if (MyInterface_firstFree_463 == 0) { if (MyInterface_maxIndex_124 < 32768) { MyInterface_maxIndex_124 = (MyInterface_maxIndex_124 + 1); this_107 = MyInterface_maxIndex_124; MyInterface_typeId_167[this_107] = 3; } else { error109("Out of memory: Could not create MyInterfaceAbstractImpl."); this_107 = 0; }; } else { MyInterface_firstFree_463 = (MyInterface_firstFree_463 - 1); this_107 = MyInterface_nextFree_201[MyInterface_firstFree_463]; MyInterface_typeId_167[this_107] = 3; }; return this_107; } function new_MyInterfaceImpl193() returns integer { local integer this628 if (MyInterface_firstFree_463 == 0) { if (MyInterface_maxIndex_124 < 32768) { MyInterface_maxIndex_124 = (MyInterface_maxIndex_124 + 1); this_628 = MyInterface_maxIndex_124; MyInterface_typeId_167[this_628] = 4; } else { error109("Out of memory: Could not create MyInterfaceImpl."); this_628 = 0; }; } else { MyInterface_firstFree_463 = (MyInterface_firstFree_463 - 1); this_628 = MyInterface_nextFree_201[MyInterface_firstFree_463]; MyInterface_typeId_167[this_628] = 4; }; return this_628; } function error109(string msg197) { $debugPrint251((msg_197 + (" " + #getStackTrace()))); } function dispatch_MyInterface_Test_MyInterface_getStr138(integer this165) returns string { local string Test_MyInterface_getStr_result133 if (MyInterface_typeId_167[this_165] == 0) { if (this_165 == 0) { error109("Nullpointer exception when calling MyInterface.getStr"); } else { error109("Called MyInterface.getStr on invalid object."); }; } else { }; if (MyInterface_typeId_167[this_165] <= 3) { if (MyInterface_typeId_167[this_165] == 0) { if (this_165 == 0) { error109("Nullpointer exception when calling MyInterfaceAbstract.getSome"); } else { error109("Called MyInterfaceAbstract.getSome on invalid object."); }; } else { }; Test_MyInterface_getStr_result_133 = "AAbstract"; } else { Test_MyInterface_getStr_result_133 = "MyInterfaceImpl"; }; return Test_MyInterface_getStr_result_133; }