Skip Menu |
Report information
Id: 131305
Status: resolved
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: comdog <brian.d.foy [at] gmail.com>
cpan [at] zoffix.com
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: Useless Useless Use Warning when invoking colonpaired routines
Download (untitled) / with headers
text/plain 406b
The `constant value [ ]` is not uselessly used here, as the warning claims: <Zoffix_> m: say &postcircumfix:<[ ]>([1], 0) <camelia> rakudo-moar 4c8136: OUTPUT: «WARNINGS for <tmp>:␤Useless use of constant value [ ] in sink context (lines 1, 1)␤1␤» Can be worked around with: <Zoffix_> m: say ::('CORE::&postcircumfix:<[ ]>')([1], 0) <camelia> rakudo-moar 4c8136: OUTPUT: «1␤»
Subject: Useless 'Useless use' comes out of is tighter
To: rakudobug [...] perl.org
From: brian d foy <brian.d.foy [...] gmail.com>
Date: Tue, 23 May 2017 18:06:01 -0400
Download (untitled) / with headers
text/plain 434b
#`( When I compile this code, I get the error: Useless use of constant value [ ] in sink context (lines 9, 9) I don't think it was useless because it did what I needed. I really wanted the ᔑ to be tighter then ., but that's not a real operator and I ccouldn't use it to set precedence. ) sub prefix:<ᔑ> (Pair $p --> Pair) is tighter(&postcircumfix:<[ ]>) { $p.value => $ = $p.key }
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 624b
On Tue, 23 May 2017 15:06:45 -0700, comdog wrote: Show quoted text
> #`( > When I compile this code, I get the error: > > Useless use of constant value [ ] in sink context (lines 9, 9) > > I don't think it was useless because it did what I needed. > > I really wanted the ᔑ to be tighter then ., but that's not a real > operator and I ccouldn't use it to set precedence. > ) > > sub prefix:<ᔑ> (Pair $p --> Pair) is tighter(&postcircumfix:<[ ]>) { > $p.value > => > $ = $p.key > }
Based on symptoms and bisection results, this is the same issue as RT#131305 Merging this ticket there...
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 687b
On Tue, 23 May 2017 15:06:45 -0700, comdog wrote: Show quoted text
> #`( > When I compile this code, I get the error: > > Useless use of constant value [ ] in sink context (lines 9, 9) > > I don't think it was useless because it did what I needed. > > I really wanted the ᔑ to be tighter then ., but that's not a real > operator and I ccouldn't use it to set precedence. > ) > > sub prefix:<ᔑ> (Pair $p --> Pair) is tighter(&postcircumfix:<[ ]>) { > $p.value > => > $ = $p.key > }
Thank you for the report. This is now fixed. Fix: https://github.com/rakudo/rakudo/commit/c6b7012a9c61133 Test: https://github.com/rakudo/rakudo/commit/c6b7012a9c61133
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 597b
On Wed, 10 Jan 2018 17:32:30 -0800, cpan@zoffix.com wrote: Show quoted text
For the records: The Rakudo fix made some previously passing tests die on the JVM backend. One example is: $ ./perl6-j -e 'say infix:["+"](2,3)' ===SORRY!=== setcodeobj can only be used with a CodeRef I'm not going to reopen this ticket, but I'll add the ticket number to the fudge message (so that the connection to Rakudo commit c6b7012a9c61133 is clear).
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 628b
On Sat, 13 Jan 2018 23:51:44 -0800, bartolin@gmx.de wrote: Show quoted text
> On Wed, 10 Jan 2018 17:32:30 -0800, cpan@zoffix.com wrote:
> > Thank you for the report. This is now fixed. > > > > Fix: https://github.com/rakudo/rakudo/commit/c6b7012a9c61133 > > Test: https://github.com/rakudo/rakudo/commit/c6b7012a9c61133
> > For the records: The Rakudo fix made some previously passing tests die > on the JVM backend. One example is: > > $ ./perl6-j -e 'say infix:["+"](2,3)' > ===SORRY!=== > setcodeobj can only be used with a CodeRef
Could someone double-check the fix makes sense? I'm going to re-open the ticket. I don't trust the fix.
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 936b
On Sun, 14 Jan 2018 02:14:57 -0800, cpan@zoffix.com wrote: Show quoted text
> On Sat, 13 Jan 2018 23:51:44 -0800, bartolin@gmx.de wrote:
> > On Wed, 10 Jan 2018 17:32:30 -0800, cpan@zoffix.com wrote:
> > > Thank you for the report. This is now fixed. > > > > > > Fix: https://github.com/rakudo/rakudo/commit/c6b7012a9c61133 > > > Test: https://github.com/rakudo/rakudo/commit/c6b7012a9c61133
> > > > For the records: The Rakudo fix made some previously passing tests die > > on the JVM backend. One example is: > > > > $ ./perl6-j -e 'say infix:["+"](2,3)' > > ===SORRY!=== > > setcodeobj can only be used with a CodeRef
> > > Could someone double-check the fix makes sense? > > I'm going to re-open the ticket. I don't trust the fix.
I reverted the original fix and marked the rogue block as wanted instead in https://github.com/rakudo/rakudo/commit/64803b0af8 bartolin, would you check whether that fixes JVM and close this ticket if it does?
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 1.1k
On Tue, 16 Jan 2018 00:30:47 -0800, cpan@zoffix.com wrote: Show quoted text
> On Sun, 14 Jan 2018 02:14:57 -0800, cpan@zoffix.com wrote:
> > On Sat, 13 Jan 2018 23:51:44 -0800, bartolin@gmx.de wrote:
> > > On Wed, 10 Jan 2018 17:32:30 -0800, cpan@zoffix.com wrote:
> > > > Thank you for the report. This is now fixed. > > > > > > > > Fix: https://github.com/rakudo/rakudo/commit/c6b7012a9c61133 > > > > Test: https://github.com/rakudo/rakudo/commit/c6b7012a9c61133
> > > > > > For the records: The Rakudo fix made some previously passing tests > > > die > > > on the JVM backend. One example is: > > > > > > $ ./perl6-j -e 'say infix:["+"](2,3)' > > > ===SORRY!=== > > > setcodeobj can only be used with a CodeRef
> > > > > > Could someone double-check the fix makes sense? > > > > I'm going to re-open the ticket. I don't trust the fix.
> > > I reverted the original fix and marked the rogue block as wanted > instead in https://github.com/rakudo/rakudo/commit/64803b0af8 > > bartolin, would you check whether that fixes JVM and close this ticket > if it does?
Yes, the tests are passing again on the JVM backend. Thanks! I'm closing this ticket as 'resolved'.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org