Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix for RT #131936
Provide a HLL version of Match.(made|ast) that returns a Nil instead
of a lowlevel NQPMu.  Wish there was a better way to test for NQPMu
though, as this will prevent type objects being properly propagated
by "make".
  • Loading branch information
lizmat committed Aug 21, 2017
1 parent 69a91d6 commit 5db5b1d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/Match.pm
Expand Up @@ -3,6 +3,9 @@ my class Match is Capture is Cool does NQPMatchRole {
my Mu $NO_CAPS := nqp::hash();
my Mu $DID_MATCH := nqp::create(NQPdidMATCH);

method ast() { nqp::if(nqp::isconcrete($!made),$!made,Nil) }
method made() { nqp::if(nqp::isconcrete($!made),$!made,Nil) }

method STR() {
nqp::if(
nqp::istype(nqp::getattr(self,Match,'$!match'), NQPdidMATCH),
Expand Down

0 comments on commit 5db5b1d

Please sign in to comment.