Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

JSX4: Fix missing attributes from props type #731

Merged
merged 4 commits into from
Feb 4, 2023

Conversation

mununki
Copy link
Member

@mununki mununki commented Feb 3, 2023

This PR fixes the issue rescript-lang/rescript#5969
This change keeps the attributes of the argument in the make function and removes the unnecessary optional attr from the core_type as the type parameter. So it prevents that uncurried functions were incorrectly converting the type of a prop given as a default value.
The current master in the compiler transforms the uncurried type annotation correctly without this change, but this change can fix the issue in v10.1.2

getLabel name,
attrs,
loc,
{type_ with ptyp_attributes = optionalAttrs} )
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted the unnecessary adding of the optional attribute for the core_type.

@mununki mununki merged commit 392c100 into master Feb 4, 2023
@mununki mununki deleted the fix-missing-attrs-props-type branch February 4, 2023 09:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants