Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatter adds superfluous parens in pipe chain #7345

Closed
fhammerschmidt opened this issue Mar 17, 2025 · 0 comments · Fixed by #7370
Closed

Formatter adds superfluous parens in pipe chain #7345

fhammerschmidt opened this issue Mar 17, 2025 · 0 comments · Fixed by #7370
Assignees

Comments

@fhammerschmidt
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants