C functions can be tail called, too
A tail call to a C function can have the behavior of a "real" tail call, reusing the stack frame of the caller.
This commit is contained in:
@@ -205,7 +205,7 @@ do
|
||||
co = coroutine.create(function () return pcall(foo) end)
|
||||
local st1, st2, err = coroutine.resume(co)
|
||||
assert(st1 and not st2 and err == 43)
|
||||
assert(X == 43 and Y.name == "pcall")
|
||||
assert(X == 43 and Y.what == "C")
|
||||
|
||||
-- recovering from errors in __close metamethods
|
||||
local track = {}
|
||||
|
||||
Reference in New Issue
Block a user