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

++ makes variables rw, <-> seemingly doesn't #550

Closed
p6rt opened this issue Dec 29, 2008 · 5 comments
Closed

++ makes variables rw, <-> seemingly doesn't #550

p6rt opened this issue Dec 29, 2008 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Dec 29, 2008

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

Searchable as RT61824$

@p6rt
Copy link
Author

p6rt commented Dec 29, 2008

From @masak

<eric256> rakudo​: my @​a = <1 2 3 4 5 6>; my @​b = (10..16); for @​a Z @​b
<-> $a,$b { $a++ }; say @​a;
<p6eval> rakudo 34586​: OUTPUT«234567␤»
<eric256> rakudo​: my @​a = <1 2 3 4 5 6>; my @​b = (10..16); for @​a Z @​b
<-> $a,$b { $a = $a +1 }; say @​a;
<p6eval> rakudo 34586​: OUTPUT«Cannot assign to readonly variable. [...]
<eric256> rakudo​: my @​a = <1 2 3 4 5 6>; my @​b = (10..16); for @​a Z @​b
-> $a,$b { $a++ }; say @​a;
<p6eval> rakudo 34586​: OUTPUT«234567␤»
<eric256> yea ++ is working regardless of anything else ;) how odd
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Feb 10, 2009

From @bacek

On Mon Dec 29 10​:17​:11 2008, masak wrote​:

<eric256> rakudo​: my @​a = <1 2 3 4 5 6>; my @​b = (10..16); for @​a Z @​b
<-> $a,$b { $a++ }; say @​a;
<p6eval> rakudo 34586​: OUTPUT«234567␤»
<eric256> rakudo​: my @​a = <1 2 3 4 5 6>; my @​b = (10..16); for @​a Z @​b
<-> $a,$b { $a = $a +1 }; say @​a;
<p6eval> rakudo 34586​: OUTPUT«Cannot assign to readonly variable. [...]
<eric256> rakudo​: my @​a = <1 2 3 4 5 6>; my @​b = (10..16); for @​a Z @​b
-> $a,$b { $a++ }; say @​a;
<p6eval> rakudo 34586​: OUTPUT«234567␤»
<eric256> yea ++ is working regardless of anything else ;) how odd
* masak submits rakudobug

Fix is here
http://github.com/bacek/rakudo/commit/0b681ae7d7ee98fe49e448424538ab89e9029a5f

"Ensure that (prefix|postfix)^(++|--) can not change readonly variables"

--
Bacek

@p6rt
Copy link
Author

p6rt commented Feb 10, 2009

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

@p6rt
Copy link
Author

p6rt commented Feb 11, 2009

From @jnthn

On Mon Dec 29 10​:17​:11 2008, masak wrote​:

<eric256> rakudo​: my @​a = <1 2 3 4 5 6>; my @​b = (10..16); for @​a Z @​b
<-> $a,$b { $a++ }; say @​a;
<p6eval> rakudo 34586​: OUTPUT«234567␤»
<eric256> rakudo​: my @​a = <1 2 3 4 5 6>; my @​b = (10..16); for @​a Z @​b
<-> $a,$b { $a = $a +1 }; say @​a;
<p6eval> rakudo 34586​: OUTPUT«Cannot assign to readonly variable. [...]
<eric256> rakudo​: my @​a = <1 2 3 4 5 6>; my @​b = (10..16); for @​a Z @​b
-> $a,$b { $a++ }; say @​a;
<p6eval> rakudo 34586​: OUTPUT«234567␤»
<eric256> yea ++ is working regardless of anything else ;) how odd
* masak submits rakudobug

++ now doesn't work regardless any more as of git 45cf376, and <-> is
now also implemented in git bb2cdb7 (didn't add any more tests, since
once the ++ problem is solved then we can't really pass both that test
and the <-> one without having both done properly, so I think coverage
is enough).

Thanks!

Jonathan

@p6rt
Copy link
Author

p6rt commented Feb 11, 2009

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

@p6rt p6rt closed this as completed Feb 11, 2009
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