diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-05-08 11:08:03 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-05-08 11:08:03 -0300 |
commit | 3f0ea90aa8b8493485637f6e8d2a070a1ac0d5cb (patch) | |
tree | c8f2808286713805ab138a7c4fc1ccf149d94cd7 /testes/errors.lua | |
parent | 4365a45d681b4e71e3c39148489bb8eae538ccf7 (diff) | |
download | lua-3f0ea90aa8b8493485637f6e8d2a070a1ac0d5cb.tar.gz lua-3f0ea90aa8b8493485637f6e8d2a070a1ac0d5cb.tar.bz2 lua-3f0ea90aa8b8493485637f6e8d2a070a1ac0d5cb.zip |
New syntax 'global function'
Diffstat (limited to 'testes/errors.lua')
-rw-r--r-- | testes/errors.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/testes/errors.lua b/testes/errors.lua index c80051fc..6c76a99a 100644 --- a/testes/errors.lua +++ b/testes/errors.lua | |||
@@ -489,6 +489,14 @@ if not b then | |||
489 | end | 489 | end |
490 | end]], 5) | 490 | end]], 5) |
491 | 491 | ||
492 | lineerror([[ | ||
493 | _ENV = 1 | ||
494 | global function foo () | ||
495 | local a = 10 | ||
496 | return a | ||
497 | end | ||
498 | ]], 2) | ||
499 | |||
492 | 500 | ||
493 | -- bug in 5.4.0 | 501 | -- bug in 5.4.0 |
494 | lineerror([[ | 502 | lineerror([[ |