-
-
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
comprehension failure in global scope #8128
Comments
I think this is a reduced test case: abstract A{T}
immutable B{T<:Integer} <: A{T}; end
Base.convert(::Type{B}, c::B) = c
Base.convert{T}(::Type{B}, c::A{T}) = error("should not be called")
julia> @which convert(B{TypeVar(:T,Top)}, B{Int}())
convert(::Type{B{T<:Integer}},c::B{T<:Integer}) at none:3
julia> convert(B{TypeVar(:T,Top)}, B{Int}())
ERROR: should not be called
in convert at none:4 There's clearly something weird going on since the method returned by |
Likely also the cause of #8618. |
This is fixed now, due to the resolution of #8631 |
gives
changing
m
toconst
eliminates the problem, so I'm guessing that this is some type-inference problem with globals. But it doesn't seem like this should give an error in any case.The text was updated successfully, but these errors were encountered: