Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix compiler explosion in while 0 { my $_ }.
  • Loading branch information
jnthn committed Sep 19, 2015
1 parent f7c2a72 commit a328aab
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Perl6/Actions.nqp
Expand Up @@ -1174,13 +1174,11 @@ Compilation unit '$file' contained the following violations:
}
else {
unless $BLOCK.symbol('$_') {
if $*IMPLICIT {
$BLOCK[0].push(QAST::Var.new( :name('$_'), :scope('lexical'), :decl('var') ));
}
else {
$BLOCK[0].push(QAST::Var.new( :name('$_'), :scope('lexical'), :decl('var') ));
unless $*IMPLICIT {
$BLOCK[0].push(QAST::Op.new(
:op('bind'),
QAST::Var.new( :name('$_'), :scope('lexical'), :decl('var') ),
QAST::Var.new( :name('$_'), :scope('lexical') ),
QAST::Op.new( :op('getlexouter'), QAST::SVal.new( :value('$_') ) )
));
}
Expand Down

0 comments on commit a328aab

Please sign in to comment.