syntax
syntax copied to clipboard
Formatter error related to ternary operator? "Did you forget a `:` here?"
What we had in reasonml
let f = x => x ? () => () : (() => Js.log("no"));
After conversion to rescript if formats to:
let f = x => x ? () => () : () => Js.log("no")
Which does no compile with error "Did you forget a : here?"
Thanks for the report! This is quite fishy. Investigating…
Related, this snippet in ReScript gives a weird error:
The rescript-lang/syntax repo is obsolete and will be archived soon. If this issue is still relevant, please reopen in the compiler repo (https://github.com/rescript-lang/rescript-compiler) or comment here to ask for it to be moved. Thank you for your contributions.