array C_nextFree143 integer C_firstFree166 integer C_maxIndex148 array C_typeId201 integer C_firstFree166 = 0 integer C_maxIndex148 = 0 function initGlobals899() { } function main105() { initGlobals899(); init_test135(); } function config146() { } function init_test135() { local integer this776 this_776 = new_D189(); if (C_typeId_201[this_776] == 0) { if (this_776 == 0) { error114("Nullpointer exception when calling D.foo"); } else { error114("Called D.foo on invalid object."); }; } else { }; testSuccess162(); } IS_NATIVE function testSuccess162() { } function new_D189() returns integer { local integer this182 if (C_firstFree_166 == 0) { if (C_maxIndex_148 < 32768) { C_maxIndex_148 = (C_maxIndex_148 + 1); this_182 = C_maxIndex_148; C_typeId_201[this_182] = 2; } else { error114("Out of memory: Could not create D."); this_182 = 0; }; } else { C_firstFree_166 = (C_firstFree_166 - 1); this_182 = C_nextFree_143[C_firstFree_166]; C_typeId_201[this_182] = 2; }; return this_182; } function error114(string msg131) { $debugPrint132((msg_131 + (" " + #getStackTrace()))); }