Skip to content

Bug: missing parentheses on Ppat_or with attributes #1310

@craigfe

Description

@craigfe

The following program crashes OCamlformat:

let (Foo ((A | B) [@attr])) = ()

OCamlformat tries to format the pattern as "Foo (A | B)[@attr]", which causes the attribute to change locations in the AST.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions