diff --git a/base/deprecated.jl b/base/deprecated.jl index 7196f1f4bddbe..1ca11b14bf637 100644 --- a/base/deprecated.jl +++ b/base/deprecated.jl @@ -1488,6 +1488,9 @@ function assert(x) @assert x "" end +# Issue #26248 +@deprecate conj(x) x + # END 0.7 deprecations # BEGIN 1.0 deprecations diff --git a/base/missing.jl b/base/missing.jl index 563770999ed96..7ca2c9373bbf1 100644 --- a/base/missing.jl +++ b/base/missing.jl @@ -64,14 +64,14 @@ isless(::Any, ::Missing) = true # Unary operators/functions for f in (:(!), :(~), :(+), :(-), :(identity), :(zero), :(one), :(oneunit), - :(abs), :(abs2), :(sign), + :(abs), :(abs2), :(sign), :(real), :(imag), :(acos), :(acosh), :(asin), :(asinh), :(atan), :(atanh), :(sin), :(sinh), :(cos), :(cosh), :(tan), :(tanh), :(exp), :(exp2), :(expm1), :(log), :(log10), :(log1p), :(log2), :(Math.exponent), :(sqrt), :(Math.gamma), :(Math.lgamma), :(iseven), :(ispow2), :(isfinite), :(isinf), :(isodd), :(isinteger), :(isreal), :(isnan), :(isempty), - :(iszero), :(transpose), :(adjoint), :(float)) + :(iszero), :(transpose), :(adjoint), :(float), :(conj)) @eval $(f)(::Missing) = missing end diff --git a/base/operators.jl b/base/operators.jl index ff6e233d0f163..d5e052a2dc76d 100644 --- a/base/operators.jl +++ b/base/operators.jl @@ -733,8 +733,6 @@ See also: [`fld1`](@ref), [`mod1`](@ref). """ fldmod1(x, y) = (fld1(x, y), mod1(x, y)) -conj(x) = x - """ widen(x) diff --git a/stdlib/LinearAlgebra/test/generic.jl b/stdlib/LinearAlgebra/test/generic.jl index 00a560af9be51..cd44f36a96ab4 100644 --- a/stdlib/LinearAlgebra/test/generic.jl +++ b/stdlib/LinearAlgebra/test/generic.jl @@ -335,6 +335,7 @@ Base.zero(::Type{ModInt{n}}) where {n} = ModInt{n}(0) Base.zero(::ModInt{n}) where {n} = ModInt{n}(0) Base.one(::Type{ModInt{n}}) where {n} = ModInt{n}(1) Base.one(::ModInt{n}) where {n} = ModInt{n}(1) +Base.conj(a::ModInt{n}) where {n} = a Base.adjoint(a::ModInt{n}) where {n} = ModInt{n}(conj(a)) Base.transpose(a::ModInt{n}) where {n} = a # see Issue 20978 LinearAlgebra.Adjoint(a::ModInt{n}) where {n} = adjoint(a) diff --git a/test/missing.jl b/test/missing.jl index 2b6e3ee6a725c..4302ffe47d6b5 100644 --- a/test/missing.jl +++ b/test/missing.jl @@ -142,7 +142,7 @@ Base.zero(::Type{Unit}) = Unit(0) Base.one(::Type{Unit}) = 1 @testset "elementary functions" begin - elementary_functions = [abs, abs2, sign, + elementary_functions = [abs, abs2, sign, real, imag, acos, acosh, asin, asinh, atan, atanh, sin, sinh, conj, cos, cosh, tan, tanh, exp, exp2, expm1, log, log10, log1p, log2,