Skip to content

Commit

Permalink
special tests: zero for a TypeWithoutZero instance
Browse files Browse the repository at this point in the history
  • Loading branch information
jishnub committed Apr 4, 2024
1 parent 2a4c811 commit 854c779
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions stdlib/LinearAlgebra/test/special.jl
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ Random.seed!(1)
struct TypeWithZero end
Base.promote_rule(::Type{TypeWithoutZero}, ::Type{TypeWithZero}) = TypeWithZero
Base.convert(::Type{TypeWithZero}, ::TypeWithoutZero) = TypeWithZero()
Base.zero(x::Union{TypeWithoutZero, TypeWithZero}) = zero(typeof(x))
Base.zero(::Type{<:Union{TypeWithoutZero, TypeWithZero}}) = TypeWithZero()
LinearAlgebra.symmetric(::TypeWithoutZero, ::Symbol) = TypeWithoutZero()
Base.transpose(::TypeWithoutZero) = TypeWithoutZero()
Expand Down

0 comments on commit 854c779

Please sign in to comment.