Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Useless use of $a in sink context is spurious #5498

Closed
p6rt opened this issue Jul 28, 2016 · 9 comments
Closed

Useless use of $a in sink context is spurious #5498

p6rt opened this issue Jul 28, 2016 · 9 comments

Comments

@p6rt
Copy link

p6rt commented Jul 28, 2016

Migrated from rt.perl.org#128766 (status was 'resolved')

Searchable as RT128766$

@p6rt
Copy link
Author

p6rt commented Jul 28, 2016

From @ajs

In this code​:

sub infix​:<↑>($a, $b) is assoc<right> {$a ** $b}; sub infix​:<↑↑>($a, $b) is
assoc<right> { [↑] $a xx $b }; say 3↑↑3

The say produces the right answer (7625597484987) but it also produces this
warning​:

Useless use of $a in sink context (line 1)

It's not clear why this would be, since we are using both $a and $b in a
context that's very much not sunk... or so it would seem...

This result is on latest circa​:

This is Rakudo version 2016.07.1-79-gaa5e494 built on MoarVM version
2016.07-3-gc01472d
implementing Perl 6.c.

Under​:

Linux hostname 3.13.0-24-generic #​47-Ubuntu SMP Fri May 2 23​:30​:00 UTC 2014
x86_64 x86_64 x86_64 GNU/Linux

From IRC discussion​:

[15​:45] <harmil_wk> m​: sub infix​:<↑>($a, $b) is assoc<right> {$a ** $b};
sub infix​:<↑↑>($a, $b) is assoc<right> { [↑] $a xx $b }; sub
infix​:<↑↑↑>($a, $b) is assoc<right> { [↑↑] $a xx $b }; sub infix​:<↑↑↑↑>($a,
$b) is assoc<right> { [↑↑↑] $a xx $b }; say 3↑↑3
[15​:45] <+camelia> rakudo-moar aa5e49​: OUTPUT«WARNINGS for <tmp>​:␤Useless
use of $a in sink context (lines 1, 1, 1)␤7625597484987␤»
[15​:45] <harmil_wk> Am I missing something, there? Seems like there should
be no warning.
[15​:47] <unmatched}> bisect​: m​: sub infix​:<↑>($a, $b) is assoc<right> {$a
** $b}; sub infix​:<↑↑>($a, $b) is assoc<right> { [↑] $a xx $b }; sub
infix​:<↑↑↑>($a, $b) is assoc<right> { [↑↑] $a xx $b }; sub infix​:<↑↑↑↑>($a,
$b) is assoc<right> { [↑↑↑] $a xx $b }; say 3↑↑3
[15​:47] <[Coke]> it doesn't warn for me locally on 2016.07.1
[15​:48] <bisectable> unmatched}​: Exit code is 0 on both starting points,
bisecting by using the output
[15​:48] <bisectable> unmatched}​: bisect log​:
https://gist.github.com/369412d2b8ff352b2e8545b35f89846f
[15​:48] <bisectable> unmatched}​: (2016-07-26)
rakudo/rakudo@5334cb7
[15​:48] <unmatched}> harmil_wk​: would you please open a ticket for it?
[15​:48] <harmil_wk> Sure
[15​:48] <unmatched}> huggable​: rakudobug
[15​:48] <huggable> unmatched}, To report a bug, email detailed description
and any test cases to rakudobug@​perl.org or use perl6 query on
http://rt.perl.org ; see https://github.com/rakudo/rakudo/#reporting-bugs
[15​:49] <harmil_wk> I've been pretty prolific with the bug reports of late.
I'm worried I'm going on a list ;)
[15​:49] <unmatched}> :)
[15​:49] <[Coke]> harmil_wk​: you'll never catch up with masak, so dont'
worry. :)
[15​:50] <unmatched}> harmil_wk​: oh and would you include the link to the
commit that bisectable gave above?
[15​:50] <unmatched}> TimToady​: if you're around and have time, seems it
points to the sinkiness propagation​:
rakudo/rakudo@5334cb7
[15​:50] <[Coke]> unmatched}​: note that, in general, we want files attached
to tickets, not links to pastebots.
[15​:51] <[Coke]> but I realize that's a pita in general.
[15​:51] <unmatched}> [Coke]​: I mean the link to the commit

--
Aaron Sherman, M.​:
P​: 617-440-4332 Google Talk, Email and Google Plus​: ajs@​ajs.com
Toolsmith, developer, gamer and life-long student.

@p6rt
Copy link
Author

p6rt commented Jul 29, 2016

From @TimToady

The onearg form of reduce wasn't correctly marking wantedness of either the operator or the argument.

Fixed in fc28b67185d711cf8e4b3f9e6987e1ceee34e37b.

(We don't test sink warnings currenlty.)

1 similar comment
@p6rt
Copy link
Author

p6rt commented Jul 29, 2016

From @TimToady

The onearg form of reduce wasn't correctly marking wantedness of either the operator or the argument.

Fixed in fc28b67185d711cf8e4b3f9e6987e1ceee34e37b.

(We don't test sink warnings currenlty.)

@p6rt
Copy link
Author

p6rt commented Jul 29, 2016

@TimToady - Status changed from 'new' to 'resolved'

@p6rt
Copy link
Author

p6rt commented Jul 29, 2016

From @coke

Re-opening, marking testneeded.

--
Will "Coke" Coleda

1 similar comment
@p6rt
Copy link
Author

p6rt commented Jul 29, 2016

From @coke

Re-opening, marking testneeded.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Jul 29, 2016

@coke - Status changed from 'resolved' to 'open'

@p6rt
Copy link
Author

p6rt commented Aug 3, 2016

From @LLFourn

test​:
Raku/roast@4fdee95

On Sat, Jul 30, 2016 at 5​:36 AM Will Coleda via RT <
bugs-comment@​bugs6.perl.org> wrote​:

Re-opening, marking testneeded.

--
Will "Coke" Coleda

@p6rt p6rt closed this as completed Aug 3, 2016
@p6rt
Copy link
Author

p6rt commented Aug 3, 2016

@smls - Status changed from 'open' to 'resolved'

@p6rt p6rt added the testneeded label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant