aboutsummaryrefslogtreecommitdiff
path: root/testes/errors.lua
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-05-08 11:08:03 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-05-08 11:08:03 -0300
commit3f0ea90aa8b8493485637f6e8d2a070a1ac0d5cb (patch)
treec8f2808286713805ab138a7c4fc1ccf149d94cd7 /testes/errors.lua
parent4365a45d681b4e71e3c39148489bb8eae538ccf7 (diff)
downloadlua-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.lua8
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
490end]], 5) 490end]], 5)
491 491
492lineerror([[
493_ENV = 1
494global function foo ()
495 local a = 10
496 return a
497end
498]], 2)
499
492 500
493-- bug in 5.4.0 501-- bug in 5.4.0
494lineerror([[ 502lineerror([[