Skip to content

Outcome printer: ambiguous printing of the types of curried functions and uncurried higher-order functions #6322

Closed
@glennsl

Description

@glennsl
module M: {
  let f: string => int => float
} = {
  let f = f => f("")->float
}

The above fails to compile with the non-sensical error:

  Signature mismatch:
  ...
  Values do not match:
    let f: string => int => float
  is not included in
    let f: string => int => float

While the following does compile:

module M: {
  let f: string => int => float
} = {
  let f = _s => n => n->float
}

(PS: Adding parens to the first example makes it compile of course, this is just to reproduce the error message. The issue is solely with the printer.)

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