Skip to content
Permalink
Browse files

Can't lower if `:($a, $b) := $capture` is used

Since that uses the signature binder, which needs the real lexicals to
bind in to. (In the future, when we're smarter, we might be able to just
compile the destructuring rather than interpreting it in the binder,
which would get us back to allowing lowering again.)
  • Loading branch information...
jnthn committed Oct 30, 2018
1 parent c28a092 commit 685f6cc3b6af59a7df92fcd33eef5f1cc36e34de
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/Perl6/Optimizer.nqp
@@ -1368,7 +1368,7 @@ class Perl6::Optimizer {
@!block_var_stack[nqp::elems(@!block_var_stack) - 1].register_autoslurpy_setup($op);
}
}
elsif $optype eq 'p6bindsig' {
elsif $optype eq 'p6bindsig' || $optype eq 'p6bindcaptosig' {
@!block_var_stack[nqp::elems(@!block_var_stack) - 1].uses_bindsig();
}
elsif $optype eq 'call' || $optype eq 'callmethod' || $optype eq 'chain' {

0 comments on commit 685f6cc

Please sign in to comment.
You can’t perform that action at this time.