fix(lua/res1): make sure the test works with Lua 5.1

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-05-15 14:47:42 -07:00
parent da31e60b02
commit 924b2344af

View file

@ -40,7 +40,7 @@ end
function OR(...) function OR(...)
-- Nary Or -- Nary Or
local arg = table.pack(...) local arg = {...}
if #arg == 0 then if #arg == 0 then
return False return False
elseif #arg == 1 then elseif #arg == 1 then
@ -55,7 +55,7 @@ function OR(...)
end end
function print_types(env, ...) function print_types(env, ...)
local arg = table.pack(...) local arg = {...}
local tc = type_checker(env) local tc = type_checker(env)
for i = 1, #arg do for i = 1, #arg do
print(tostring(arg[i]) .. " : " .. tostring(tc:check(arg[i]))) print(tostring(arg[i]) .. " : " .. tostring(tc:check(arg[i])))