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

No "useless use in sink context" warning on &foo in sink context in Rakudo #3354

Closed
p6rt opened this issue Mar 9, 2014 · 4 comments
Closed
Labels

Comments

@p6rt
Copy link

p6rt commented Mar 9, 2014

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

Searchable as RT121406$

@p6rt
Copy link
Author

p6rt commented Mar 9, 2014

From @masak

<timotimo> p6​: sub foobar() { say "i've done it!" }; &foobar;
<camelia> rakudo-parrot 1aeb7c, rakudo-jvm 1aeb7c, rakudo-moar 1aeb7c,
niecza v24-109-g48a8de3​: ( no output )
<timotimo> why no "useless use of &foobar in sink context"?
<timotimo> p6​: sub foobar() { say "i've done it!" }; &foobar; 1;
<camelia> rakudo-parrot 1aeb7c, rakudo-jvm 1aeb7c, rakudo-moar 1aeb7c,
niecza v24-109-g48a8de3​: ( no output )
<moritz> well, we have a known bug that the last statement doesn't get
compile-time sunk
<moritz> but with trailing ;1 it rally should
<moritz> oh, I think I know why
<moritz> because otherwise, sub foo { } might also warn :-)
<timotimo> well, sub foo { } is a declaration, though
<timotimo> and &foo is just a mention
<timotimo> so that should be differentiable
<moritz> it should be, yes
<timotimo> masak​: feel like submitting this LTA rakudobug? :)
<timotimo> though it's not quite as nasty as in python
<timotimo> where lack of () directly means mention instead of use
<moritz> same in JS and C
<timotimo> in perl 6 you have to do a bit of extra work to get a
mention instead of a use
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Dec 17, 2015

From @TimToady

fixed in 323a5c077efeaa058de48871963046507e33b272

1 similar comment
@p6rt
Copy link
Author

p6rt commented Dec 17, 2015

From @TimToady

fixed in 323a5c077efeaa058de48871963046507e33b272

@p6rt p6rt closed this as completed Dec 17, 2015
@p6rt
Copy link
Author

p6rt commented Dec 17, 2015

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

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

No branches or pull requests

1 participant