-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
ambiguity warning missing? #3025
Comments
Arguably, the 4 and 5 definitions are ambiguous. |
If they are ambiguous, shouldn't there be a warning that 6 is needed? Simpler demonstration of above: julia> z{T}(x::T, y::T) = 1
# methods for generic function z
z{T}(x::T,y::T) at none:1
julia> z(x::Integer, y::Integer) = 2
# methods for generic function z
z(x::Integer,y::Integer) at none:1
z{T}(x::T,y::T) at none:1
julia> z(1,int32(2)) # good
2
julia> z(1,2) # maybe not?
2 |
Well, I do really think they are ambiguous. One is specialized for integers and the other accepts any type, but is more specific in that the arguments need to be the same type. |
title updated to reflect possible issue |
From triage: this is now believed to actually be correct behavior; should be documented. |
Example:
The current thinking is that this sorting is correct, since mentioning |
In case it's unclear to anyone, |
doc issue is #23740. method sort ordering is consistent, so there's no bug |
The text was updated successfully, but these errors were encountered: