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

error when attempting to modify return value within phaser #5707

Closed
p6rt opened this issue Sep 29, 2016 · 6 comments
Closed

error when attempting to modify return value within phaser #5707

p6rt opened this issue Sep 29, 2016 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Sep 29, 2016

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

Searchable as RT129763$

@p6rt
Copy link
Author

p6rt commented Sep 29, 2016

From @ajs

Via IRC​:

[13​:51] <harmil_wk> a very slightly LTA error​:
[13​:51] <harmil_wk> m​: sub test { return (state $x = 0 )++; POST { $_++ }
}; say test
[13​:51] <+camelia> rakudo-moar 58cf9d​: OUTPUT«Cannot resolve caller
postfix​:<++>(Int); none of these signatures match​:␤ (Mu​:D $a is rw)␤
(Mu​:U $a is rw)␤ (Int​:D $a is rw)␤ (int $a is rw)␤ (Bool​:U $a is
rw)␤ (Bool​:D $a is rw)␤ (Num​:D $a is rw)␤ (Num​:U $a is rw)…»
[13​:52] <harmil_wk> It really would be nice if the error simply told me
that I was trying to modify a non-read-only rather than making me visually
parse the "is rw" on all of those.
[13​:52] <harmil_wk> Should I rakudobug that?
[13​:55] <masak> harmil_wk​: sure, why not -- though I'm not sure the verdict
will be "we can haz nice error" on that :/

--
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 Dec 14, 2016

From @zoffixznet

On Thu, 29 Sep 2016 11​:01​:49 -0700, ajs wrote​:

Via IRC​:

[13​:51] <harmil_wk> a very slightly LTA error​:
[13​:51] <harmil_wk> m​: sub test { return (state $x = 0 )++; POST { $_++ }
}; say test
[13​:51] <+camelia> rakudo-moar 58cf9d​: OUTPUT«Cannot resolve caller
postfix​:<++>(Int); none of these signatures match​:␤ (Mu​:D $a is rw)␤
(Mu​:U $a is rw)␤ (Int​:D $a is rw)␤ (int $a is rw)␤ (Bool​:U $a is
rw)␤ (Bool​:D $a is rw)␤ (Num​:D $a is rw)␤ (Num​:U $a is rw)…»
[13​:52] <harmil_wk> It really would be nice if the error simply told me
that I was trying to modify a non-read-only rather than making me visually
parse the "is rw" on all of those.
[13​:52] <harmil_wk> Should I rakudobug that?
[13​:55] <masak> harmil_wk​: sure, why not -- though I'm not sure the verdict
will be "we can haz nice error" on that :/

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

This has been addressed (as part of another ticket ticket, or perhaps it was you on IRC who caused me to fix this). The new error is more A​:

Cannot resolve caller postfix​:<++>(Int); the following candidates
match the type but require mutable arguments​:
  (Mu​:D $a is rw)
  (Int​:D $a is rw)

The following do not match for other reasons​:
  (Bool​:D $a is rw)
  (Bool​:U $a is rw)
  (Mu​:U $a is rw)
  (Num​:D $a is rw)
  (Num​:U $a is rw)
  (int $a is rw)
  (num $a is rw --> num)
  in sub test at -e line 1
  in block <unit> at -e line 1

Marking as tests needed (which I think should go to into rakudo's t/, since they'd be checking raw content of an output message).

@p6rt
Copy link
Author

p6rt commented Dec 14, 2016

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

@p6rt
Copy link
Author

p6rt commented Dec 14, 2016

From @zoffixznet

Test added​: rakudo/rakudo@e327f3049a

1 similar comment
@p6rt
Copy link
Author

p6rt commented Dec 14, 2016

From @zoffixznet

Test added​: rakudo/rakudo@e327f3049a

@p6rt
Copy link
Author

p6rt commented Dec 14, 2016

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

@p6rt p6rt closed this as completed Dec 14, 2016
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