Skip to content

Commit

Permalink
[CN] Fix IT.free_vars for pattern matches (rems-project#691)
Browse files Browse the repository at this point in the history
Surprised it took 3 months to catch...
  • Loading branch information
ZippeyKeys12 authored and vzaliva committed Dec 4, 2024
1 parent 000383d commit 6245629
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backend/cn/lib/indexTerms.ml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ let rec free_vars_bts (it : 'a annot) : BT.t SymMap.t =
| [] -> acc
| (pat, body) :: cases ->
let bound = SymSet.of_list (List.map fst (bound_by_pattern pat)) in
let more = SymMap.filter (fun x _ -> SymSet.mem x bound) (free_vars_bts body) in
let more =
SymMap.filter (fun x _ -> not (SymSet.mem x bound)) (free_vars_bts body)
in
aux
(SymMap.union
(fun _ bt1 bt2 ->
Expand Down

0 comments on commit 6245629

Please sign in to comment.