array A_nextFree121 integer A_firstFree215 integer A_maxIndex158 array A_typeId178 integer A_firstFree215 = 0 integer A_maxIndex158 = 0 function initGlobals477() { } function main185() { initGlobals477(); init_test211(); } function config164() { } function init_test211() { local integer b109 local integer this202 local integer test_A_foo_result901 b_109 = new_B373(); this_202 = b_109; if (A_typeId_178[this_202] == 0) { if (this_202 == 0) { error746("Nullpointer exception when calling A.foo"); } else { error746("Called A.foo on invalid object."); }; } else { }; test_A_foo_result_901 = 42; if (test_A_foo_result_901 == 42) { testSuccess212(); } else { }; } IS_NATIVE function testSuccess212() { } function new_B373() returns integer { local integer this175 local integer this203 if (A_firstFree_215 == 0) { if (A_maxIndex_158 < 32768) { A_maxIndex_158 = (A_maxIndex_158 + 1); this_203 = A_maxIndex_158; A_typeId_178[this_203] = 2; } else { error746("Out of memory: Could not create B."); this_203 = 0; }; } else { A_firstFree_215 = (A_firstFree_215 - 1); this_203 = A_nextFree_121[A_firstFree_215]; A_typeId_178[this_203] = 2; }; this_175 = this_203; return this_175; } function error746(string msg500) { $debugPrint557((msg_500 + (" " + #getStackTrace()))); }