Skip to content

Adding type annotation to curried function emits compiler error #7544

Closed
@mediremi

Description

@mediremi

Since v12.0.0-alpha.6, adding a type annotation to a curried function gives the error This function is a curried function where an uncurried function is expected:

type fn2 = (int, int) => int
let add : fn2 = (a, b) => a + b
let add5 : int => int  =  add(5, ...)
/// This function is a curried function where an uncurried function is expected

(Playground link)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions