array B_nextFree603 integer B_firstFree169 integer B_maxIndex874 array B_typeId101 integer wurst_stack_depth602 array wurst_stack660 integer B_firstFree169 = 0 integer B_maxIndex874 = 0 integer wurst_stack_depth602 = 0 function initGlobals131() { } function main186() { initGlobals131(); init_test451("when calling init_test in twoInterfaces, line 1"); } function config852() { } function init_test451(string __wurst_stackPos183) { local integer x1837 local integer x2210 local integer x3906 local integer x4141 wurst_stack_660[wurst_stack_depth_602] = __wurst_stackPos_183; wurst_stack_depth_602 = (wurst_stack_depth_602 + 1); x1_837 = new_C407("when calling new_C in twoInterfaces, line 19"); x2_210 = new_D103("when calling new_D in twoInterfaces, line 20"); x3_906 = new_C407("when calling new_C in twoInterfaces, line 21"); x4_141 = new_D103("when calling new_D in twoInterfaces, line 22"); if (dispatch_A_test_A_foo140(x1_837, "when calling foo in twoInterfaces, line 23") != 1) { testFail178("1"); } else { }; if (dispatch_A_test_A_foo140(x2_210, "when calling foo in twoInterfaces, line 25") != 2) { testFail178("2"); } else { }; if (dispatch_B_test_B_bar169(x3_906, "when calling bar in twoInterfaces, line 27") != 3) { testFail178("3"); } else { }; if (dispatch_B_test_B_bar169(x4_141, "when calling bar in twoInterfaces, line 29") != 4) { testFail178("4"); } else { }; testSuccess922(); wurst_stack_depth_602 = (wurst_stack_depth_602 - 1); } IS_NATIVE function testFail178(string s767) { } IS_NATIVE function testSuccess922() { } function new_C407(string __wurst_stackPos559) returns integer { local integer this111 wurst_stack_660[wurst_stack_depth_602] = __wurst_stackPos_559; wurst_stack_depth_602 = (wurst_stack_depth_602 + 1); wurst_stack_660[wurst_stack_depth_602] = "when calling alloc_C in twoInterfaces, line 8"; wurst_stack_depth_602 = (wurst_stack_depth_602 + 1); if (B_firstFree_169 == 0) { if (B_maxIndex_874 < 32768) { B_maxIndex_874 = (B_maxIndex_874 + 1); this_111 = B_maxIndex_874; B_typeId_101[this_111] = 2; } else { error465("Out of memory: Could not create C.", "when calling error in twoInterfaces, line 8"); this_111 = 0; }; } else { B_firstFree_169 = (B_firstFree_169 - 1); this_111 = B_nextFree_603[B_firstFree_169]; B_typeId_101[this_111] = 2; }; wurst_stack_depth_602 = ((wurst_stack_depth_602 - 1) - 1); return this_111; } function new_D103(string __wurst_stackPos187) returns integer { local integer this146 wurst_stack_660[wurst_stack_depth_602] = __wurst_stackPos_187; wurst_stack_depth_602 = (wurst_stack_depth_602 + 1); wurst_stack_660[wurst_stack_depth_602] = "when calling alloc_D in twoInterfaces, line 13"; wurst_stack_depth_602 = (wurst_stack_depth_602 + 1); if (B_firstFree_169 == 0) { if (B_maxIndex_874 < 32768) { B_maxIndex_874 = (B_maxIndex_874 + 1); this_146 = B_maxIndex_874; B_typeId_101[this_146] = 3; } else { error465("Out of memory: Could not create D.", "when calling error in twoInterfaces, line 13"); this_146 = 0; }; } else { B_firstFree_169 = (B_firstFree_169 - 1); this_146 = B_nextFree_603[B_firstFree_169]; B_typeId_101[this_146] = 3; }; wurst_stack_depth_602 = ((wurst_stack_depth_602 - 1) - 1); return this_146; } function error465(string msg879, string __wurst_stackPos165) { local integer stacktraceIndex128 local integer stacktraceLimit611 wurst_stack_660[wurst_stack_depth_602] = __wurst_stackPos_165; wurst_stack_depth_602 = (wurst_stack_depth_602 + 1); __wurst_stackPos_165 = ""; stacktraceIndex_128 = wurst_stack_depth_602; stacktraceLimit_611 = 0; loop { stacktraceIndex_128 = (stacktraceIndex_128 - 1); stacktraceLimit_611 = (stacktraceLimit_611 + 1); exitwhen ((stacktraceLimit_611 > 20) or (stacktraceIndex_128 < 0)); __wurst_stackPos_165 = (__wurst_stackPos_165 + (" " + wurst_stack_660[stacktraceIndex_128])); }; $debugPrint557((msg_879 + (" " + __wurst_stackPos_165))); wurst_stack_depth_602 = (wurst_stack_depth_602 - 1); } function dispatch_A_test_A_foo140(integer this195, string __wurst_stackPos180) returns integer { wurst_stack_660[wurst_stack_depth_602] = __wurst_stackPos_180; wurst_stack_depth_602 = (wurst_stack_depth_602 + 1); if (B_typeId_101[this_195] == 0) { if (this_195 == 0) { error465("Nullpointer exception when calling A.foo", "when calling error in twoInterfaces, line 5"); } else { error465("Called A.foo on invalid object.", "when calling error in twoInterfaces, line 5"); }; } else { }; if (B_typeId_101[this_195] <= 2) { this_195 = 1; } else { this_195 = 2; }; wurst_stack_depth_602 = (wurst_stack_depth_602 - 1); return this_195; } function dispatch_B_test_B_bar169(integer this105, string __wurst_stackPos528) returns integer { wurst_stack_660[wurst_stack_depth_602] = __wurst_stackPos_528; wurst_stack_depth_602 = (wurst_stack_depth_602 + 1); if (B_typeId_101[this_105] == 0) { if (this_105 == 0) { error465("Nullpointer exception when calling B.bar", "when calling error in twoInterfaces, line 7"); } else { error465("Called B.bar on invalid object.", "when calling error in twoInterfaces, line 7"); }; } else { }; if (B_typeId_101[this_105] <= 2) { this_105 = 3; } else { this_105 = 4; }; wurst_stack_depth_602 = (wurst_stack_depth_602 - 1); return this_105; }