lean2/tests/lua/env7.lua
Leonardo de Moura 4d1fecb21d refactor(library/kernel_bindings): rename empty_environment ==> bare_environment in the Lua API
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-21 11:24:24 -07:00

9 lines
321 B
Lua

local env1 = bare_environment()
local env2 = add_decl(env1, mk_var_decl("A", Type))
assert(env2:is_descendant(env1))
assert(env2:is_descendant(env2))
assert(not env1:is_descendant(env2))
local env3 = env2:forget()
assert(not env3:is_descendant(env1))
assert(not env3:is_descendant(env2))
assert(env3:is_descendant(env3))