Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
jnthn committed Nov 19, 2012
1 parent cecc9fa commit bf472b0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Perl6/Actions.pm
Expand Up @@ -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']);
Expand Down

0 comments on commit bf472b0

Please sign in to comment.