Skip to content

Commit d2556bb

Browse files
committed
Fix uncurried arity for primitives.
1 parent 7cdb66d commit d2556bb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jscomp/ml/typedecl.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1719,7 +1719,9 @@ let rec arity_from_arrow_type env core_type ty =
17191719
let parse_arity env core_type ty =
17201720
match Ast_uncurried.uncurried_type_get_arity_opt ~env ty with
17211721
| Some arity ->
1722-
let from_constructor = Ast_uncurried.uncurried_type_get_arity_opt ~env:Env.empty ty = None in
1722+
let from_constructor = match ty.desc with
1723+
| Tconstr (_, _, _) -> not (Ast_uncurried_utils.type_is_uncurried_fun ty)
1724+
| _ -> false in
17231725
(arity, from_constructor)
17241726
| None -> (arity_from_arrow_type env core_type ty, false)
17251727

0 commit comments

Comments
 (0)