New syntax for to-be-closed variables
The new syntax is <local *toclose x = f()>. The mark '*' allows other
attributes to be added later without the need of new keywords; it
also allows better error messages. The API function was also renamed
('lua_tobeclosed' -> 'lua_toclose').
This commit is contained in:
@@ -258,7 +258,7 @@ do
|
||||
::L2:: goto L3
|
||||
|
||||
::L1:: do
|
||||
local scoped a = function () X = true end
|
||||
local *toclose a = function () X = true end
|
||||
assert(X == nil)
|
||||
if a then goto L2 end -- jumping back out of scope of 'a'
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user