Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
glennsl opened this issue Feb 12, 2024 · 2 comments · Fixed by #7284
Labels
stale Old issues that went stale

Comments

@glennsl
Copy link
Contributor

glennsl commented Feb 12, 2024

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.

Copy link

github-actions bot commented Feb 7, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Old issues that went stale label Feb 7, 2025
@glennsl
Copy link
Contributor Author

glennsl commented Feb 7, 2025

Still an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Old issues that went stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant