Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make sure &no::such doesn't give back a Null PMC.
  • Loading branch information
jnthn committed Jul 16, 2010
1 parent a63b5c5 commit dd8d5d7
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Perl6/Actions.pm
Expand Up @@ -819,8 +819,15 @@ sub make_variable($/, $name) {
$past.viviself( sigiltype( $<sigil> ) );
$past.unshift(PAST::Var.new( :name('self'), :scope('lexical') ));
}
elsif $<sigil> eq '&' && !@name {
$past := PAST::Op.new(:pirop('find_sub_not_null__Ps'), $past.name);
elsif $<sigil> eq '&' {
if !@name {
$past := PAST::Op.new(:pirop('find_sub_not_null__Ps'), $past.name);
}
else {
$past.viviself(PAST::Var.new(
:namespace(''), :name('Code'), :scope('package')
));
}
}
}
$past
Expand Down

0 comments on commit dd8d5d7

Please sign in to comment.