Skip to content

Commit

Permalink
Fix bug filtering out constants in array length constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
lorchrob committed Dec 5, 2023
1 parent e822880 commit 33fd534
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lustre/lustreTypeChecker.ml
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@ let update_ty_with_ctx node_ty call_params ctx arg_exprs =
(* Remove duplicates *)
|> List.fold_left (fun acc vars -> LA.SI.union vars acc) LA.SI.empty
|> LA.SI.elements
(* Filter out constants *)
|> List.filter (fun id -> not (member_val ctx id))
(* Filter out constants. If "id" is a constant, it must be a local constant *)
|> List.filter (fun id -> not (member_val ctx id) || (List.mem id call_params) )
in
match call_param_len_idents with
| [] -> node_ty
Expand Down

0 comments on commit 33fd534

Please sign in to comment.