Skip to content

Commit d55b044

Browse files
mbaumanKeno
authored andcommitted
Fix ambiguity test failure when arrayops and LinearAlgebra run on the same worker (#28836)
1 parent 293c904 commit d55b044

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/arrayops.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2455,13 +2455,13 @@ end
24552455

24562456
# Ensure we can hash strange custom structs — and they hash the same in arrays
24572457
struct totally_not_five26034 end
2458-
Base.isequal(::totally_not_five26034, x)=isequal(5,x);
2459-
Base.isequal(x, ::totally_not_five26034)=isequal(5,x);
2458+
Base.isequal(::totally_not_five26034, x::Number)=isequal(5,x);
2459+
Base.isequal(x::Number, ::totally_not_five26034)=isequal(5,x);
24602460
Base.isequal(::totally_not_five26034, ::totally_not_five26034)=true;
24612461
Base.hash(::totally_not_five26034, h::UInt)=hash(5, h);
24622462
import Base.==
2463-
==(::totally_not_five26034, x)= (5==x);
2464-
==(x,::totally_not_five26034)= (5==x);
2463+
==(::totally_not_five26034, x::Number)= (5==x);
2464+
==(x::Number,::totally_not_five26034)= (5==x);
24652465
==(::totally_not_five26034,::totally_not_five26034)=true;
24662466
@testset "issue #26034" begin
24672467
n5 = totally_not_five26034()

0 commit comments

Comments
 (0)