array B_nextFree570 integer B_firstFree261 integer B_maxIndex153 array B_typeId194 integer wurst_stack_depth450 array wurst_stack973 integer B_firstFree261 = 0 integer B_maxIndex153 = 0 integer wurst_stack_depth450 = 0 function initGlobals151() { } function main806() { initGlobals151(); init_test720("when calling init_test in twoInterfaces, line 1"); } function config154() { } function init_test720(string __wurst_stackPos942) { local integer x1200 local integer x2162 local integer x3453 local integer x4824 wurst_stack_973[wurst_stack_depth_450] = __wurst_stackPos_942; wurst_stack_depth_450 = (wurst_stack_depth_450 + 1); x1_200 = new_C299("when calling new_C in twoInterfaces, line 19"); x2_162 = new_D146("when calling new_D in twoInterfaces, line 20"); x3_453 = new_C299("when calling new_C in twoInterfaces, line 21"); x4_824 = new_D146("when calling new_D in twoInterfaces, line 22"); if (dispatch_A_test_A_foo174(x1_200, "when calling foo in twoInterfaces, line 23") != 1) { testFail147("1"); } else { }; if (dispatch_A_test_A_foo174(x2_162, "when calling foo in twoInterfaces, line 25") != 2) { testFail147("2"); } else { }; if (dispatch_B_test_B_bar208(x3_453, "when calling bar in twoInterfaces, line 27") != 3) { testFail147("3"); } else { }; if (dispatch_B_test_B_bar208(x4_824, "when calling bar in twoInterfaces, line 29") != 4) { testFail147("4"); } else { }; testSuccess164(); wurst_stack_depth_450 = (wurst_stack_depth_450 - 1); } IS_NATIVE function testFail147(string s109) { } IS_NATIVE function testSuccess164() { } function new_C299(string __wurst_stackPos197) returns integer { local integer this857 wurst_stack_973[wurst_stack_depth_450] = __wurst_stackPos_197; wurst_stack_depth_450 = (wurst_stack_depth_450 + 1); wurst_stack_973[wurst_stack_depth_450] = "when calling alloc_C in twoInterfaces, line 8"; wurst_stack_depth_450 = (wurst_stack_depth_450 + 1); if (B_firstFree_261 == 0) { if (B_maxIndex_153 < 32768) { B_maxIndex_153 = (B_maxIndex_153 + 1); this_857 = B_maxIndex_153; B_typeId_194[this_857] = 2; } else { error144("Out of memory: Could not create C.", "when calling error in twoInterfaces, line 8"); this_857 = 0; }; } else { B_firstFree_261 = (B_firstFree_261 - 1); this_857 = B_nextFree_570[B_firstFree_261]; B_typeId_194[this_857] = 2; }; wurst_stack_depth_450 = ((wurst_stack_depth_450 - 1) - 1); return this_857; } function new_D146(string __wurst_stackPos575) returns integer { local integer this174 wurst_stack_973[wurst_stack_depth_450] = __wurst_stackPos_575; wurst_stack_depth_450 = (wurst_stack_depth_450 + 1); wurst_stack_973[wurst_stack_depth_450] = "when calling alloc_D in twoInterfaces, line 13"; wurst_stack_depth_450 = (wurst_stack_depth_450 + 1); if (B_firstFree_261 == 0) { if (B_maxIndex_153 < 32768) { B_maxIndex_153 = (B_maxIndex_153 + 1); this_174 = B_maxIndex_153; B_typeId_194[this_174] = 3; } else { error144("Out of memory: Could not create D.", "when calling error in twoInterfaces, line 13"); this_174 = 0; }; } else { B_firstFree_261 = (B_firstFree_261 - 1); this_174 = B_nextFree_570[B_firstFree_261]; B_typeId_194[this_174] = 3; }; wurst_stack_depth_450 = ((wurst_stack_depth_450 - 1) - 1); return this_174; } function error144(string msg218, string __wurst_stackPos142) { local integer stacktraceIndex188 local integer stacktraceLimit592 wurst_stack_973[wurst_stack_depth_450] = __wurst_stackPos_142; wurst_stack_depth_450 = (wurst_stack_depth_450 + 1); __wurst_stackPos_142 = ""; stacktraceIndex_188 = wurst_stack_depth_450; stacktraceLimit_592 = 0; loop { stacktraceIndex_188 = (stacktraceIndex_188 - 1); stacktraceLimit_592 = (stacktraceLimit_592 + 1); exitwhen ((stacktraceLimit_592 > 20) or (stacktraceIndex_188 < 0)); __wurst_stackPos_142 = (__wurst_stackPos_142 + (" " + wurst_stack_973[stacktraceIndex_188])); }; $debugPrint614((msg_218 + (" " + __wurst_stackPos_142))); wurst_stack_depth_450 = (wurst_stack_depth_450 - 1); } function dispatch_A_test_A_foo174(integer this953, string __wurst_stackPos890) returns integer { wurst_stack_973[wurst_stack_depth_450] = __wurst_stackPos_890; wurst_stack_depth_450 = (wurst_stack_depth_450 + 1); if (B_typeId_194[this_953] == 0) { if (this_953 == 0) { error144("Nullpointer exception when calling A.foo", "when calling error in twoInterfaces, line 5"); } else { error144("Called A.foo on invalid object.", "when calling error in twoInterfaces, line 5"); }; } else { }; if (B_typeId_194[this_953] <= 2) { this_953 = 1; } else { this_953 = 2; }; wurst_stack_depth_450 = (wurst_stack_depth_450 - 1); return this_953; } function dispatch_B_test_B_bar208(integer this885, string __wurst_stackPos413) returns integer { wurst_stack_973[wurst_stack_depth_450] = __wurst_stackPos_413; wurst_stack_depth_450 = (wurst_stack_depth_450 + 1); if (B_typeId_194[this_885] == 0) { if (this_885 == 0) { error144("Nullpointer exception when calling B.bar", "when calling error in twoInterfaces, line 7"); } else { error144("Called B.bar on invalid object.", "when calling error in twoInterfaces, line 7"); }; } else { }; if (B_typeId_194[this_885] <= 2) { this_885 = 3; } else { this_885 = 4; }; wurst_stack_depth_450 = (wurst_stack_depth_450 - 1); return this_885; }