Skip to content

Bug: type annotation in named function argument causes ocamlformat to fail #1432

@ceastlund

Description

@ceastlund

Describe the bug
Style this code:

let _ = call ~f:(fun pair -> (pair : a * b))

I get this error:

ocamlformat: Cannot process "file.ml".
  Please report this bug at https://github.com/ocaml-ppx/ocamlformat/issues.
  BUG: generating invalid ocaml syntax.

How to Reproduce
Style with ocamlformat built from 10aabb3, using --profile=janestreet.

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