Skip to content

Error on master with async/await and uncurried function #5854

Closed
@cknitt

Description

@cknitt

This code compiles fine with 10.1:

module type Impl = {
  let get: (. string) => Js.Promise.t<string>
}

module Make = (I: Impl) => {
  let get = async key => await I.get(. key)
}

On master, it gives the following error:

  4 │
  5 │ module Make = (I: Impl) => {
  6 │   let get = async key => await I.get(. key)
  7 │ }
  8 │

  This function is a curried function where an uncurried function is expected

(Without async/await, it compiles fine on master, too.)

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