array A_nextFree113 integer A_firstFree207 integer A_maxIndex170 array A_typeId192 integer A_firstFree207 = 0 integer A_maxIndex170 = 0 function initGlobals231() { } function main441() { initGlobals231(); init_test684(); } function config137() { } function init_test684() { local integer b474 local integer this546 local integer test_A_foo_result325 b_474 = new_B117(); this_546 = b_474; if (A_typeId_192[this_546] == 0) { if (this_546 == 0) { error133("Nullpointer exception when calling A.foo"); } else { error133("Called A.foo on invalid object."); }; } else { }; test_A_foo_result_325 = 42; if (test_A_foo_result_325 == 42) { testSuccess142(); } else { }; } IS_NATIVE function testSuccess142() { } function new_B117() returns integer { local integer this122 local integer this485 if (A_firstFree_207 == 0) { if (A_maxIndex_170 < 32768) { A_maxIndex_170 = (A_maxIndex_170 + 1); this_485 = A_maxIndex_170; A_typeId_192[this_485] = 2; } else { error133("Out of memory: Could not create B."); this_485 = 0; }; } else { A_firstFree_207 = (A_firstFree_207 - 1); this_485 = A_nextFree_113[A_firstFree_207]; A_typeId_192[this_485] = 2; }; this_122 = this_485; return this_122; } function error133(string msg118) { $debugPrint106((msg_118 + (" " + #getStackTrace()))); }