Skip to content

Commit 57f6739

Browse files
committed
don't show the type of Union{} in dump
1 parent 67183f5 commit 57f6739

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

base/show.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1663,6 +1663,10 @@ function dump(io::IOContext, x::SimpleVector, n::Int, indent)
16631663
end
16641664

16651665
function dump(io::IOContext, @nospecialize(x), n::Int, indent)
1666+
if x === Union{}
1667+
show(io, x)
1668+
return
1669+
end
16661670
T = typeof(x)
16671671
if isa(x, Function)
16681672
print(io, x, " (function of type ", T, ")")

doc/src/devdocs/types.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ julia> dump(Array)
9292
UnionAll
9393
var: TypeVar
9494
name: Symbol T
95-
lb: Core.TypeofBottom Union{}
95+
lb: Union{}
9696
ub: Any
9797
body: UnionAll
9898
var: TypeVar
9999
name: Symbol N
100-
lb: Core.TypeofBottom Union{}
100+
lb: Union{}
101101
ub: Any
102102
body: Array{T,N} <: DenseArray{T,N}
103103
```
@@ -178,12 +178,12 @@ TypeName
178178
wrapper: UnionAll
179179
var: TypeVar
180180
name: Symbol T
181-
lb: Core.TypeofBottom Union{}
181+
lb: Union{}
182182
ub: Any
183183
body: UnionAll
184184
var: TypeVar
185185
name: Symbol N
186-
lb: Core.TypeofBottom Union{}
186+
lb: Union{}
187187
ub: Any
188188
body: Array{T,N} <: DenseArray{T,N}
189189
cache: SimpleVector

0 commit comments

Comments
 (0)