You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The subtyping relationship is Type{Float32} <: DataType <: Type, and as you've discovered yourself, typeof(Float32)==DataType, so neither Type{Float32} nor Type are concrete, but DataType is.
What's confusing indeed is the DataType <: Type{T} in the docstring. While DataType <: Type{T} where T is true (and just a more verbose form of DataType <: Type), for any actual T, DataType <: Type{T} does not hold.
I saw the following weird behaviour on https://discourse.julialang.org/t/ann-dispatchdoctor-jl-offers-you-a-prescription-for-type-stability/114837/35
I think this could be a bug? The definition states:
However,
typeof(T)
returns aDataType
rather thanType{Float32}
. But the docstring forDataType
saysDataType <: Type{T}
. So I'm confused.If this indeed a bug I think it's because the
@nospecialize
here was implemented without expecting such an input:The solution would be to add a
whose recursion would automatically deal with
Type{Type{Float32}}
and so on.But obviously this would be a massive breaking change so wouldn't be possible. So I guess I'm just looking for some clarification :)
The text was updated successfully, but these errors were encountered: