Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't flatten when creating .WHICH
  • Loading branch information
lizmat committed Sep 2, 2014
1 parent 49af621 commit 41d7f71
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/Parcel.pm
Expand Up @@ -11,9 +11,11 @@ my class Parcel does Positional { # declared in BOOTSTRAP
multi method ACCEPTS(Parcel:D: $topic) { self.list.ACCEPTS($topic) }

multi method WHICH(Parcel:D:) {
$!WHICH //= self[0] ~~ ListIter # XXX hacky fix for .Parcel parcels
$!WHICH //= self[0] ~~ ListIter
?? self.^name ~ '|(' ~ self[0].VAR.WHICH ~ ')'
!! self.^name ~ '|' ~ @(self).map( {'(' ~ .VAR.WHICH ~ ')'} ).join;
!! self.^name
~ '|'
~ (^self.elems).map( {'(' ~ self[$_].VAR.WHICH ~ ')'} ).join;
}
method Parcel() { self }
method Capture() {
Expand Down

0 comments on commit 41d7f71

Please sign in to comment.