Skip to content

Commit 64007fd

Browse files
committed
added method as_mast(QAST::Want, ...)
1 parent 1eed27d commit 64007fd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/vm/moar/QAST/QASTCompilerMAST.nqp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,6 +1239,11 @@ class QAST::MASTCompiler {
12391239
nqp::die("expected QAST constant; didn't get one");
12401240
}
12411241

1242+
multi method as_mast(QAST::Want $node, :$want) {
1243+
# If we're not in a coercive context, take the default.
1244+
self.as_mast($node[0])
1245+
}
1246+
12421247
multi method as_mast(QAST::IVal $iv, :$want) {
12431248
my $reg := $*REGALLOC.fresh_i();
12441249
MAST::InstructionList.new(

0 commit comments

Comments
 (0)