diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-07-30 12:18:19 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-07-30 12:18:19 -0300 |
commit | 0d529138042563baf260366e19a7aa2c60a07174 (patch) | |
tree | ea8699a57a9b26e620a2ed6bc2a11c9e49dee780 /testes/main.lua | |
parent | b80077b8f3e27a94c6afa895b41a9f8b52c42e61 (diff) | |
download | lua-0d529138042563baf260366e19a7aa2c60a07174.tar.gz lua-0d529138042563baf260366e19a7aa2c60a07174.tar.bz2 lua-0d529138042563baf260366e19a7aa2c60a07174.zip |
Change in the syntax of attributes
Attributes changed to posfixed ('x <const>', instead of '<const> x'),
and "toclose" renamed to "close". Posfixed attributes seem to make it
clearer that it applies to only one variable when there are multiple
variables.
Diffstat (limited to 'testes/main.lua')
-rw-r--r-- | testes/main.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/testes/main.lua b/testes/main.lua index 4c09645a..da2a9288 100644 --- a/testes/main.lua +++ b/testes/main.lua | |||
@@ -320,11 +320,11 @@ NoRun("", "lua %s", prog) -- no message | |||
320 | 320 | ||
321 | -- to-be-closed variables in main chunk | 321 | -- to-be-closed variables in main chunk |
322 | prepfile[[ | 322 | prepfile[[ |
323 | local <toclose> x = function (err) | 323 | local x <close> = function (err) |
324 | assert(err == 120) | 324 | assert(err == 120) |
325 | print("Ok") | 325 | print("Ok") |
326 | end | 326 | end |
327 | local <toclose> e1 = function () error(120) end | 327 | local e1 <close> = function () error(120) end |
328 | os.exit(true, true) | 328 | os.exit(true, true) |
329 | ]] | 329 | ]] |
330 | RUN('lua %s > %s', prog, out) | 330 | RUN('lua %s > %s', prog, out) |