Skip to content

Bug: ocamlformat can't process combination of function application, local module opening and attribute #1226

@roddyyaga

Description

@roddyyaga

ocamlformat doesn't work on the following code (reduced example):

module M = struct
  let f x = x
end

let g=M.f ((let open M in f) [@ocaml.warning "-33"])

The error message is BUG: ast changed (although I got BUG: generating invalid ocaml syntax for the file where this originally occurred).

This is for ocamlformat 0.12 on OCaml 4.07.0 with the default configuration (the same thing also happened on my custom configuration).

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