array SimpleFunc_nextFree166 integer SimpleFunc_firstFree353 integer SimpleFunc_maxIndex176 array SimpleFunc_typeId546 array main182 integer wurst_stack_depth583 array wurst_stack159 integer SimpleFunc_firstFree353 = 0 integer SimpleFunc_maxIndex176 = 0 integer wurst_stack_depth583 = 0 function initGlobals189() { } function main129() { initGlobals189(); init_test196("when calling init_test in closureCaptureMain, line 1"); } function config138() { } function init_test196(string __wurst_stackPos136) { local integer this561 wurst_stack_159[wurst_stack_depth_583] = __wurst_stackPos_136; wurst_stack_depth_583 = (wurst_stack_depth_583 + 1); wurst_stack_159[wurst_stack_depth_583] = "when calling alloc_SimpleFunc_test in closureCaptureMain, line 7"; wurst_stack_depth_583 = (wurst_stack_depth_583 + 1); if (SimpleFunc_firstFree_353 == 0) { if (SimpleFunc_maxIndex_176 < 32768) { SimpleFunc_maxIndex_176 = (SimpleFunc_maxIndex_176 + 1); this_561 = SimpleFunc_maxIndex_176; SimpleFunc_typeId_546[this_561] = 2; } else { error101("Out of memory: Could not create SimpleFunc_test.", "when calling error in closureCaptureMain, line 7"); this_561 = 0; }; } else { SimpleFunc_firstFree_353 = (SimpleFunc_firstFree_353 - 1); this_561 = SimpleFunc_nextFree_166[SimpleFunc_firstFree_353]; SimpleFunc_typeId_546[this_561] = 2; }; wurst_stack_depth_583 = (wurst_stack_depth_583 - 1); main_182[this_561] = 4; wurst_stack_159[wurst_stack_depth_583] = "when calling apply in closureCaptureMain, line 8"; wurst_stack_depth_583 = (wurst_stack_depth_583 + 1); if (SimpleFunc_typeId_546[this_561] == 0) { if (this_561 == 0) { error101("Nullpointer exception when calling SimpleFunc.apply", "when calling error in closureCaptureMain, line 4"); } else { error101("Called SimpleFunc.apply on invalid object.", "when calling error in closureCaptureMain, line 4"); }; } else { }; this_561 = (3 + main_182[this_561]); wurst_stack_depth_583 = (wurst_stack_depth_583 - 1); if (this_561 == 7) { testSuccess636(); } else { }; wurst_stack_depth_583 = (wurst_stack_depth_583 - 1); } IS_NATIVE function testSuccess636() { } function error101(string msg143, string __wurst_stackPos200) { local integer stacktraceIndex276 local integer stacktraceLimit118 wurst_stack_159[wurst_stack_depth_583] = __wurst_stackPos_200; wurst_stack_depth_583 = (wurst_stack_depth_583 + 1); __wurst_stackPos_200 = ""; stacktraceIndex_276 = wurst_stack_depth_583; stacktraceLimit_118 = 0; loop { stacktraceIndex_276 = (stacktraceIndex_276 - 1); stacktraceLimit_118 = (stacktraceLimit_118 + 1); exitwhen ((stacktraceLimit_118 > 20) or (stacktraceIndex_276 < 0)); __wurst_stackPos_200 = (__wurst_stackPos_200 + (" " + wurst_stack_159[stacktraceIndex_276])); }; $debugPrint246((msg_143 + (" " + __wurst_stackPos_200))); wurst_stack_depth_583 = (wurst_stack_depth_583 - 1); }