Skip Menu |
Report information
Id: 131123
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: cpan [at] zoffix.com
Cc:
AdminCc:

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



Subject: [BUG] Useless use of useless use in smartmatch + block + try
Download (untitled) / with headers
text/plain 292b
<Zoffix_> m: say so 42 ~~ { try $_ == 5 } <camelia> rakudo-moar af50e0: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "==" in expression "$_ == 5" in sink context (line 1)␤False␤» <Zoffix_> m: say so 42 ~~ { $_ == 5 } <camelia> rakudo-moar af50e0: OUTPUT: «False␤»
Download (untitled) / with headers
text/plain 613b
Em Fri, 07 Apr 2017 19:59:42 -0700, cpan@zoffix.com escreveu: Show quoted text
> > <Zoffix_> m: say so 42 ~~ { try $_ == 5 } > <camelia> rakudo-moar af50e0: OUTPUT: «WARNINGS for <tmp>:␤Useless use > of "==" in expression "$_ == 5" in sink context (line 1)␤False␤» > > <Zoffix_> m: say so 42 ~~ { $_ == 5 } > <camelia> rakudo-moar af50e0: OUTPUT: «False␤»
I think the problem is only with block + try... <SmokeMachine> m: say {try 5 == 5}() <camelia> combined, experimental evalbot rakudo-moar 7f73f9: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "==" in expression "5 == 5" in sink context (line 1)␤True␤»
Download (untitled) / with headers
text/plain 903b
Em Fri, 14 Apr 2017 14:12:54 -0700, fernandocorrea@gmail.com escreveu: Show quoted text
> Em Fri, 07 Apr 2017 19:59:42 -0700, cpan@zoffix.com escreveu:
> > > > <Zoffix_> m: say so 42 ~~ { try $_ == 5 } > > <camelia> rakudo-moar af50e0: OUTPUT: «WARNINGS for <tmp>:␤Useless > > use > > of "==" in expression "$_ == 5" in sink context (line 1)␤False␤» > > > > <Zoffix_> m: say so 42 ~~ { $_ == 5 } > > <camelia> rakudo-moar af50e0: OUTPUT: «False␤»
> > > I think the problem is only with block + try... > > <SmokeMachine> m: say {try 5 == 5}() > <camelia> combined, experimental evalbot rakudo-moar 7f73f9: OUTPUT: > «WARNINGS for <tmp>:␤Useless use of "==" in expression "5 == 5" in > sink context (line 1)␤True␤»
try with a block doesn't warn: <SmokeMachine> Fernando Corrêa de Oliveira m: say {try {5 == 5}}() <•camelia> combined, experimental evalbot rakudo-moar 624fe8: OUTPUT: «True␤»


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