// this script was compiled with wurst 1.8.1.0-jenkins-Wurst-1365 globals integer array SimpleFunc_nextFree integer SimpleFunc_firstFree=0 integer SimpleFunc_maxIndex=0 integer array SimpleFunc_typeId integer array y endglobals native testSuccess takes nothing returns nothing function initGlobals takes nothing returns nothing endfunction function error takes string msg returns nothing call BJDebugMsg(msg + "\n" + "") endfunction function init_test takes nothing returns nothing local integer y_1 = 4 local integer f local integer clVar local integer this local integer this_1 local integer x local integer test_SimpleFunc_apply_result local integer this_2 local integer x_1 if SimpleFunc_firstFree == 0 then if SimpleFunc_maxIndex < 32768 then set SimpleFunc_maxIndex = SimpleFunc_maxIndex + 1 set this = SimpleFunc_maxIndex set SimpleFunc_typeId[this] = 2 else call error("Out of memory: Could not create SimpleFunc_test.") set this = 0 endif else set SimpleFunc_firstFree = SimpleFunc_firstFree - 1 set this = SimpleFunc_nextFree[SimpleFunc_firstFree] set SimpleFunc_typeId[this] = 2 endif set clVar = this set y[clVar] = y_1 set f = clVar set this_1 = f set x = 3 if SimpleFunc_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling SimpleFunc.apply") else call error("Called SimpleFunc.apply on invalid object.") endif endif set this_2 = this_1 set x_1 = x set test_SimpleFunc_apply_result = x_1 + y[this_2] if test_SimpleFunc_apply_result == 7 then call testSuccess() endif endfunction function main takes nothing returns nothing call initGlobals() call init_test() endfunction function config takes nothing returns nothing endfunction