Skip to content

JSXv4: Unable to use argument with default value in other default arguments #5977

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
glennsl opened this issue Feb 4, 2023 · 0 comments · Fixed by rescript-lang/syntax#734 or #5989
Assignees
Milestone

Comments

@glennsl
Copy link
Contributor

glennsl commented Feb 4, 2023

Repro

@react.component
let make = (~a=2, ~b=a*2) => <div />

causes the error:

[E] Line 2, column 21:
This has type: option<'a>
  Somewhere wanted: int

This used to work with JSXv3.

@mununki mununki self-assigned this Feb 5, 2023
@glennsl glennsl changed the title JSXv4: Unable to use argument with default value in other default arugments JSXv4: Unable to use argument with default value in other default arguments Feb 5, 2023
@cristianoc cristianoc added this to the v10.1 milestone Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment