aboutsummaryrefslogtreecommitdiff
path: root/testes/goto.lua
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-05-09 12:10:31 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-05-09 12:10:31 -0300
commitd881325c2fcbb6d2c434ec403b0bbe51ac200c7b (patch)
tree811c1a1ffa8f91693b8df64e040c509c2cec6ded /testes/goto.lua
parent3f253f116e8e292977a1bded964544fb35b3d1e3 (diff)
downloadlua-d881325c2fcbb6d2c434ec403b0bbe51ac200c7b.tar.gz
lua-d881325c2fcbb6d2c434ec403b0bbe51ac200c7b.tar.bz2
lua-d881325c2fcbb6d2c434ec403b0bbe51ac200c7b.zip
Flag for to-be-closed variables changed to '<toclose>'
The flag for to-be-closed variables was changed from '*toclose' to '<toclose>'. Several people found confusing the old syntax and the new one has a clear terminator, making it more flexible for future changes.
Diffstat (limited to 'testes/goto.lua')
-rw-r--r--testes/goto.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/testes/goto.lua b/testes/goto.lua
index f3dcfd4a..c9e48073 100644
--- a/testes/goto.lua
+++ b/testes/goto.lua
@@ -258,7 +258,7 @@ do
258 ::L2:: goto L3 258 ::L2:: goto L3
259 259
260 ::L1:: do 260 ::L1:: do
261 local *toclose a = setmetatable({}, {__close = function () X = true end}) 261 local <toclose> a = setmetatable({}, {__close = function () X = true end})
262 assert(X == nil) 262 assert(X == nil)
263 if a then goto L2 end -- jumping back out of scope of 'a' 263 if a then goto L2 end -- jumping back out of scope of 'a'
264 end 264 end