Skip to content

Commit 9960d41

Browse files
committed
fix(react-ppx): don't ignore newtypes in uncurried mode
1 parent ac18784 commit 9960d41

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

jscomp/syntax/src/jsx_common.ml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ let removeArity binding =
5858
match expr.pexp_desc with
5959
| _ when Ast_uncurried.exprIsUncurriedFun expr ->
6060
Ast_uncurried.exprExtractUncurriedFun expr
61+
| Pexp_newtype (label, e) ->
62+
{
63+
expr with
64+
pexp_desc = Pexp_newtype (label, removeArityRecord e);
65+
}
6166
| Pexp_apply (forwardRef, [(label, e)]) ->
6267
{
6368
expr with

0 commit comments

Comments
 (0)