fsprojects / fantomas-tools

Collection of tools used when developing for Fantomas
https://fsprojects.github.io/fantomas-tools/
MIT License
34 stars 8 forks source link

Reformatting multiple array index operators (v6 style) adds spaces that are invalid #353

Closed richardcox13 closed 2 years ago

richardcox13 commented 2 years ago
let a = Array.create 10 -1
let b = Array.create 10 a

printfn "%d -> %d" a[0] (b[0][0])

Reformat (running this from VS Code with Ionide-fsharp 5.11.0 running fantomas-tool 4.6.5) results in

let a = Array.create 10 -1
let b = Array.create 10 a

printfn "%d -> %d" a[0] (b [ 0 ] [ 0 ])

Which is not valid. Using .[0] does not have this problem.

nojaf commented 2 years ago

Please create an issue using the online tool:

image

See contribution guidelines

richardcox13 commented 2 years ago

Oops, missed this reply. See https://github.com/fsprojects/fantomas/issues/2151.

nojaf commented 2 years ago

Thank you! I'll get back to you over there.