Skip to content

Commit

Permalink
Treat <<!=>> special
Browse files Browse the repository at this point in the history
In response to #4838

The applied fix feels hacky, but != *is* the only op that is
actually implemented as an op, and not as meta-handling applied
to an op.  Suggestions for better fix welcome!
  • Loading branch information
lizmat committed Mar 31, 2022
1 parent 07d3030 commit 0d80525
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Perl6/Actions.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -8118,9 +8118,9 @@ class Perl6::Actions is HLL::Actions does STDActions {
sub make_hyperop($/) {
my $base := $<infixish>;
my $basesym := ~ $base<OPER>;
my $basepast := $base.ast
?? $base.ast[0]
!! QAST::Var.new(:name("&infix" ~ $*W.canonicalize_pair('', $basesym)),
my $basepast := $base.ast && $basesym ne '!='
?? $base.ast[0]
!! QAST::Var.new(:name("&infix" ~ $*W.canonicalize_pair('', $basesym)),
:scope<lexical>);
my $hpast := QAST::Op.new(:op<call>, :name<&METAOP_HYPER>, WANTED($basepast,'hyperop'));
if $<opening> eq '<<' || $<opening> eq '«' {
Expand Down

0 comments on commit 0d80525

Please sign in to comment.