On Sat, 03 Jun 2017 07:14:59 -0700, c...@zoffix.com wrote:
> In none of these cases is the use of variables actually useless:
> 
> <Zoffix__> m: my ($sensor1, $sensor2, $sensor3); $sensor1 notandthen
> $sensor2 notandthen $sensor3 notandthen 'did not find a working
> sensor!'.say;
> <camelia> rakudo-moar 64e898: OUTPUT: «WARNINGS for <tmp>:␤Useless use
> of $sensor3 in sink context (line 1)␤Useless use of $sensor2 in sink
> context (line 1)␤did not find a working sensor!␤»
> 
> <Zoffix__> m: my ($sensor1, $sensor2, $sensor3) := (1, 2, 3); $sensor1
> andthen $sensor2 andthen $sensor3 andthen 'did not find a working
> sensor!'.say;
> <camelia> rakudo-moar 64e898: OUTPUT: «WARNINGS for <tmp>:␤Useless use
> of $sensor3 in sink context (line 1)␤Useless use of $sensor2 in sink
> context (line 1)␤did not find a working sensor!␤»
> 
> <Zoffix__> m: m: my ($sensor1, $sensor2, $sensor3); $sensor1 orelse
> $sensor2 orelse $sensor3 orelse 'did not find a working sensor!'.say;
> <camelia> rakudo-moar 64e898: OUTPUT: «WARNINGS for <tmp>:␤Useless use
> of $sensor3 in sink context (line 1)␤Useless use of $sensor2 in sink
> context (line 1)␤did not find a working sensor!␤»

Thank you for the report. This is now fixed.

Fix:   https://github.com/rakudo/rakudo/commit/d30e5b1e32
Tests: https://github.com/rakudo/rakudo/commit/d30e5b1e32

Reply via email to