Skip to content

Commit

Permalink
Fix whatever curry with regexes
Browse files Browse the repository at this point in the history
Fixes RT#131409: https://rt.perl.org/Ticket/Display.html?id=131409

When we curry the QAST, we migrate blocks in chains, but we forget
to migrate blocks created by constructs inside Regexes.

Fix by adding a migrator to the branch that handles these ops.
  • Loading branch information
zoffixznet committed Feb 2, 2018
1 parent ddda743 commit d80fc37
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Perl6/Actions.nqp
Expand Up @@ -9724,6 +9724,10 @@ class Perl6::Actions is HLL::Actions does STDActions {
$past[$i] := QAST::Var.new(:name($pname), :scope<lexical>);
nqp::push(@old_args, $past[$i]) if $was_chain;
} else {
if (my $old_ast := $old.ann: 'past_block') {
remove_block($*W.cur_lexpad(), $old_ast);
$block[0].push: $old_ast;
}
nqp::push(@old_args, $past[$i]) if $was_chain;
}
$i++;
Expand Down

0 comments on commit d80fc37

Please sign in to comment.