diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-12-28 18:38:20 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-12-28 18:38:20 -0300 |
| commit | b5ab31a475ccf5f96c2ffb34fccc1d6592913794 (patch) | |
| tree | ef6d2b1844ca672dc81ab4411e37abbef2b7c48f /testes/locals.lua | |
| parent | 140cdcced5e28bde7a89e88fcae428f318565f1d (diff) | |
| parent | 314745ed8438d1276c6c928d5f9d4be018dfadb6 (diff) | |
| download | lua-b5ab31a475ccf5f96c2ffb34fccc1d6592913794.tar.gz lua-b5ab31a475ccf5f96c2ffb34fccc1d6592913794.tar.bz2 lua-b5ab31a475ccf5f96c2ffb34fccc1d6592913794.zip | |
Merge branch 'master' into nextversion
Diffstat (limited to 'testes/locals.lua')
| -rw-r--r-- | testes/locals.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/testes/locals.lua b/testes/locals.lua index d50beaa5..2c48546d 100644 --- a/testes/locals.lua +++ b/testes/locals.lua | |||
| @@ -37,7 +37,7 @@ end | |||
| 37 | f = nil | 37 | f = nil |
| 38 | 38 | ||
| 39 | local f | 39 | local f |
| 40 | x = 1 | 40 | local x = 1 |
| 41 | 41 | ||
| 42 | a = nil | 42 | a = nil |
| 43 | load('local a = {}')() | 43 | load('local a = {}')() |
| @@ -152,7 +152,7 @@ local dummy | |||
| 152 | local _ENV = (function (...) return ... end)(_G, dummy) -- { | 152 | local _ENV = (function (...) return ... end)(_G, dummy) -- { |
| 153 | 153 | ||
| 154 | do local _ENV = {assert=assert}; assert(true) end | 154 | do local _ENV = {assert=assert}; assert(true) end |
| 155 | mt = {_G = _G} | 155 | local mt = {_G = _G} |
| 156 | local foo,x | 156 | local foo,x |
| 157 | A = false -- "declare" A | 157 | A = false -- "declare" A |
| 158 | do local _ENV = mt | 158 | do local _ENV = mt |
| @@ -174,6 +174,8 @@ do local _ENV = {assert=assert, A=10}; | |||
| 174 | end | 174 | end |
| 175 | assert(x==20) | 175 | assert(x==20) |
| 176 | 176 | ||
| 177 | A = nil | ||
| 178 | |||
| 177 | 179 | ||
| 178 | do -- constants | 180 | do -- constants |
| 179 | local a<const>, b, c<const> = 10, 20, 30 | 181 | local a<const>, b, c<const> = 10, 20, 30 |
| @@ -711,7 +713,7 @@ if rawget(_G, "T") then | |||
| 711 | 713 | ||
| 712 | collectgarbage(); collectgarbage() | 714 | collectgarbage(); collectgarbage() |
| 713 | 715 | ||
| 714 | m = T.totalmem() | 716 | local m = T.totalmem() |
| 715 | collectgarbage("stop") | 717 | collectgarbage("stop") |
| 716 | 718 | ||
| 717 | -- error in the first buffer allocation | 719 | -- error in the first buffer allocation |
