array A_nextFree415 integer A_firstFree443 integer A_maxIndex254 array A_typeId171 integer A_firstFree443 = 0 integer A_maxIndex254 = 0 function initGlobals158() { } function main189() { initGlobals158(); init_test502(); } function config777() { } function init_test502() { local integer b939 b_939 = new_B172(); if (A_typeId_171[b_939] == 0) { if (b_939 == 0) { error419("Nullpointer exception when calling A.foo"); } else { error419("Called A.foo on invalid object."); }; } else { }; testSuccess560(); } IS_NATIVE function testSuccess560() { } function new_B172() returns integer { local integer this690 if (A_firstFree_443 == 0) { if (A_maxIndex_254 < 32768) { A_maxIndex_254 = (A_maxIndex_254 + 1); this_690 = A_maxIndex_254; A_typeId_171[this_690] = 2; } else { error419("Out of memory: Could not create B."); this_690 = 0; }; } else { A_firstFree_443 = (A_firstFree_443 - 1); this_690 = A_nextFree_415[A_firstFree_443]; A_typeId_171[this_690] = 2; }; return this_690; } function error419(string msg996) { $debugPrint945((msg_996 + (" " + #getStackTrace()))); }