reasonml / reason

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

refmt should respect attributes during record field punning #2551

Closed alex35mil closed 3 months ago

alex35mil commented 4 years ago

Input:

type t = {x: [@foo] x}
and x = int;

Output:

type t = {x}
and x = int;
EduardoRFS commented 4 years ago

This feels related

Input

let a = (b) => { [%c d()]; };
// X

Output

let a = b => {
  %c
  d();
} /* */;
alex35mil commented 4 years ago

@EduardoRFS There is an issue for this as well 😃 https://github.com/facebook/reason/issues/2300

anmonteiro commented 3 months ago

this is no longer an issue