Skip to content

Commit

Permalink
Fix for RT #133016
Browse files Browse the repository at this point in the history
If we're comparing with a Baggy, we should coerce to a Bag, not a Set.
skids++ for nudging
  • Loading branch information
lizmat committed Apr 12, 2018
1 parent c0212af commit 344a64e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/set_difference.pm6
Expand Up @@ -81,10 +81,10 @@ multi sub infix:<(-)>(QuantHash:D $a, Baggy:D $b) {
Rakudo::QuantHash.DIFFERENCE-BAGGY-QUANTHASH($a.Bag, $b)
}
multi sub infix:<(-)>(Baggy:D $a, Map:D $b) {
Rakudo::QuantHash.DIFFERENCE-BAGGY-QUANTHASH($a, $b.Set)
Rakudo::QuantHash.DIFFERENCE-BAGGY-QUANTHASH($a, $b.Bag)
}
multi sub infix:<(-)>(Baggy:D $a, Any:D $b) { # also Iterable
Rakudo::QuantHash.DIFFERENCE-BAGGY-QUANTHASH($a, $b.Set)
Rakudo::QuantHash.DIFFERENCE-BAGGY-QUANTHASH($a, $b.Bag)
}
multi sub infix:<(-)>(Any $a, Baggy:D $b) {
Rakudo::QuantHash.DIFFERENCE-BAGGY-QUANTHASH($a.Bag, $b)
Expand Down

0 comments on commit 344a64e

Please sign in to comment.