Skip to content

Commit

Permalink
Remove global state for typechecking patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
ncik-roberts committed Apr 4, 2023
1 parent 52f3dee commit e7d3b64
Show file tree
Hide file tree
Showing 3 changed files with 177 additions and 132 deletions.
2 changes: 1 addition & 1 deletion ocaml/typing/typeclass.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,7 @@ and class_expr_aux cl_num val_env met_env virt self_scope scl =
in
let partial =
let dummy = type_exp val_env (Ast_helper.Exp.unreachable ()) in
Typecore.check_partial Modules_rejected val_env pat.pat_type pat.pat_loc
Typecore.check_partial val_env pat.pat_type pat.pat_loc
[{c_lhs = pat; c_guard = None; c_rhs = dummy}]
in
let val_env' = Env.add_lock Alloc_mode.global val_env' in
Expand Down
Loading

0 comments on commit e7d3b64

Please sign in to comment.