Skip to content

Commit

Permalink
Fix ⊊, ⊋ on non-Set arguments (#42155)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmcaine authored Sep 9, 2021
1 parent 819c45b commit 655a1a4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/abstractset.jl
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,8 @@ false
"""
,

(a::AbstractSet, b) = length(a) < length(b) && a b
(a, b) = Set(a) b
(a::AbstractSet, b::AbstractSet) = length(a) < length(b) && a b
(a, b) = Set(a) Set(b)
(a, b) = b a

function end
Expand Down
5 changes: 5 additions & 0 deletions test/sets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -803,3 +803,8 @@ end
A = empty!(A)
@test isempty(A)
end

@testset "⊊, ⊋" begin
@test !((1, 2) (1, 2, 2))
@test !((1, 2, 2) (1, 2))
end

0 comments on commit 655a1a4

Please sign in to comment.