array A_nextFree915 integer A_firstFree788 integer A_maxIndex135 array A_typeId170 integer A_firstFree788 = 0 integer A_maxIndex135 = 0 function initGlobals999() { } function main104() { initGlobals999(); init_test931(); } function config137() { } function init_test931() { local integer b135 b_135 = new_B764(); if (A_typeId_170[b_135] == 0) { if (b_135 == 0) { error179("Nullpointer exception when calling A.foo"); } else { error179("Called A.foo on invalid object."); }; } else { }; testSuccess103(); } IS_NATIVE function testSuccess103() { } function new_B764() returns integer { local integer this367 if (A_firstFree_788 == 0) { if (A_maxIndex_135 < 32768) { A_maxIndex_135 = (A_maxIndex_135 + 1); this_367 = A_maxIndex_135; A_typeId_170[this_367] = 2; } else { error179("Out of memory: Could not create B."); this_367 = 0; }; } else { A_firstFree_788 = (A_firstFree_788 - 1); this_367 = A_nextFree_915[A_firstFree_788]; A_typeId_170[this_367] = 2; }; return this_367; } function error179(string msg135) { $debugPrint814((msg_135 + (" " + #getStackTrace()))); }