mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Upgrade Lua to 5.4.3 (#217)
Based on https://github.com/lua/lua/releases/tag/v5.4.3 (commit eadd8c7).
This commit is contained in:
parent
3ac6576fe5
commit
a73e808b25
41 changed files with 464 additions and 264 deletions
15
third_party/lua/test/errors.lua
vendored
15
third_party/lua/test/errors.lua
vendored
|
@ -191,6 +191,13 @@ checkmessage("a = 24 // 0", "divide by zero")
|
|||
checkmessage("a = 1 % 0", "'n%0'")
|
||||
|
||||
|
||||
-- type error for an object which is neither in an upvalue nor a register.
|
||||
-- The following code will try to index the value 10 that is stored in
|
||||
-- the metatable, without moving it to a register.
|
||||
checkmessage("local a = setmetatable({}, {__index = 10}).x",
|
||||
"attempt to index a number value")
|
||||
|
||||
|
||||
-- numeric for loops
|
||||
checkmessage("for i = {}, 10 do end", "table")
|
||||
checkmessage("for i = io.stdin, 10 do end", "FILE")
|
||||
|
@ -413,6 +420,14 @@ if not b then
|
|||
end
|
||||
end]], 5)
|
||||
|
||||
do
|
||||
-- Force a negative estimate for base line. Error in instruction 2
|
||||
-- (after VARARGPREP, GETGLOBAL), with first absolute line information
|
||||
-- (forced by too many lines) in instruction 0.
|
||||
local s = string.format("%s return __A.x", string.rep("\n", 300))
|
||||
lineerror(s, 301)
|
||||
end
|
||||
|
||||
|
||||
if not _soft then
|
||||
-- several tests that exaust the Lua stack
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue