Skip to content

Commit ab39e10

Browse files
authored
Fix forwardRef in uncurried mode (#6447)
1 parent 0cc69d1 commit ab39e10

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
- Fix issue where GenType was not supporting `@tag` on ordinary variatns https://github.com/rescript-lang/rescript-compiler/pull/6437
2323
- Fix using dynamic import of module in block instead of async function https://github.com/rescript-lang/rescript-compiler/pull/6434
2424
- Fix issue with using dynamic import of module in uncurried mode https://github.com/rescript-lang/rescript-compiler/pull/6434
25+
- Fix build error where JSX v4 transformation of the discouraged forwardRef in uncurried mode https://github.com/rescript-lang/rescript-compiler/pull/6447
2526

2627
#### :nail_care: Polish
2728

jscomp/syntax/src/reactjs_jsx_v4.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,8 @@ let mapBinding ~config ~emptyLoc ~pstr_loc ~fileName ~recFlag binding =
968968
let fullExpression =
969969
if !Config.uncurried = Uncurried then
970970
fullExpression
971-
|> Ast_uncurried.uncurriedFun ~loc:fullExpression.pexp_loc ~arity:1
971+
|> Ast_uncurried.uncurriedFun ~loc:fullExpression.pexp_loc
972+
~arity:(if hasForwardRef then 2 else 1)
972973
else fullExpression
973974
in
974975
let fullExpression =

0 commit comments

Comments
 (0)