Dispatch issue with parametric methods where subtype constraint is a Type #12721
Closed
Description
Consider (on 0.4):
julia> f{T<:Type{Int}}(::T) = true;
julia> f(Float64)
true
I think this should be a MethodError. It seems like f
is applicable for any DataType, not just Type{Int}
.
On 0.3, f(Float64)
is in fact a MethodError, but so is f(Int)
, which I would expect to work, so while the behavior has changed it doesn't seem like this is a regression.
Activity