From 3b9dd52be02fd43c598f4adb6fa7844e6a573923 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 13 May 2025 11:43:10 -0300 Subject: Collective declaration for globals ('global *') --- testes/nextvar.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'testes/nextvar.lua') diff --git a/testes/nextvar.lua b/testes/nextvar.lua index 679cb1e4..e5a97178 100644 --- a/testes/nextvar.lua +++ b/testes/nextvar.lua @@ -1,6 +1,8 @@ -- $Id: testes/nextvar.lua $ -- See Copyright Notice in file lua.h +global * + print('testing tables, next, and for') local function checkerror (msg, f, ...) @@ -345,9 +347,6 @@ end local nofind = {} -a,b,c = 1,2,3 -a,b,c = nil - -- next uses always the same iteration function assert(next{} == next{}) @@ -396,7 +395,7 @@ for i=0,10000 do end end -n = {n=0} +local n = {n=0} for i,v in pairs(a) do n.n = n.n+1 assert(i and v and a[i] == v) -- cgit v1.2.3-55-g6feb