mirror of
https://github.com/lua/lua
synced 2026-09-26 16:17:11 +03:00
Collective declaration for globals ('global *')
This commit is contained in:
parent
7dc6aae290
commit
3b9dd52be0
14 changed files with 156 additions and 64 deletions
|
|
@ -1,6 +1,8 @@
|
|||
-- $Id: testes/code.lua $
|
||||
-- See Copyright Notice in file lua.h
|
||||
|
||||
global * <const>
|
||||
|
||||
if T==nil then
|
||||
(Message or print)('\n >>> testC not active: skipping opcode tests <<<\n')
|
||||
return
|
||||
|
|
@ -405,8 +407,8 @@ do -- tests for table access in upvalues
|
|||
end
|
||||
|
||||
-- de morgan
|
||||
checkequal(function () local a; if not (a or b) then b=a end end,
|
||||
function () local a; if (not a and not b) then b=a end end)
|
||||
checkequal(function () local a, b; if not (a or b) then b=a end end,
|
||||
function () local a, b; if (not a and not b) then b=a end end)
|
||||
|
||||
checkequal(function (l) local a; return 0 <= a and a <= l end,
|
||||
function (l) local a; return not (not(a >= 0) or not(a <= l)) end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue