The following code should also throw an error stating that "if and else have incompatible types". However, there is a runtime error coming from the printInt function: "No applicable method "printInt"".
Exception in thread "main" java.lang.RuntimeException: no applicable method 'printInt'! at wyvern.tools.interop.JObject.invokeMethod(JObject.java:50) at wyvern.tools.interop.JavaValue.invoke(JavaValue.java:58) at wyvern.target.corewyvernIL.expression.MethodCall$1.interpret(MethodCall.java:167) at wyvern.target.corewyvernIL.expression.MethodCall.trampoline(MethodCall.java:183) at wyvern.target.corewyvernIL.expression.MethodCall.interpret(MethodCall.java:178) at wyvern.target.corewyvernIL.expression.SeqExpr.interpretCtx(SeqExpr.java:193) at wyvern.target.corewyvernIL.expression.SeqExpr.interpret(SeqExpr.java:224) at wyvern.tools.Interpreter.main(Interpreter.java:90)
The following code should throw an error stating that "if and else have incompatible types". However, it executes successfully.
The following code should also throw an error stating that "if and else have incompatible types". However, there is a runtime error coming from the printInt function: "No applicable method "printInt"".
Exception in thread "main" java.lang.RuntimeException: no applicable method 'printInt'! at wyvern.tools.interop.JObject.invokeMethod(JObject.java:50) at wyvern.tools.interop.JavaValue.invoke(JavaValue.java:58) at wyvern.target.corewyvernIL.expression.MethodCall$1.interpret(MethodCall.java:167) at wyvern.target.corewyvernIL.expression.MethodCall.trampoline(MethodCall.java:183) at wyvern.target.corewyvernIL.expression.MethodCall.interpret(MethodCall.java:178) at wyvern.target.corewyvernIL.expression.SeqExpr.interpretCtx(SeqExpr.java:193) at wyvern.target.corewyvernIL.expression.SeqExpr.interpret(SeqExpr.java:224) at wyvern.tools.Interpreter.main(Interpreter.java:90)