Skip to content

Commit ac18784

Browse files
committed
test(react-ppx): breaking test for newtype in uncurried mode
1 parent daf49ba commit ac18784

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

jscomp/syntax/tests/ppx/react/expected/newtype.res.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,16 @@ let make = {
9999

100100
\"Newtype"
101101
}
102+
103+
@@uncurried
104+
105+
module Uncurried = {
106+
type props<'foo> = {foo?: 'foo}
107+
108+
let make = (type a, {?foo, _}: props<_>) => React.null
109+
let make = {
110+
let \"Newtype$Uncurried" = (props: props<_>) => make(props)
111+
112+
\"Newtype$Uncurried"
113+
}
114+
}

jscomp/syntax/tests/ppx/react/newtype.res

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,10 @@ module V4A3 = {
4545
}
4646

4747
@react.component
48-
let make =(~x : ('a,'b), ~q:'a ) => [fst(x), q]
48+
let make =(~x : ('a,'b), ~q:'a ) => [fst(x), q]
49+
50+
@@uncurried
51+
52+
module Uncurried = {
53+
@react.component
54+
let make = (type a, ~foo=?) => React.null}

0 commit comments

Comments
 (0)