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

Incorrect error message for enum member autocasting #15166

Open
RX14 opened this issue Nov 6, 2024 · 0 comments
Open

Incorrect error message for enum member autocasting #15166

RX14 opened this issue Nov 6, 2024 · 0 comments
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler

Comments

@RX14
Copy link
Contributor

RX14 commented Nov 6, 2024

enum Test
  Correct
end

def foo(one : Test, two : Test)
end

foo(:incorrect, :correct)

Returns the error message:

error in line 8
Error: expected argument #2 to 'foo' to match a member of enum Test.

Did you mean :correct?

Overloads are:
 - foo(one : Test, two : Test)

This is pointing to the wrong argument as incorrect

@RX14 RX14 added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler labels Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler
Projects
None yet
Development

No branches or pull requests

1 participant