Permalink
Browse files

Make :($a, $b) := \(1, 2) update $a and $b.

Previously, the spec had such a construct doing nothing. We'll try it
like this for a bit to see how it works out. Note, shortest patch that
could possibly work; probably needs some tuning.
  • Loading branch information...
1 parent cecc9fa commit bf472b05a07f36740dbc8d5a025131931d1cc367 @jnthn jnthn committed Nov 19, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/Perl6/Actions.pm
@@ -4208,6 +4208,15 @@ class Perl6::Actions is HLL::Actions does STDActions {
$target.push($source);
make $target;
}
+ elsif $target.isa(QAST::WVal) && nqp::istype($target.value, $*W.find_symbol(['Signature'])) {
+ make QAST::Op.new(
+ :op('p6bindcaptosig'),
+ $target,
+ QAST::Op.new(
+ :op('callmethod'), :name('Capture'),
+ $source
+ ));
+ }
# XXX Several more cases to do...
else {
$*W.throw($/, ['X', 'Bind']);

0 comments on commit bf472b0

Please sign in to comment.