array A_nextFree619 integer A_firstFree210 integer A_maxIndex695 array A_typeId106 integer A_firstFree210 = 0 integer A_maxIndex695 = 0 function initGlobals112() { } function main181() { initGlobals112(); init_test553(); } function config190() { } function init_test553() { local integer b149 b_149 = new_B119(); if (A_typeId_106[b_149] == 0) { if (b_149 == 0) { error597("Nullpointer exception when calling A.foo"); } else { error597("Called A.foo on invalid object."); }; } else { }; testSuccess152(); } IS_NATIVE function testSuccess152() { } function new_B119() returns integer { local integer this254 if (A_firstFree_210 == 0) { if (A_maxIndex_695 < 32768) { A_maxIndex_695 = (A_maxIndex_695 + 1); this_254 = A_maxIndex_695; A_typeId_106[this_254] = 2; } else { error597("Out of memory: Could not create B."); this_254 = 0; }; } else { A_firstFree_210 = (A_firstFree_210 - 1); this_254 = A_nextFree_619[A_firstFree_210]; A_typeId_106[this_254] = 2; }; return this_254; } function error597(string msg162) { $debugPrint915((msg_162 + (" " + #getStackTrace()))); }