Skip to content

Commit c61fb25

Browse files
authored
sync the latest syntax (#5972)
1 parent 7b22491 commit c61fb25

File tree

6 files changed

+9
-34
lines changed

6 files changed

+9
-34
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
- Add the gap property to jsxDOMStyle https://github.com/rescript-lang/rescript-compiler/pull/5956
1818
- Fix issue where error messages related to non-existent props were displayed without location information https://github.com/rescript-lang/syntax/pull/730
19+
- Fix issue where uncurried functions were incorrectly converting the type of a prop given as a default value to curried https://github.com/rescript-lang/syntax/pull/731
1920

2021
# 10.1.2
2122

jscomp/napkin/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
- Fix dropping attributes from props in make function in JSX V4 https://github.com/rescript-lang/syntax/pull/723
5858
- Fix an issue where error messages related to duplicate props were displayed without a loc and were unclear https://github.com/rescript-lang/syntax/pull/728
5959
- Fix issue where error messages related to non-existent props were displayed without location information https://github.com/rescript-lang/syntax/pull/730
60+
- Fix issue where uncurried functions were incorrectly converting the type of a prop given as a default value to curried https://github.com/rescript-lang/syntax/pull/731
6061

6162
#### :eyeglasses: Spec Compliance
6263

lib/4.06.1/unstable/js_compiler.ml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -275411,19 +275411,10 @@ let argToType ~newtypes ~(typeConstraints : core_type option) types
275411275411
in
275412275412
match (type_, name, default) with
275413275413
| Some type_, name, _ when isOptional name ->
275414-
( true,
275415-
getLabel name,
275416-
attrs,
275417-
loc,
275418-
{type_ with ptyp_attributes = optionalAttrs} )
275419-
:: types
275414+
(true, getLabel name, attrs, loc, type_) :: types
275420275415
| Some type_, name, _ -> (false, getLabel name, attrs, loc, type_) :: types
275421275416
| None, name, _ when isOptional name ->
275422-
( true,
275423-
getLabel name,
275424-
attrs,
275425-
loc,
275426-
Typ.var ~loc ~attrs:optionalAttrs (safeTypeFromValue name) )
275417+
(true, getLabel name, attrs, loc, Typ.var ~loc (safeTypeFromValue name))
275427275418
:: types
275428275419
| None, name, _ when isLabelled name ->
275429275420
(false, getLabel name, attrs, loc, Typ.var ~loc (safeTypeFromValue name))

lib/4.06.1/unstable/js_playground_compiler.ml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -275411,19 +275411,10 @@ let argToType ~newtypes ~(typeConstraints : core_type option) types
275411275411
in
275412275412
match (type_, name, default) with
275413275413
| Some type_, name, _ when isOptional name ->
275414-
( true,
275415-
getLabel name,
275416-
attrs,
275417-
loc,
275418-
{type_ with ptyp_attributes = optionalAttrs} )
275419-
:: types
275414+
(true, getLabel name, attrs, loc, type_) :: types
275420275415
| Some type_, name, _ -> (false, getLabel name, attrs, loc, type_) :: types
275421275416
| None, name, _ when isOptional name ->
275422-
( true,
275423-
getLabel name,
275424-
attrs,
275425-
loc,
275426-
Typ.var ~loc ~attrs:optionalAttrs (safeTypeFromValue name) )
275417+
(true, getLabel name, attrs, loc, Typ.var ~loc (safeTypeFromValue name))
275427275418
:: types
275428275419
| None, name, _ when isLabelled name ->
275429275420
(false, getLabel name, attrs, loc, Typ.var ~loc (safeTypeFromValue name))

lib/4.06.1/whole_compiler.ml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -285795,19 +285795,10 @@ let argToType ~newtypes ~(typeConstraints : core_type option) types
285795285795
in
285796285796
match (type_, name, default) with
285797285797
| Some type_, name, _ when isOptional name ->
285798-
( true,
285799-
getLabel name,
285800-
attrs,
285801-
loc,
285802-
{type_ with ptyp_attributes = optionalAttrs} )
285803-
:: types
285798+
(true, getLabel name, attrs, loc, type_) :: types
285804285799
| Some type_, name, _ -> (false, getLabel name, attrs, loc, type_) :: types
285805285800
| None, name, _ when isOptional name ->
285806-
( true,
285807-
getLabel name,
285808-
attrs,
285809-
loc,
285810-
Typ.var ~loc ~attrs:optionalAttrs (safeTypeFromValue name) )
285801+
(true, getLabel name, attrs, loc, Typ.var ~loc (safeTypeFromValue name))
285811285802
:: types
285812285803
| None, name, _ when isLabelled name ->
285813285804
(false, getLabel name, attrs, loc, Typ.var ~loc (safeTypeFromValue name))

0 commit comments

Comments
 (0)