lean2/tests/lua/free.lua
2014-10-16 13:09:26 -07:00

7 lines
231 B
Lua

local f = Const("f")
local x = Var(1)
local y = Var(2)
local t = f(x, y)
check_error(function() t:lower_free_vars(2, 10) end)
check_error(function() t:lower_free_vars(1, 1, 2) end)
assert(t:lower_free_vars(1) == f(Var(0), Var(1)))