New syntax 'global function'

This commit is contained in:
Roberto Ierusalimschy
2025-05-08 11:08:03 -03:00
parent 4365a45d68
commit 3f0ea90aa8
4 changed files with 82 additions and 13 deletions

View File

@@ -489,6 +489,14 @@ if not b then
end
end]], 5)
lineerror([[
_ENV = 1
global function foo ()
local a = 10
return a
end
]], 2)
-- bug in 5.4.0
lineerror([[