rescript-compiler
rescript-compiler copied to clipboard
Uncurried mode: error message claims incorrect required number of args in function with optional args
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.