Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix multi-dim slice assignment
  • Loading branch information
Mouq committed Aug 8, 2014
1 parent 6117d54 commit 356d57a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/array_slice.pm
Expand Up @@ -247,7 +247,7 @@ multi sub postcircumfix:<[ ]> (\SELF is rw, LoL \keys, *%adv) is rw {
!! postcircumfix:<[ ]>(SELF, keys[0].list, |%adv);
}
multi sub postcircumfix:<[ ]> (\SELF is rw, LoL \keys, Mu \assignee, *%adv) is rw {
keys > 1 ?? SELF[keys[0].list].map({postcircumfix:<[ ]>($_, LoL.new(|keys[1..*]), assignee, |%adv)}).eager
keys > 1 ?? (SELF[keys[0].list].map({postcircumfix:<[ ]>($_, LoL.new(|keys[1..*]), |%adv)}).eager.Parcel = assignee)
!! postcircumfix:<[ ]>(SELF, keys[0].list, assignee, |%adv);
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/hash_slice.pm
Expand Up @@ -137,7 +137,7 @@ multi sub postcircumfix:<{ }> (\SELF is rw, LoL \keys, *%adv) is rw {
!! postcircumfix:<{ }>(SELF, keys[0].list, |%adv);
}
multi sub postcircumfix:<{ }> (\SELF is rw, LoL \keys, Mu \assignee, *%adv) is rw {
keys > 1 ?? SELF{keys[0].list}.map({postcircumfix:<{ }>($_, LoL.new(|keys[1..*]), assignee, |%adv)}).eager
keys > 1 ?? (SELF{keys[0].list}.map({postcircumfix:<{ }>($_, LoL.new(|keys[1..*]), |%adv)}).eager.Parcel = assignee)
!! postcircumfix:<{ }>(SELF, keys[0].list, assignee, |%adv);
}

Expand Down

0 comments on commit 356d57a

Please sign in to comment.