summaryrefslogtreecommitdiff
path: root/typing/typedecl.ml
diff options
context:
space:
mode:
Diffstat (limited to 'typing/typedecl.ml')
-rw-r--r--typing/typedecl.ml6
1 files changed, 4 insertions, 2 deletions
diff --git a/typing/typedecl.ml b/typing/typedecl.ml
index 2369b84c68..817fcf4d16 100644
--- a/typing/typedecl.ml
+++ b/typing/typedecl.ml
@@ -138,8 +138,10 @@ let rec get_unboxed_type_representation env ty fuel =
| Type_variant [{cd_args = Cstr_tuple [ty2]; _}]
| Type_variant [{cd_args = Cstr_record [{ld_type = ty2; _}]; _}]}
- -> get_unboxed_type_representation env
- (Ctype.apply env type_params ty2 args) (fuel - 1)
+ ->
+ let ty2 = match ty2.desc with Tpoly (t, _) -> t | _ -> ty2 in
+ get_unboxed_type_representation env
+ (Ctype.apply env type_params ty2 args) (fuel - 1)
| {type_kind=Type_abstract} -> None
(* This case can occur when checking a recursive unboxed type
declaration. *)