Type checking in Dictionaries

julia> x = Dict(1=>[1,2,3])
Dict{Int64,Array{Int64,1}} with 1 entry:
  1 => [1, 2, 3]

julia> x isa Dict{<:Integer, <:Vector{<:Integer}}
true

Here Vector{<:Integer} isa UnionAll type

julia> Vector{<:Integer}
Array{#s3,1} where #s3<:Integer

and Vector{Int} is a concrete type from the union.

1 Like