Skip to content

Commit 05dc032

Browse files
committed
Fix two places where we accidentally mutated the QAST tree while compiling it, meaning a later re-compilation would fail.
1 parent 57a2a8e commit 05dc032

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/QAST/Operations.nqp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ sub handle_arg($arg, $qastcomp, $ops, @pos_arg_results, @named_arg_results) {
632632
QAST::Operations.add_core_op('call', -> $qastcomp, $op {
633633
# Work out what callee is.
634634
my $callee;
635-
my @args := $op.list;
635+
my @args := nqp::clone($op.list);
636636
if $op.name {
637637
$callee := $qastcomp.post_new('Ops', :result($qastcomp.escape($op.name)));
638638
}
@@ -665,7 +665,7 @@ QAST::Operations.add_core_op('call', -> $qastcomp, $op {
665665
});
666666
QAST::Operations.add_core_op('callmethod', -> $qastcomp, $op {
667667
# Ensure we at least have an invocant.
668-
my @args := $op.list;
668+
my @args := nqp::clone($op.list);
669669
if +@args == 0 {
670670
pir::die('Method call node requires at least one child');
671671
}

0 commit comments

Comments
 (0)