Skip Menu |
Report information
Id: 119589
Status: rejected
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: timk <timk [at] jtimothyking.com>
Cc:
AdminCc:

Severity: (no value)
Tag: Bug
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: [BUG] "is equiv" does not recognize some operators
Date: Tue, 03 Sep 2013 20:36:54 -0400
To: rakudobug [...] perl.org
From: Tim King <timk [...] jtimothyking.com>
Download (untitled) / with headers
text/plain 568b
Show quoted text
> <TimK1> rn: sub infix:<add> (@a, $n) is equiv(&infix:<X>) { @a <<+>> > $n }; say 1 .. 3 add 5; > <camelia> niecza v24-92-g3961d5d: OUTPUT«6 7 8␤» > <camelia> ..rakudo 484f08: OUTPUT«===SORRY!=== Error > while compiling /tmp/J6R82sHIP7␤Routine given to equiv does not appear > to be an operator␤at /tmp/J6R82sHIP7:1␤------> ␤» > <TimK1> rn: sub infix:<add> (@a, $n) is equiv(&infix:<+>) { @a <<+>> > $n }; say (1 .. 3) add 5; # definitely not what I wanted > <camelia> rakudo 484f08, niecza v24-92-g3961d5d: OUTPUT«6 7 8␤»
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 1021b
On Tue Sep 03 17:37:18 2013, timk wrote: Show quoted text
>
> > <TimK1> rn: sub infix:<add> (@a, $n) is equiv(&infix:<X>) { @a <<+>> > > $n }; say 1 .. 3 add 5; > > <camelia> niecza v24-92-g3961d5d: OUTPUT«6 7 8␤» > > <camelia> ..rakudo 484f08: OUTPUT«===SORRY!=== Error > > while compiling /tmp/J6R82sHIP7␤Routine given to equiv does not appear > > to be an operator␤at /tmp/J6R82sHIP7:1␤------> ␤» > > <TimK1> rn: sub infix:<add> (@a, $n) is equiv(&infix:<+>) { @a <<+>> > > $n }; say (1 .. 3) add 5; # definitely not what I wanted > > <camelia> rakudo 484f08, niecza v24-92-g3961d5d: OUTPUT«6 7 8␤»
Hi, currently both commands give the same result: $ perl6 -e 'sub infix:<add> (@a, $n) is equiv(&infix:<X>) { @a <<+>> $n }; say 1 .. 3 add 5;' 6 7 8 $ perl6-m -e 'sub infix:<add> (@a, $n) is equiv(&infix:<X>) { @a <<+>> $n }; say (1 .. 3) add 5;' 6 7 8 What result did you expect? (esp. I don't understand your comment '# definitely not what I wanted' after the second command.) Christian
I agree with bartolin: From what I can tell, it works as it should. Closing the ticket.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org