lean2/tests/lua/env1.lua
Leonardo de Moura 3078923ea4 fix(kernel/type_checker): add missing test, and kernel_exception has_no_type_exception
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-10 11:14:04 -08:00

10 lines
256 B
Lua

e = environment()
assert(is_environment(e))
e:add_uvar("M")
print(e:get_uvar("M"))
e:add_var("N", Type())
N, M = Consts("N M")
e:add_var("a", N)
x, a = Consts("x, a")
check_error(function() e:check_type(fun(x, M, a)) end)
print(e:check_type(fun(x, N, a)))