Skip to content

Bug: "Error: comment ... dropped" on trailing comment with disabled ocamlformat #2793

Description

@vog

This program:

[@@@ocamlformat "disable"]
let test = "test"
(* test *)

causes ocamlformat to output the following error message:

ocamlformat: Cannot process "...".
  Please report this bug at https://github.com/ocaml-ppx/ocamlformat/issues.
  BUG: comment changed.
File "...", line 3, characters 0-10:
Error: comment (*  test  *) dropped.

where .ocamlformat contains:

profile = conventional
version = 0.28.1

And yes, strangely the first line [@@@ocamlformat "disable"] is actually necessary to reproduce this bug.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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