aboutsummaryrefslogtreecommitdiff
path: root/testes/gc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'testes/gc.lua')
-rw-r--r--testes/gc.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/testes/gc.lua b/testes/gc.lua
index 5d2b3085..62713dac 100644
--- a/testes/gc.lua
+++ b/testes/gc.lua
@@ -294,6 +294,16 @@ do -- invalid mode
294end 294end
295 295
296 296
297if T then -- bug since 5.3: all-weak tables are not being revisited
298 T.gcstate("propagate")
299 local t = setmetatable({}, {__mode = "kv"})
300 T.gcstate("enteratomic") -- 't' was visited
301 setmetatable(t, {__mode = "kv"})
302 T.gcstate("pause") -- its new metatable is not being visited
303 assert(getmetatable(t).__mode == "kv")
304end
305
306
297-- 'bug' in 5.1 307-- 'bug' in 5.1
298a = {} 308a = {}
299local t = {x = 10} 309local t = {x = 10}