diff --git a/base/irrationals.jl b/base/irrationals.jl index ecc3aff6138c1..9b381a61da225 100644 --- a/base/irrationals.jl +++ b/base/irrationals.jl @@ -24,7 +24,7 @@ abstract type AbstractIrrational <: Real end Number type representing an exact irrational value denoted by the symbol `sym`, such as [`π`](@ref pi), [`ℯ`](@ref) and [`γ`](@ref Base.MathConstants.eulergamma). -See also [`@irrational`], [`AbstractIrrational`](@ref). +See also [`@irrational`](@ref Base.@irrational), [`AbstractIrrational`](@ref). """ struct Irrational{sym} <: AbstractIrrational end diff --git a/base/promotion.jl b/base/promotion.jl index 26205530dcd9a..53f003f77809d 100644 --- a/base/promotion.jl +++ b/base/promotion.jl @@ -320,12 +320,25 @@ promote_result(::Type{T},::Type{S},::Type{Bottom},::Type{Bottom}) where {T,S} = Convert all arguments to a common type, and return them all (as a tuple). If no arguments can be converted, an error is raised. -See also: [`promote_type`], [`promote_rule`]. +See also: [`promote_type`](@ref), [`promote_rule`](@ref). # Examples ```jldoctest julia> promote(Int8(1), Float16(4.5), Float32(4.1)) (1.0f0, 4.5f0, 4.1f0) + +julia> promote_type(Int8, Float16, Float32) +Float32 + +julia> reduce(Base.promote_typejoin, (Int8, Float16, Float32)) +Real + +julia> promote(1, "x") +ERROR: promotion of types Int64 and String failed to change any arguments +[...] + +julia> promote_type(Int, String) +Any ``` """ function promote end