Skip to content

Commit

Permalink
Fix Capture.WHICH for subclasses of Capture
Browse files Browse the repository at this point in the history
Subclasses' WHICH would be identical to a Capture's WHICH if their
contents are identical.
  • Loading branch information
Kaiepi committed Mar 31, 2020
1 parent 5baa645 commit 8808401
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/core.c/Capture.pm6
Expand Up @@ -16,9 +16,7 @@ my class Capture { # declared in BOOTSTRAP
}

multi method WHICH (Capture:D: --> ValueObjAt:D) {
my str $WHICH = nqp::istype(self.WHAT,Capture)
?? 'Capture'
!! self.^name;
my str $WHICH = nqp::eqaddr(self.WHAT,Capture) ?? 'Capture' !! self.^name;
if !nqp::isnull(@!list) && @!list {
$WHICH ~= '|';
for nqp::hllize(@!list) -> \elem {
Expand Down

0 comments on commit 8808401

Please sign in to comment.