rescript-compiler icon indicating copy to clipboard operation
rescript-compiler copied to clipboard

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

Open glennsl opened this issue 1 year ago • 0 comments

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.

glennsl avatar Feb 12 '24 15:02 glennsl