Skip to content

Commit 6719bf6

Browse files
xlxs4lazarusA
authored andcommitted
Document supertype(T::UnionAll) (JuliaLang#54419)
Fixes JuliaLang#54286.
1 parent b7b5ccb commit 6719bf6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

base/operators.jl

+7-2
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,19 @@ Supertype operator, equivalent to `T2 <: T1`.
6666
(>:)(@nospecialize(a), @nospecialize(b)) = (b <: a)
6767

6868
"""
69-
supertype(T::DataType)
69+
supertype(T::Union{DataType, UnionAll})
7070
71-
Return the supertype of DataType `T`.
71+
Return the direct supertype of type `T`.
72+
`T` can be a [`DataType`](@ref) or a [`UnionAll`](@ref) type. Does not support
73+
type [`Union`](@ref)s. Also see info on [Types](@ref man-types).
7274
7375
# Examples
7476
```jldoctest
7577
julia> supertype(Int32)
7678
Signed
79+
80+
julia> supertype(Vector)
81+
DenseVector (alias for DenseArray{T, 1} where T)
7782
```
7883
"""
7984
supertype(T::DataType) = (@_total_meta; T.super)

0 commit comments

Comments
 (0)