Skip to content
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

checker: improve fn argument mismatch error #22370

Merged
merged 3 commits into from
Oct 1, 2024

Conversation

StunxFS
Copy link
Contributor

@StunxFS StunxFS commented Sep 30, 2024

This PR makes improvements to the changes introduced in the commit 7514783.

Before:

main.v:4:12: error: expected 2 arguments, but got 3
        have (int literal, string, bool)
        want (int, string)

    2 | 
    3 | fn main() {
    4 |     x(1, "2", true)
      |               ~~~~
    5 | }

After:

main.v:4:12: error: expected 2 arguments, but got 3
    2 | 
    3 | fn main() {
    4 |     x(1, "2", true)
      |               ~~~~
    5 | }
Details: have (int literal, string, bool)
         want (int, string)

Copy link
Member

@Delta456 Delta456 left a comment

Choose a reason for hiding this comment

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

I like this change. Great work!

Copy link
Member

@spytheman spytheman left a comment

Choose a reason for hiding this comment

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

Excellent work.

@spytheman spytheman merged commit fc72044 into vlang:master Oct 1, 2024
78 checks passed
@StunxFS StunxFS deleted the improve_fn_arg_mismatch_error branch October 1, 2024 11:18
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.

3 participants