Skip to content

Commit

Permalink
Make Mu<> work as before
Browse files Browse the repository at this point in the history
The original proto of postcircumfix:<{ }> was just |, so it also accepted
Mu.  This adds Mu to the current signature, and fast-paths the <> case.
  • Loading branch information
lizmat committed Feb 8, 2019
1 parent f3f7c5c commit d904b70
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/core/hash_slice.pm6
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# all sub postcircumfix {} candidates here please

proto sub postcircumfix:<{ }>($, $?, Mu $?, *%) is nodal {*}
proto sub postcircumfix:<{ }>(Mu $, $?, Mu $?, *%) is nodal {*}

# %h<key>
multi sub postcircumfix:<{ }>( \SELF, \key ) is raw {
Expand Down Expand Up @@ -163,11 +163,10 @@ multi sub postcircumfix:<{ }>(\SELF, Bool() :$v!, *%other) is raw {
?? SLICE_MORE_HASH( SELF, SELF.keys.list, 'v', $v, %other )
!! SELF{SELF.keys.list};
}
multi sub postcircumfix:<{ }>( \SELF, *%other ) is raw {
SELF.ZEN-KEY(|%other);
multi sub postcircumfix:<{ }>(Mu \SELF, *%other ) is raw {
%other ?? SELF.ZEN-KEY(|%other) !! nqp::decont(SELF)
}


proto sub postcircumfix:<{; }>($, $, *%) is nodal {*}

sub MD-HASH-SLICE-ONE-POSITION(\SELF, \indices, \idx, int $dim, \target) {
Expand Down

0 comments on commit d904b70

Please sign in to comment.