array A_nextFree720 integer A_firstFree194 integer A_maxIndex533 array A_typeId540 integer A_firstFree194 = 0 integer A_maxIndex533 = 0 function initGlobals440() { } function main130() { initGlobals440(); init_test195(); } function config482() { } function init_test195() { local integer b185 b_185 = new_B102(); if (A_typeId_540[b_185] == 0) { if (b_185 == 0) { error178("Nullpointer exception when calling A.foo"); } else { error178("Called A.foo on invalid object."); }; } else { }; testSuccess130(); } IS_NATIVE function testSuccess130() { } function new_B102() returns integer { local integer this166 if (A_firstFree_194 == 0) { if (A_maxIndex_533 < 32768) { A_maxIndex_533 = (A_maxIndex_533 + 1); this_166 = A_maxIndex_533; A_typeId_540[this_166] = 2; } else { error178("Out of memory: Could not create B."); this_166 = 0; }; } else { A_firstFree_194 = (A_firstFree_194 - 1); this_166 = A_nextFree_720[A_firstFree_194]; A_typeId_540[this_166] = 2; }; return this_166; } function error178(string msg189) { $debugPrint155((msg_189 + (" " + #getStackTrace()))); }