-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Ugly method ambiguity errors #17007
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
Comments
Just looks like the printing is broken: it should show just the 3rd item in the |
Thanks, Tim! Though I just realized something else is missing: in 0.4, a suggestion was also printed, giving the signature of the method one needs to define to fix the ambiguity. I think this was really useful, as ambiguities are quite hard to reason about, especially for newcomers. Any idea when/why it was removed? |
As for "why," compare I suppose we could add the printing of a signature of the method to resolve the ambiguity. In principle it's not hard: it's just |
Interestingly, in Julia 0.4.5 the warning is already printed, when the second function is defined. It is not necessary to call it: julia> f(x::Int, y::Any) = false |
@ufechner7: with #16125 the warning on definition was changed to an error on usage. |
Ambiguity errors are really hard to read and leak
svec
in 0.5. I consider this as a regression since ambiguity warnings were much cleaner on 0.4.The text was updated successfully, but these errors were encountered: