// this script was compiled with wurst 1.8.1.0-jenkins-Wurst-1365 globals integer array MyInterface_nextFree integer MyInterface_firstFree=0 integer MyInterface_maxIndex=0 integer array MyInterface_typeId integer wurst_stack_depth=0 string array wurst_stack endglobals native println takes string s returns nothing native testSuccess takes nothing returns nothing function initGlobals takes nothing returns nothing endfunction function error takes string msg, string w__wurst_stackPos returns nothing local integer stacktraceIndex local integer stacktraceLimit set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set w__wurst_stackPos = "" set stacktraceIndex = wurst_stack_depth set stacktraceLimit = 0 loop set stacktraceIndex = stacktraceIndex - 1 set stacktraceLimit = stacktraceLimit + 1 exitwhen stacktraceLimit > 20 or stacktraceIndex < 0 set w__wurst_stackPos = w__wurst_stackPos + "\n " + wurst_stack[stacktraceIndex] endloop call BJDebugMsg(msg + "\n" + w__wurst_stackPos) set wurst_stack_depth = wurst_stack_depth - 1 endfunction function dispatch_MyInterface_Test_MyInterface_getStr takes integer this, string w__wurst_stackPos returns string set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if MyInterface_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling MyInterface.getStr", "when calling error in testOverrideInterfaceAbstractClass, line 5") else call error("Called MyInterface.getStr on invalid object.", "when calling error in testOverrideInterfaceAbstractClass, line 5") endif endif if MyInterface_typeId[this] <= 3 then set wurst_stack[wurst_stack_depth] = "when calling getStr in testOverrideInterfaceAbstractClass, line 5" set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling getSome in testOverrideInterfaceAbstractClass, line 13" set wurst_stack_depth = wurst_stack_depth + 1 if MyInterface_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling MyInterfaceAbstract.getSome", "when calling error in testOverrideInterfaceAbstractClass, line 8") else call error("Called MyInterfaceAbstract.getSome on invalid object.", "when calling error in testOverrideInterfaceAbstractClass, line 8") endif endif set wurst_stack_depth = wurst_stack_depth - 1 - 1 set w__wurst_stackPos = "AAbstract" else set w__wurst_stackPos = "MyInterfaceImpl" endif set wurst_stack_depth = wurst_stack_depth - 1 return w__wurst_stackPos endfunction function new_MyInterfaceAbstractImpl takes string w__wurst_stackPos returns integer local integer this set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling alloc_MyInterfaceAbstractImpl in testOverrideInterfaceAbstractClass, line 11" set wurst_stack_depth = wurst_stack_depth + 1 if MyInterface_firstFree == 0 then if MyInterface_maxIndex < 32768 then set MyInterface_maxIndex = MyInterface_maxIndex + 1 set this = MyInterface_maxIndex set MyInterface_typeId[this] = 3 else call error("Out of memory: Could not create MyInterfaceAbstractImpl.", "when calling error in testOverrideInterfaceAbstractClass, line 11") set this = 0 endif else set MyInterface_firstFree = MyInterface_firstFree - 1 set this = MyInterface_nextFree[MyInterface_firstFree] set MyInterface_typeId[this] = 3 endif set wurst_stack_depth = wurst_stack_depth - 1 - 1 return this endfunction function new_MyInterfaceImpl takes string w__wurst_stackPos returns integer local integer this set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling alloc_MyInterfaceImpl in testOverrideInterfaceAbstractClass, line 15" set wurst_stack_depth = wurst_stack_depth + 1 if MyInterface_firstFree == 0 then if MyInterface_maxIndex < 32768 then set MyInterface_maxIndex = MyInterface_maxIndex + 1 set this = MyInterface_maxIndex set MyInterface_typeId[this] = 4 else call error("Out of memory: Could not create MyInterfaceImpl.", "when calling error in testOverrideInterfaceAbstractClass, line 15") set this = 0 endif else set MyInterface_firstFree = MyInterface_firstFree - 1 set this = MyInterface_nextFree[MyInterface_firstFree] set MyInterface_typeId[this] = 4 endif set wurst_stack_depth = wurst_stack_depth - 1 - 1 return this endfunction function init_Test takes string w__wurst_stackPos returns nothing local integer a local integer b set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set a = new_MyInterfaceAbstractImpl("when calling new_MyInterfaceAbstractImpl in testOverrideInterfaceAbstractClass, line 20") set b = new_MyInterfaceImpl("when calling new_MyInterfaceImpl in testOverrideInterfaceAbstractClass, line 21") call println(dispatch_MyInterface_Test_MyInterface_getStr(a, "when calling getStr in testOverrideInterfaceAbstractClass, line 23")) call println(dispatch_MyInterface_Test_MyInterface_getStr(b, "when calling getStr in testOverrideInterfaceAbstractClass, line 24")) if dispatch_MyInterface_Test_MyInterface_getStr(a, "when calling getStr in testOverrideInterfaceAbstractClass, line 25") == "AAbstract" and dispatch_MyInterface_Test_MyInterface_getStr(b, "when calling getStr in testOverrideInterfaceAbstractClass, line 25") == "MyInterfaceImpl" then call testSuccess() endif set wurst_stack_depth = wurst_stack_depth - 1 endfunction function main takes nothing returns nothing call initGlobals() call init_Test("when calling init_Test in testOverrideInterfaceAbstractClass, line 1") endfunction function config takes nothing returns nothing endfunction