diff --git a/CHANGELOG.md b/CHANGELOG.md index a25e4b254d..4265be1a70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ - Prevent inlining of async functions in additional cases https://github.com/rescript-lang/rescript-compiler/issues/5860 - Revert to ubuntu-18.04 in CI to support Linux versions with older glibc https://github.com/rescript-lang/rescript-compiler/issues/5868 +- Fix build error where aliasing arguments to `_` in the make function with JSX V4. https://github.com/rescript-lang/syntax/pull/720 +- Fix parsing of spread props as an expression in JSX V4 https://github.com/rescript-lang/syntax/pull/721 # 10.1.0 diff --git a/jscomp/napkin/CHANGELOG.md b/jscomp/napkin/CHANGELOG.md index e12a288505..66abd7ebe2 100644 --- a/jscomp/napkin/CHANGELOG.md +++ b/jscomp/napkin/CHANGELOG.md @@ -51,6 +51,8 @@ - Fix issue where the JSX fragment without children build error https://github.com/rescript-lang/syntax/pull/704 - Fix issue where async as an id cannot be used with application and labelled arguments https://github.com/rescript-lang/syntax/issues/707 - Treat await as almost-unary operator weaker than pipe so `await foo->bar` means `await (foo->bar)` https://github.com/rescript-lang/syntax/pull/711 +- Fix build error where aliasing arguments to `_` in the make function with JSX V4. https://github.com/rescript-lang/syntax/pull/720 +- Fix parsing of spread props as an expression in JSX V4 https://github.com/rescript-lang/syntax/pull/721 #### :eyeglasses: Spec Compliance diff --git a/lib/4.06.1/unstable/js_compiler.ml b/lib/4.06.1/unstable/js_compiler.ml index 5a0a5f5c34..54cfafa6c2 100644 --- a/lib/4.06.1/unstable/js_compiler.ml +++ b/lib/4.06.1/unstable/js_compiler.ml @@ -275780,10 +275780,7 @@ let transformStructureItem ~config mapper item = | Pexp_fun ( _arg_label, _default, - { - ppat_desc = - Ppat_construct ({txt = Lident "()"}, _) | Ppat_any; - }, + {ppat_desc = Ppat_construct ({txt = Lident "()"}, _)}, expr ) -> (patternsWithLabel, patternsWithNolabel, expr) | Pexp_fun diff --git a/lib/4.06.1/unstable/js_playground_compiler.ml b/lib/4.06.1/unstable/js_playground_compiler.ml index 956cbf991d..bceba48f7f 100644 --- a/lib/4.06.1/unstable/js_playground_compiler.ml +++ b/lib/4.06.1/unstable/js_playground_compiler.ml @@ -275780,10 +275780,7 @@ let transformStructureItem ~config mapper item = | Pexp_fun ( _arg_label, _default, - { - ppat_desc = - Ppat_construct ({txt = Lident "()"}, _) | Ppat_any; - }, + {ppat_desc = Ppat_construct ({txt = Lident "()"}, _)}, expr ) -> (patternsWithLabel, patternsWithNolabel, expr) | Pexp_fun @@ -285935,7 +285932,7 @@ and parseJsxProp p = (Location.mkloc "ns.namedArgLoc" loc, Parsetree.PStr []) in let attrExpr = - let e = parsePrimaryExpr ~operand:(parseAtomicExpr p) p in + let e = parsePrimaryExpr ~operand:(parseExpr p) p in {e with pexp_attributes = propLocAttr :: e.pexp_attributes} in (* using label "spreadProps" to distinguish from others *) diff --git a/lib/4.06.1/whole_compiler.ml b/lib/4.06.1/whole_compiler.ml index c68f33d3b9..c05257f7f3 100644 --- a/lib/4.06.1/whole_compiler.ml +++ b/lib/4.06.1/whole_compiler.ml @@ -286164,10 +286164,7 @@ let transformStructureItem ~config mapper item = | Pexp_fun ( _arg_label, _default, - { - ppat_desc = - Ppat_construct ({txt = Lident "()"}, _) | Ppat_any; - }, + {ppat_desc = Ppat_construct ({txt = Lident "()"}, _)}, expr ) -> (patternsWithLabel, patternsWithNolabel, expr) | Pexp_fun @@ -299467,7 +299464,7 @@ and parseJsxProp p = (Location.mkloc "ns.namedArgLoc" loc, Parsetree.PStr []) in let attrExpr = - let e = parsePrimaryExpr ~operand:(parseAtomicExpr p) p in + let e = parsePrimaryExpr ~operand:(parseExpr p) p in {e with pexp_attributes = propLocAttr :: e.pexp_attributes} in (* using label "spreadProps" to distinguish from others *) diff --git a/syntax b/syntax index c4544b4d91..51e4e16668 160000 --- a/syntax +++ b/syntax @@ -1 +1 @@ -Subproject commit c4544b4d91b3692c2ddd96fe68225714c1d90608 +Subproject commit 51e4e16668a6ada802ea4d9d2a0e1aa966fdeee2