-
-
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
Dispatch error with bound TypeVar
argument on a second call to a "recursive" function.
#11355
Comments
Output:
Changes that can make the problem disappear:
Maybe some caching issue?? |
Leaving away |
Yeah you are right. Forgot to check that. |
Although, in Traits.jl that trick doesn't seem to work (a shame, I thought I had a work-around). |
You have another definition below that rigth? |
Yes, but adding that other definition doesn't change the behavior of your example. It doesn't matter though, there are other workarounds. |
Issue JuliaLang/julia#11355 still a problem.
This test case still errors in the last line: function f{T<:Tuple}(sig::Type{T})
println(1)
f(sig.parameters[1])
end
function f(arg::DataType)
println(2)
if arg <: Tuple
error("Dispatch error!")
end
end
t = Tuple{Type{Array{Int,1}}}
f(t)
t = Tuple{Type{Dict{TypeVar(:K, true)}}}
f(t) with
Please re-open. |
Repro:
Mailing list thread
@mauro3
The text was updated successfully, but these errors were encountered: