Skip to content

Commit

Permalink
Don't set name of metaop if it already has a name
Browse files Browse the repository at this point in the history
The code path for '&[+=]' does use METAOP_ASSIGN, but then overwrote the
carefully crafted name with something of its own devise.  Now only sets the
name if it doesn't have a name yet.  Ensures metaops will use the fast path
for += like ops.
  • Loading branch information
lizmat committed Nov 21, 2018
1 parent a728bb2 commit e7ce194
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Perl6/Grammar.nqp
Expand Up @@ -4279,7 +4279,7 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
$META.name('&METAOP_HYPER_POSTFIX') if $META.name eq '&METAOP_HYPER_POSTFIX_ARGS';
my $fun := $*W.compile_time_evaluate(self.MATCH,$META);
$*W.install_lexical_symbol($*W.cur_lexpad(),'&' ~ $categorical[0],$fun);
$fun.set_name($name);
$fun.set_name($name) unless $fun.name;
return self;
}
}
Expand Down

0 comments on commit e7ce194

Please sign in to comment.