Debug information about extra arguments from __call
'debug.getinfo' can return number of extra arguments added to a call by a chain of __call metavalues. That information is being used to improve error messages about errors in these extra arguments.
This commit is contained in:
@@ -624,6 +624,9 @@ local function f (x)
|
||||
end
|
||||
end
|
||||
|
||||
assert(debug.getinfo(print, 't').istailcall == false)
|
||||
assert(debug.getinfo(print, 't').extraargs == 0)
|
||||
|
||||
function g(x) return f(x) end
|
||||
|
||||
function g1(x) g(x) end
|
||||
|
||||
Reference in New Issue
Block a user