mirror of
https://github.com/CatalaLang/catala.git
synced 2024-09-19 16:28:12 +03:00
Fix bug in dependency analysis around scope call arguments
This commit is contained in:
parent
61ec34e3d9
commit
d09113163d
@ -1237,6 +1237,7 @@ let translate_program (prgm : 'm Scopelang.Ast.program) : 'm Ast.program =
|
||||
def next_bind
|
||||
in
|
||||
let items = translate_defs top_ctx defs_ordering in
|
||||
Expr.Box.assert_closed items;
|
||||
{
|
||||
code_items = Bindlib.unbox items;
|
||||
decl_ctx;
|
||||
|
@ -86,7 +86,7 @@ let rec expr_used_defs e =
|
||||
if TopdefName.path v <> [] then VMap.empty
|
||||
else VMap.singleton (Topdef v) pos
|
||||
| (EScopeCall { scope; _ }, m) as e ->
|
||||
if ScopeName.path scope <> [] then VMap.empty
|
||||
if ScopeName.path scope <> [] then recurse_subterms e
|
||||
else VMap.add (Scope scope) (Expr.mark_pos m) (recurse_subterms e)
|
||||
| EAbs { binder; _ }, _ ->
|
||||
let _, body = Bindlib.unmbind binder in
|
||||
|
Loading…
Reference in New Issue
Block a user