diff --git a/typing/ctype.ml b/typing/ctype.ml index 78852a439..04d456b85 100644 --- a/typing/ctype.ml +++ b/typing/ctype.ml @@ -775,7 +775,7 @@ let rec update_level env level ty = if level < get_level env p then raise (Unify [(ty, newvar2 level)]); iter_type_expr (update_level env level) ty end - | Tpackage (p, nl, tl) when level < get_level env p -> + | Tpackage (p, nl, tl) when level < Path.binding_time p -> let p' = normalize_package_path env p in if Path.same p p' then raise (Unify [(ty, newvar2 level)]); log_type ty; ty.desc <- Tpackage (p', nl, tl);