Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
autogen should go into current scope, not unit
Since a meta depends on the current base op, and that can be shadowed inside
a scope, we should only install the autogen into the current lexical scope,
and let outer scopes do their own autogen with (presumably) different base ops.
  • Loading branch information
TimToady committed Oct 30, 2015
1 parent 52e5dd2 commit 2856ed3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Perl6/Grammar.nqp
Expand Up @@ -369,7 +369,7 @@ role STD {
{
my $META := $match.ast[0];
my $fun := $*W.compile_time_evaluate($var,$META);
$*W.install_lexical_symbol($*UNIT,$name,$fun);
$*W.install_lexical_symbol($*W.cur_lexpad(),$name,$fun);
}
else {
$var.CURSOR.add_mystery($name, $var.to, 'var');
Expand Down

0 comments on commit 2856ed3

Please sign in to comment.