array A_nextFree593 integer A_firstFree513 integer A_maxIndex289 array A_typeId293 integer A_firstFree513 = 0 integer A_maxIndex289 = 0 function initGlobals213() { } function main110() { initGlobals213(); init_test175(); } function config162() { } function init_test175() { local integer b210 b_210 = new_B189(); if (A_typeId_293[b_210] == 0) { if (b_210 == 0) { error138("Nullpointer exception when calling A.foo"); } else { error138("Called A.foo on invalid object."); }; } else { }; testSuccess122(); } IS_NATIVE function testSuccess122() { } function new_B189() returns integer { local integer this161 if (A_firstFree_513 == 0) { if (A_maxIndex_289 < 32768) { A_maxIndex_289 = (A_maxIndex_289 + 1); this_161 = A_maxIndex_289; A_typeId_293[this_161] = 2; } else { error138("Out of memory: Could not create B."); this_161 = 0; }; } else { A_firstFree_513 = (A_firstFree_513 - 1); this_161 = A_nextFree_593[A_firstFree_513]; A_typeId_293[this_161] = 2; }; return this_161; } function error138(string msg543) { $debugPrint145((msg_543 + (" " + #getStackTrace()))); }