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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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!

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.

2 participants