# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #121406]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=121406 >


<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

Reply via email to