Skip to content

Commit a4b603b

Browse files
committed
Revert "Small improvement to layout inference for mutually recursive type decl parameters (#1766)"
This reverts commit be17ee2.
1 parent de16bea commit a4b603b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ocaml/typing/typedecl.ml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1548,8 +1548,6 @@ let transl_type_decl env rec_flag sdecl_list =
15481548
raise (Error (loc, Type_clash (new_env, err))))
15491549
checks)
15501550
delayed_jkind_checks;
1551-
(* Check that constraints are enforced *)
1552-
List.iter2 (check_constraints new_env) sdecl_list decls;
15531551
(* Check that all type variables are closed; this also defaults any remaining
15541552
sort variables. Defaulting must happen before update_decls_jkind,
15551553
Typedecl_seperability.update_decls, and add_types_to_env, all of which need
@@ -1563,6 +1561,8 @@ let transl_type_decl env rec_flag sdecl_list =
15631561
Some ty -> raise(Error(sdecl.ptype_loc, Unbound_type_var(ty,decl)))
15641562
| None -> ())
15651563
sdecl_list tdecls;
1564+
(* Check that constraints are enforced *)
1565+
List.iter2 (check_constraints new_env) sdecl_list decls;
15661566
(* Add type properties to declarations *)
15671567
let decls =
15681568
try

0 commit comments

Comments
 (0)