From 73f6578a480115cd16274bddd990f7aa054e87d2 Mon Sep 17 00:00:00 2001 From: mununki Date: Sun, 22 Oct 2023 15:45:56 +0900 Subject: [PATCH 1/2] fix forwardRef in uncurried mode --- jscomp/syntax/src/reactjs_jsx_v4.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jscomp/syntax/src/reactjs_jsx_v4.ml b/jscomp/syntax/src/reactjs_jsx_v4.ml index 1801edd011..d8708702d7 100644 --- a/jscomp/syntax/src/reactjs_jsx_v4.ml +++ b/jscomp/syntax/src/reactjs_jsx_v4.ml @@ -968,7 +968,8 @@ let mapBinding ~config ~emptyLoc ~pstr_loc ~fileName ~recFlag binding = let fullExpression = if !Config.uncurried = Uncurried then fullExpression - |> Ast_uncurried.uncurriedFun ~loc:fullExpression.pexp_loc ~arity:1 + |> Ast_uncurried.uncurriedFun ~loc:fullExpression.pexp_loc + ~arity:(if hasForwardRef then 2 else 1) else fullExpression in let fullExpression = From 353173620b3b4b2f505dea86d39b4d02ab64a767 Mon Sep 17 00:00:00 2001 From: mununki Date: Sun, 22 Oct 2023 15:56:53 +0900 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7dd551bb9b..c1909c9aa1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ - Fix issue where GenType was not supporting `@tag` on ordinary variatns https://github.com/rescript-lang/rescript-compiler/pull/6437 - Fix using dynamic import of module in block instead of async function https://github.com/rescript-lang/rescript-compiler/pull/6434 - Fix issue with using dynamic import of module in uncurried mode https://github.com/rescript-lang/rescript-compiler/pull/6434 +- Fix build error where JSX v4 transformation of the discouraged forwardRef in uncurried mode https://github.com/rescript-lang/rescript-compiler/pull/6447 #### :nail_care: Polish