Skip to content

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

Closed
rescript-lang/syntax
#734
@glennsl

Description

@glennsl

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions