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 Useless Use Warning when invoking colonpaired routines #6244

Closed
p6rt opened this issue May 13, 2017 · 13 comments
Closed

Useless Useless Use Warning when invoking colonpaired routines #6244

p6rt opened this issue May 13, 2017 · 13 comments

Comments

@p6rt
Copy link

p6rt commented May 13, 2017

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

Searchable as RT131305$

@p6rt
Copy link
Author

p6rt commented May 13, 2017

From @zoffixznet

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␤»

@p6rt
Copy link
Author

p6rt commented May 23, 2017

From @briandfoy

#`(
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
  }

@p6rt
Copy link
Author

p6rt commented May 24, 2017

From @zoffixznet

Bisected to rakudo/rakudo@127338a

@p6rt
Copy link
Author

p6rt commented May 24, 2017

From @zoffixznet

On Tue, 23 May 2017 15​:06​:45 -0700, comdog wrote​:

#`(
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&#8203;:\<ᔑ> \(Pair $p \-\-> Pair\) is tighter\(&postcircumfix&#8203;:\<\[ \]>\) \{
    $p\.value
        =>
    $ = $p\.key
    \}

Based on symptoms and bisection results, this is the same issue as RT#​131305

Merging this ticket there...

@p6rt
Copy link
Author

p6rt commented May 24, 2017

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jan 11, 2018

From @zoffixznet

On Tue, 23 May 2017 15​:06​:45 -0700, comdog wrote​:

#`(
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&#8203;:\<ᔑ> \(Pair $p \-\-> Pair\) is tighter\(&postcircumfix&#8203;:\<\[ \]>\) \{
    $p\.value
        =>
    $ = $p\.key
    \}

Thank you for the report. This is now fixed.

Fix​: rakudo/rakudo@c6b7012a9c61133
Test​: rakudo/rakudo@c6b7012a9c61133

@p6rt
Copy link
Author

p6rt commented Jan 11, 2018

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

@p6rt
Copy link
Author

p6rt commented Jan 14, 2018

From @usev6

On Wed, 10 Jan 2018 17​:32​:30 -0800, cpan@​zoffix.com wrote​:

Thank you for the report. This is now fixed.

Fix​: rakudo/rakudo@c6b7012a9c61133
Test​: rakudo/rakudo@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

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).

@p6rt
Copy link
Author

p6rt commented Jan 14, 2018

From @zoffixznet

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​: rakudo/rakudo@c6b7012a9c61133
Test​: rakudo/rakudo@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.

@p6rt
Copy link
Author

p6rt commented Jan 14, 2018

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

@p6rt
Copy link
Author

p6rt commented Jan 16, 2018

From @zoffixznet

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​: rakudo/rakudo@c6b7012a9c61133
Test​: rakudo/rakudo@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 rakudo/rakudo@64803b0af8

bartolin, would you check whether that fixes JVM and close this ticket if it does?

@p6rt
Copy link
Author

p6rt commented Jan 16, 2018

From @usev6

On Tue, 16 Jan 2018 00​:30​:47 -0800, cpan@​zoffix.com wrote​:

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​: rakudo/rakudo@c6b7012a9c61133
Test​: rakudo/rakudo@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 rakudo/rakudo@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'.

@p6rt p6rt closed this as completed Jan 16, 2018
@p6rt
Copy link
Author

p6rt commented Jan 16, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant