reasonml / reason

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

refmt produces invalid code in JSX with fast pipe and field access #2573

Open vdanchenkov opened 4 years ago

vdanchenkov commented 4 years ago
let out = <div> {f(x).value->React.string} </div>;

formats to

let out = <div> f(x).value->React.string </div>;

formats to

let out = <div> f x.value->React.string </div>;

Related to #2199

Checked on https://reasonml.github.io/en/try

bloodyowl commented 4 years ago

What BuckleScript version are you using?

vdanchenkov commented 4 years ago

bs-platform - 7.2.2

$ ./node_modules/.bin/bsrefmt --version Reason 3.6.0 @ 8f71db0

bloodyowl commented 4 years ago

Oh right, there seems to be an issue with record field access here. poke @anmonteiro as you worked on other fixes in that area.