reasonml / reason

Simple, fast & type safe code that leverages the JavaScript & OCaml ecosystems
http://reasonml.github.io
MIT License
10.08k stars 425 forks source link

Rfmt mangles partial application of operators #2728

Open feihong opened 8 months ago

feihong commented 8 months ago
Js.log("45" |> (++)(_, "%"));

Turns into

Js.log("45" |> _ ++ "%");

Which doesn't compile.

Melange playground link

Note that if it's not an operator, it's fine. For example, this won't get mangled:

Js.log("45" |> String.cat(_, "%"));