You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is a one liner to illustrate a possible bug trying to redefine the
operator '>' and I think any other operator with the '<' or '<'
characters.
perl6 -e 'multi infix:«>»( $left, $right --> Bool) is
equiv(&infix:«>») { ... }'
===SORRY!=== Error while compiling -e
Routine given to equiv does not appear to be an operator
at -e:1
I think the error lies here in SETTINGS:
# next three sub would belong to traits.pm if PseudoStash were
available
# so early in the setting compunit
multi sub trait_mod:<is>(Routine $r, Str :$equiv!) {
if (my $i = nqp::index($r.name, ':')) > 0 {
my \nm ='&' ~ nqp::substr($r.name, 0, $i+1) ~ '<' ~
nqp::escape($equiv) ~ '>';
trait_mod:<is>($r, equiv => ::(nm));
return;
}
die "Routine given to equiv does not appear to be an operator";;
}
multi sub trait_mod:<is>(Routine $r, Str :$tighter!) {
if (my $i = nqp::index($r.name, ':')) > 0 {
my \nm ='&' ~ nqp::substr($r.name, 0, $i+1) ~ '<' ~
nqp::escape($tighter) ~ '>';
trait_mod:<is>($r, tighter => ::(nm));
return;
}
die "Routine given to tighter does not appear to be an operator";;
}
multi sub trait_mod:<is>(Routine $r, Str :$looser!) {
if (my $i = nqp::index($r.name, ':')) > 0 {
my \nm ='&' ~ nqp::substr($r.name, 0, $i+1) ~ '<' ~
nqp::escape($looser) ~ '>';
trait_mod:<is>($r, looser => ::(nm));
return;
}
die "Routine given to looser does not appear to be an operator";;
Using:
perl6 -version
This is Rakudo version 2016.11 built on MoarVM version 2016.11
implementing Perl 6.c.
Migrated from rt.perl.org#131739 (status was 'new')
Searchable as RT131739$
The text was updated successfully, but these errors were encountered: