Closed
Description
Using optional type for records with expression instead of variable does not work.
This is working:
let setDefaultOptions = (~newOptions: options) => {
let weekStartOn = newOptions.weekStartOn->Option.map(Weekday.toInt)
let options: options_ = {
weekStartOn: ?weekStartOn,
}
setDefaultOptions_(~newOptions=options)
}
This is not working:
let setDefaultOptions = (~newOptions: options) => {
let options: options_ = {
weekStartOn: ?newOptions.weekStartOn->Option.map(Weekday.toInt),
}
setDefaultOptions_(~newOptions=options)
}
Thank you for filing! Check list:
- Is it a bug? Usage questions should often be asked in the forum instead.
- Concise, focused, friendly issue title & description.
- A minimal, reproducible example.
- OS and browser versions, if relevant.
- Is it already fixed in master?
Metadata
Metadata
Assignees
Labels
No labels