Skip Menu |
Report information
Id: 131502
Status: new
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] Incorrect useless use warning when Junction is passed as arg to Callable
Download (untitled) / with headers
text/plain 671b
The warning lies; this use isn't useless: <Zoffix__> m: -> +@foo { say @foo.head.(41) }(* == 42) <camelia> rakudo-moar 64e898: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "==" in expression "* == 42" in sink context (line 1)␤False␤» <Zoffix__> m: -> +@foo { say @foo.head.(42) }(* == 42) <camelia> rakudo-moar 64e898: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "==" in expression "* == 42" in sink context (line 1)␤True␤» Appears to only happen when the Callable is invoked right away; this version is fine: <Zoffix__> m: sub foo (+@foo) { say @foo.head.(42) }; foo(* == 42) <camelia> rakudo-moar 64e898: OUTPUT: «True␤»
RT-Send-CC: perl6-compiler [...] perl.org
Oops. Long day. I meant WhateverCode is passed, not Junction.


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