Skip to content

Stop emitting two incorrect arity errors for wrong patterns #4694

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

Merged
merged 3 commits into from
Jun 18, 2025

Conversation

giacomocavalieri
Copy link
Member

This PR closes #4693
Since I was here I tried making the error a bit easier to read for patterns. Up until now we referred to patterns with the wrong arity as "calls" which I think could be quite confusing, now it calls them "pattern"

Copy link
Member

@lpil lpil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Changelog please

Now it can tell the difference when a pattern has the wrong arity and
refer to it as a "pattern" instead of a "call".
@giacomocavalieri
Copy link
Member Author

Done!

Copy link
Member

@lpil lpil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@lpil lpil merged commit 01f818f into gleam-lang:main Jun 18, 2025
12 checks passed
@giacomocavalieri giacomocavalieri deleted the fix-4693 branch June 18, 2025 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Double incorrect arity error on pattern
2 participants