On Sat, 03 Jun 2017 12:07:37 -0700, c...@zoffix.com wrote:
> 
> 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␤»


Thank you for the report. This is now fixed.

Fix: https://github.com/rakudo/rakudo/commit/fa136be2ca
Test unfudge: https://github.com/perl6/roast/commit/754e377b53

Reply via email to