Skip to content

Commit

Permalink
Check if we create too many variables
Browse files Browse the repository at this point in the history
  • Loading branch information
FardaleM committed Aug 1, 2024
1 parent 7efd8f1 commit d8ce941
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/common/Variable.ml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,13 @@ module Gen = struct

type t = int ref

let max_var = max_int

let make () =
ref 0

let gen flags t =
if !t = max_var then failwith "Too many variable created";
{ id = CCRef.get_then_incr t; flags }

end
Expand Down

0 comments on commit d8ce941

Please sign in to comment.