9398ea5a59
We need support for recursive locks. The main user of this class is the environment object. This commit adds a test that demonstrates that the shared_lock of the environment object may be recursively requested. Before this fix, the Lean was deadlocking in this example. Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
11 lines
243 B
Text
11 lines
243 B
Text
(**
|
|
function add_paren(code)
|
|
return "(" .. "** " .. code .. " **" .. ")"
|
|
end
|
|
parse_lean_cmds(add_paren([[
|
|
local env = get_environment()
|
|
env:add_var("x", Const("Int"))
|
|
print(env:find_object("x"))
|
|
]]))
|
|
print("done")
|
|
**)
|