Reports errors with "?:?:" (instead of "?👎") when there is no debug
information.
This commit is contained in:
Roberto Ierusalimschy
2025-05-16 15:20:32 -03:00
parent ded2ad2d86
commit f2c1531e6c
2 changed files with 7 additions and 8 deletions

View File

@@ -303,14 +303,14 @@ do
local f = function (a) return a + 1 end
f = assert(load(string.dump(f, true)))
assert(f(3) == 4)
checkerr("^%?:%-1:", f, {})
checkerr("^%?:%?:", f, {})
-- code with a move to a local var ('OP_MOV A B' with A<B)
f = function () local a; a = {}; return a + 2 end
-- no debug info (so that 'a' is unknown)
f = assert(load(string.dump(f, true)))
-- symbolic execution should not get lost
checkerr("^%?:%-1:.*table value", f)
checkerr("^%?:%?:.*table value", f)
end