mirror of
https://github.com/lua/lua
synced 2026-09-26 16:17:11 +03:00
New syntax 'global function'
This commit is contained in:
parent
4365a45d68
commit
3f0ea90aa8
4 changed files with 82 additions and 13 deletions
|
|
@ -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([[
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue