Skip to content

Bug: certain match clauses with comments do not stabilize #1164

@ceastlund

Description

@ceastlund

Describe the bug
I format this code:

let _ =
  match x with
  | { y =
        (* _____________________________________________________________________ *)
        ( X _ | Y _ )
    } -> ()
;;

I get this error message:

ocamlformat: Cannot process "original.ml".
  Please report this bug at https://github.com/ocaml-ppx/ocamlformat/issues.
  BUG: formatting did not stabilize after 10 iterations.

How to Reproduce
Run ocamlformat --profile=janestreet --enable-outside-detected-project original.ml. Built from a906b5d.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions