Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

$.foo, @.foo and %.foo should contextualize appropriately.

  • Loading branch information...
commit 6ef66c9521b14f33ded88c3da8569032488d2442 1 parent fa1ca28
@jnthn jnthn authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/Perl6/Actions.pm
View
7 src/Perl6/Actions.pm
@@ -1117,6 +1117,13 @@ class Perl6::Actions is HLL::Actions {
$past.pasttype('callmethod');
$past.name($desigilname);
$past.unshift(PAST::Var.new( :name('self'), :scope('lexical_6model') ));
+ # Contextualize based on sigil.
+ $past := PAST::Op.new(
+ :pasttype('callmethod'),
+ :name($sigil eq '@' ?? 'list' !!
+ $sigil eq '%' ?? 'hash' !!
+ 'item'),
+ $past);
}
elsif $twigil eq '^' || $twigil eq ':' {
$past := add_placeholder_parameter($/, $sigil, $desigilname,
Please sign in to comment.
Something went wrong with that request. Please try again.