-
-
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
typealias bug? #2552
Comments
Yeah this isn't implemented yet. We need to convert it to the normal form |
Is this the same root cause as the following method ordering bug? julia> type A{T<:Integer}; end
julia> f{T}(::A{T}) = 1 # Julia doesn't consider that T must be <: Integer here
f(::A, ::Any...) = 2 # But implicitly does so here
f (generic function with 2 methods)
julia> f(A{Int}()) # So method 2 is more specific
2
julia> g{T<:Integer}(::A{T}) = 1 # But if I manually tell Julia about the restriction
g(::A, ::Any...) = 2
g (generic function with 2 methods)
julia> g(A{Int}()) # Then dispatch works as expected
1 |
Yes, that's much more applicable. I came here from #7453, which also seemed similar but was closed as a duplicate of this guy. It's not really a typealias problem though — it's a restricted type parameter. So I wasn't sure if the same restricting/unrestricting problem was at the root cause here. |
Actually thanks for pinging this, since I actually notice exactly this a few days ago. |
removing the milestone tag since this is being tracked through #8974 |
closed by #18457 |
The text was updated successfully, but these errors were encountered: