Skip to content

refmt: "Encountered impossible type specification" error in valid private extensible variant type definition #2302

@jchavarri

Description

@jchavarri

Input (OCaml):

module type S = sig
  type t = private ..
  type t += Foo
end

Output:

refmt: internal error, uncaught exception:
       Reason_pprint_ast.NotPossible("Encountered impossible type specification")

Expected output:

module type S = {
  type t = pri ..;
  type t +=
    | Foo;
};

Related: ocaml/ocaml#1253

This was added in 4.06.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions