Closed
Description
The following code demonstrates the issue:
switch u {
| {_} => Js.log("matched")
}
When running the formatter on this code, it transforms the code into:
switch u {
| {, _} => Js.log("matched")
}
This leads to a syntax error; see playground
It is unclear whether the original syntax {_} should be considered valid. If {_} is invalid syntax, the compiler should raise an error for the original code before formatting occurs.