-
Notifications
You must be signed in to change notification settings - Fork 38
Fix issue overlapping argument with default value and alias with default value #734
Conversation
@@ -4,11 +4,12 @@ module C0 = { | |||
type props<'priority, 'text> = {priority: 'priority, text?: 'text} | |||
|
|||
@react.component | |||
let make = ({priority: _, ?text, _}: props<'priority, 'text>) => { | |||
let text = switch text { | |||
let make = (props: props<'priority, 'text>) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using props
instead of destructuring to avoid the conflict from overlapped argument name with default value.
74e71b1 fixes the issue rescript-lang/rescript#5979 |
Could you also add tests that do compile, so it's clear what little mistakes are in there. |
Do you mean in the compiler repo? |
Yes sorry, I mean, do this PR in the compiler repo first. |
Backporting rescript-lang/rescript#5989 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good.
This PR fixes rescript-lang/rescript#5977