Skip to content

Commit b94a0fe

Browse files
authored
change display of type aliases to avoid = (#37491)
1 parent a7ce2a2 commit b94a0fe

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

base/docs/basedocs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1848,7 +1848,7 @@ Rational{Int64}
18481848
julia> M = [1 2; 3.5 4];
18491849
18501850
julia> typeof(M)
1851-
Matrix{Float64} = Array{Float64, 2}
1851+
Matrix{Float64} (alias for Array{Float64, 2})
18521852
```
18531853
"""
18541854
typeof

base/float.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ Equivalent to `typeof(float(zero(T)))`.
285285
# Examples
286286
```jldoctest
287287
julia> float(Complex{Int})
288-
ComplexF64 = Complex{Float64}
288+
ComplexF64 (alias for Complex{Float64})
289289
290290
julia> float(Int)
291291
Float64

base/show.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,8 +740,9 @@ function show(io::IO, ::MIME"text/plain", @nospecialize(x::Type))
740740
if !print_without_params(x) && get(io, :compact, true)
741741
properx = makeproper(io, x)
742742
if make_typealias(properx) !== nothing || x <: make_typealiases(properx)[2]
743-
print(io, " = ")
743+
print(io, " (alias for ")
744744
show(IOContext(io, :compact => false), x)
745+
print(io, ")")
745746
end
746747
end
747748

doc/src/manual/types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@ consider the two types created by the following declarations:
10331033

10341034
```jldoctest
10351035
julia> const T1 = Array{Array{T,1} where T, 1}
1036-
Vector{Vector{T} where T} = Array{Array{T, 1} where T, 1}
1036+
Vector{Vector{T} where T} (alias for Array{Array{T, 1} where T, 1})
10371037
10381038
julia> const T2 = Array{Array{T, 1}, 1} where T
10391039
Array{Vector{T}, 1} where T

stdlib/LinearAlgebra/src/generic.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1617,7 +1617,7 @@ julia> a = [[1,2, [3,4]], 5.0, [6im, [7.0, 8.0]]]
16171617
Any[0 + 6im, [7.0, 8.0]]
16181618
16191619
julia> LinearAlgebra.promote_leaf_eltypes(a)
1620-
ComplexF64 = Complex{Float64}
1620+
ComplexF64 (alias for Complex{Float64})
16211621
```
16221622
"""
16231623
promote_leaf_eltypes(x::Union{AbstractArray{T},Tuple{T,Vararg{T}}}) where {T<:Number} = T

0 commit comments

Comments
 (0)