Skip to content

Uncurried mode: error message claims incorrect required number of args in function with optional args #6637

Closed
@glennsl

Description

@glennsl

Repro:

let f = (~a=0, b, c) => a + b + c
let x = f(42)

yields:

This uncurried function has type (~a: int=?, int, int) => int
  It is applied with 1 arguments but it requires 3.

There's only 2 required arguments in this function. The third is optional.

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleOld issues that went stale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions