lean2/tests/lua/old/env1.lua
Leonardo de Moura a6116e3156 test(lua): reactivate some of the Lua unit tests
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-04-29 10:36:57 -07:00

11 lines
283 B
Lua

import("util.lua")
e = environment()
assert(is_environment(e))
e:add_uvar_cnstr("M1")
print(e:get_uvar("M1"))
e:add_var("N", Type())
N, M = Consts("N M")
e:add_var("a", N)
x, a = Consts("x, a")
check_error(function() e:type_check(fun(x, M, a)) end)
print(e:type_check(fun(x, N, a)))