diff --git a/test/arrayops.jl b/test/arrayops.jl index 7c7ae0404510b..3edc8516838eb 100644 --- a/test/arrayops.jl +++ b/test/arrayops.jl @@ -2455,13 +2455,13 @@ end # Ensure we can hash strange custom structs — and they hash the same in arrays struct totally_not_five26034 end -Base.isequal(::totally_not_five26034, x)=isequal(5,x); -Base.isequal(x, ::totally_not_five26034)=isequal(5,x); +Base.isequal(::totally_not_five26034, x::Number)=isequal(5,x); +Base.isequal(x::Number, ::totally_not_five26034)=isequal(5,x); Base.isequal(::totally_not_five26034, ::totally_not_five26034)=true; Base.hash(::totally_not_five26034, h::UInt)=hash(5, h); import Base.== -==(::totally_not_five26034, x)= (5==x); -==(x,::totally_not_five26034)= (5==x); +==(::totally_not_five26034, x::Number)= (5==x); +==(x::Number,::totally_not_five26034)= (5==x); ==(::totally_not_five26034,::totally_not_five26034)=true; @testset "issue #26034" begin n5 = totally_not_five26034()