array C_nextFree202 integer C_firstFree131 integer C_maxIndex769 array C_typeId434 integer C_firstFree131 = 0 integer C_maxIndex769 = 0 function initGlobals125() { } function main199() { initGlobals125(); init_test155(); } function config200() { } function init_test155() { local integer this169 this_169 = new_D557(); if (C_typeId_434[this_169] == 0) { if (this_169 == 0) { error127("Nullpointer exception when calling D.foo"); } else { error127("Called D.foo on invalid object."); }; } else { }; testSuccess101(); } IS_NATIVE function testSuccess101() { } function new_D557() returns integer { local integer this133 if (C_firstFree_131 == 0) { if (C_maxIndex_769 < 32768) { C_maxIndex_769 = (C_maxIndex_769 + 1); this_133 = C_maxIndex_769; C_typeId_434[this_133] = 2; } else { error127("Out of memory: Could not create D."); this_133 = 0; }; } else { C_firstFree_131 = (C_firstFree_131 - 1); this_133 = C_nextFree_202[C_firstFree_131]; C_typeId_434[this_133] = 2; }; return this_133; } function error127(string msg199) { $debugPrint328((msg_199 + (" " + #getStackTrace()))); }