crystal-lang/crystal

Incorrect error message for enum member autocasting

RX14 opened this issue · 0 comments

RX14 commented
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