Skip Menu |
Report information
Id: 131502
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] 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.
Download (untitled) / with headers
text/plain 207b
On Sat, 03 Jun 2017 12:08:50 -0700, cpan@zoffix.com wrote: Show quoted text
> Oops. Long day. I meant WhateverCode is passed, not Junction.
Fudged tests preemptively added to S02-types/whatever.t in roast commit 4b2fef409.


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