summaryrefslogtreecommitdiff
path: root/testes/attrib.lua
diff options
context:
space:
mode:
Diffstat (limited to 'testes/attrib.lua')
-rw-r--r--testes/attrib.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/testes/attrib.lua b/testes/attrib.lua
index b1076c76..83821c06 100644
--- a/testes/attrib.lua
+++ b/testes/attrib.lua
@@ -434,6 +434,16 @@ a.aVeryLongName012345678901234567890123456789012345678901234567890123456789 ==
10)
+do
+ -- _ENV constant
+ local function foo ()
+ local _ENV <const> = 11
+ X = "hi"
+ end
+ local st, msg = pcall(foo)
+ assert(not st and string.find(msg, "number"))
+end
+
-- test of large float/integer indices