array MyInterface_nextFree152 integer MyInterface_firstFree191 integer MyInterface_maxIndex476 array MyInterface_typeId230 integer MyInterface_firstFree191 = 0 integer MyInterface_maxIndex476 = 0 function initGlobals103() { } function main199() { initGlobals103(); init_Test601(); } function config172() { } function init_Test601() { local integer a489 local integer b634 a_489 = new_MyInterfaceAbstractImpl205(); b_634 = new_MyInterfaceImpl134(); println123(dispatch_MyInterface_Test_MyInterface_getStr113(a_489)); println123(dispatch_MyInterface_Test_MyInterface_getStr113(b_634)); if ((dispatch_MyInterface_Test_MyInterface_getStr113(a_489) == "AAbstract") and (dispatch_MyInterface_Test_MyInterface_getStr113(b_634) == "MyInterfaceImpl")) { testSuccess211(); } else { }; } IS_NATIVE function println123(string s173) { } IS_NATIVE function testSuccess211() { } function new_MyInterfaceAbstractImpl205() returns integer { local integer this967 if (MyInterface_firstFree_191 == 0) { if (MyInterface_maxIndex_476 < 32768) { MyInterface_maxIndex_476 = (MyInterface_maxIndex_476 + 1); this_967 = MyInterface_maxIndex_476; MyInterface_typeId_230[this_967] = 3; } else { error146("Out of memory: Could not create MyInterfaceAbstractImpl."); this_967 = 0; }; } else { MyInterface_firstFree_191 = (MyInterface_firstFree_191 - 1); this_967 = MyInterface_nextFree_152[MyInterface_firstFree_191]; MyInterface_typeId_230[this_967] = 3; }; return this_967; } function new_MyInterfaceImpl134() returns integer { local integer this110 if (MyInterface_firstFree_191 == 0) { if (MyInterface_maxIndex_476 < 32768) { MyInterface_maxIndex_476 = (MyInterface_maxIndex_476 + 1); this_110 = MyInterface_maxIndex_476; MyInterface_typeId_230[this_110] = 4; } else { error146("Out of memory: Could not create MyInterfaceImpl."); this_110 = 0; }; } else { MyInterface_firstFree_191 = (MyInterface_firstFree_191 - 1); this_110 = MyInterface_nextFree_152[MyInterface_firstFree_191]; MyInterface_typeId_230[this_110] = 4; }; return this_110; } function error146(string msg734) { $debugPrint213((msg_734 + (" " + #getStackTrace()))); } function dispatch_MyInterface_Test_MyInterface_getStr113(integer this161) returns string { local string Test_MyInterface_getStr_result186 if (MyInterface_typeId_230[this_161] == 0) { if (this_161 == 0) { error146("Nullpointer exception when calling MyInterface.getStr"); } else { error146("Called MyInterface.getStr on invalid object."); }; } else { }; if (MyInterface_typeId_230[this_161] <= 3) { if (MyInterface_typeId_230[this_161] == 0) { if (this_161 == 0) { error146("Nullpointer exception when calling MyInterfaceAbstract.getSome"); } else { error146("Called MyInterfaceAbstract.getSome on invalid object."); }; } else { }; Test_MyInterface_getStr_result_186 = "AAbstract"; } else { Test_MyInterface_getStr_result_186 = "MyInterfaceImpl"; }; return Test_MyInterface_getStr_result_186; }