LuaDardo
LuaDardo copied to clipboard
Return statement don't return if no return value provided
Running
var ls = LuaState.newState(); ls.openLibs(); ls.doString(""" function test() do print("Hello") return nil end print("World") end
test()
function test2() do print("Hello") return end print("World") end
test2() """);
Output:
Hello Hello World
'World' should not be printed. return nil
did correctly, but return
didn't.