Skip to content

Bug: Regression: comment position in list patterns #1140

@jberdine

Description

@jberdine

Describe the bug
#866 introduced a regression in the position of comments in list patterns.

How to Reproduce
Executing

$ echo "let [(* comment one *) one; (* comment two *) two] = [1; 2]" | _build/default/src/ocamlformat.exe --name "foo.ml" -

produces

let (* comment one *) [one; (* comment two *) two] = [1; 2]

while it should, and used to, produce

let [(* comment one *) one; (* comment two *) two] = [1; 2]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions