Skip to content
Permalink
Browse files

Use List:D to dispatch on rather than Iterable

This appears to fix the MMD issue that Brad Gilbert++ found with:

   %h >>+<< (1,2)
  • Loading branch information...
lizmat committed Nov 16, 2018
1 parent cae9847 commit 481dbf92707385b716bad3dda3b5a6cd4b73f6b0
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/Hyper.pm6
@@ -39,7 +39,7 @@ class Hyper {
}

# %x >>op<< ...
multi method infix(Associative:D \left, Iterable:D \right) {
multi method infix(Associative:D \left, List:D \right) {
die "{left.^name} {$!operator.name} {right.^name} can never work
reliably: the order of keys in {left.^name} is indeterminate"
}
@@ -63,7 +63,7 @@ class Hyper {
}

# ... >>op<< %y
multi method infix(Iterable:D \left, Associative:D \right) {
multi method infix(List:D \left, Associative:D \right) {
die "{left.^name} {$!operator.name} {right.^name} can never work
reliably: the order of keys in {right.^name} is indeterminate"
}

0 comments on commit 481dbf9

Please sign in to comment.
You can’t perform that action at this time.