let myFunction = () => {
// this will break
open List;
let list = ["1", "2"];
list |> iter(print_endline);
};
Output of refmt Test.re:
let myFunction = () => {
open // this will break
List;
let list = ["1", "2"];
list |> iter(print_endline);
};
After running refmt a second time on the above output:
let myFunction = () => {
open List; // this will break
let list = ["1", "2"];
list |> iter(print_endline);
};
This doesn't happen on the bsrefmt shipped with ReScript, or reason 3.5.2 from opam. I can reproduce it on reason 3.6.0 from opam, as well as 3.6.0 from esy and 3.6.0 from reason-repacked.
Input file:
Output of
refmt Test.re
:After running
refmt
a second time on the above output:This doesn't happen on the
bsrefmt
shipped with ReScript, or reason 3.5.2 from opam. I can reproduce it on reason 3.6.0 from opam, as well as 3.6.0 from esy and 3.6.0 from reason-repacked.