array A_nextFree471 integer A_firstFree105 integer A_maxIndex830 array A_typeId237 integer A_firstFree105 = 0 integer A_maxIndex830 = 0 function initGlobals979() { } function main157() { initGlobals979(); init_test171(); } function config178() { } function init_test171() { local integer b698 local integer this106 local integer test_A_foo_result151 b_698 = new_B126(); this_106 = b_698; if (A_typeId_237[this_106] == 0) { if (this_106 == 0) { error114("Nullpointer exception when calling A.foo"); } else { error114("Called A.foo on invalid object."); }; } else { }; test_A_foo_result_151 = 42; if (test_A_foo_result_151 == 42) { testSuccess145(); } else { }; } IS_NATIVE function testSuccess145() { } function new_B126() returns integer { local integer this181 local integer this161 if (A_firstFree_105 == 0) { if (A_maxIndex_830 < 32768) { A_maxIndex_830 = (A_maxIndex_830 + 1); this_161 = A_maxIndex_830; A_typeId_237[this_161] = 2; } else { error114("Out of memory: Could not create B."); this_161 = 0; }; } else { A_firstFree_105 = (A_firstFree_105 - 1); this_161 = A_nextFree_471[A_firstFree_105]; A_typeId_237[this_161] = 2; }; this_181 = this_161; return this_181; } function error114(string msg150) { $debugPrint953((msg_150 + (" " + #getStackTrace()))); }