aboutsummaryrefslogtreecommitdiff
path: root/testes
diff options
context:
space:
mode:
Diffstat (limited to 'testes')
-rw-r--r--testes/vararg.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/testes/vararg.lua b/testes/vararg.lua
index 5711f78b..840c3eee 100644
--- a/testes/vararg.lua
+++ b/testes/vararg.lua
@@ -184,6 +184,18 @@ do -- _ENV as vararg parameter
184 a = 10 184 a = 10
185 end ]] 185 end ]]
186 assert(string.find(msg, "const variable 'a'")) 186 assert(string.find(msg, "const variable 'a'"))
187
188 local function aux (... | _ENV)
189 global a; a = 10
190 return a
191 end
192 assert(aux() == 10)
193
194 local function aux (... | _ENV)
195 global a = 10
196 return a
197 end
198 assert(aux() == 10)
187end 199end
188 200
189 201