No method matching ::Type{A{<:Real}}, only ::Type{A{T}} where {T<:Real}

You should have written
(::Type{<:A{<:Real}})

Because A{<:Real} is an UnionAll which is a form of abstract type.
And A{Int} is a subtype of it.
Not equal to it

1 Like