Skip to content

Formatter adds superfluous parens in pipe chain #7345

Closed
@fhammerschmidt

Description

@fhammerschmidt

Consider this code:

let status =
    json
    ->optional(field("status", string, _), _)
    ->Option.mapOr(Status.Active, Status.fromString)

after formatting some superfluous parens are added:

let status =
  json
  ->(optional(field("status", string, _), _))
  ->Option.mapOr(Status.Active, Status.fromString)

I tried some versions and it seems it was introduced with 11.1.1

Playground link

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions