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

Can't assign to a variable inside a list. #2575

Closed
p6rt opened this issue Dec 5, 2011 · 4 comments
Closed

Can't assign to a variable inside a list. #2575

p6rt opened this issue Dec 5, 2011 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Dec 5, 2011

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

Searchable as RT105368$

@p6rt
Copy link
Author

p6rt commented Dec 5, 2011

From @coke

14​:09 < [Coke]> my $foo = 42; ($foo, "stuff")[0] = 24; say $foo;14​:10
< [Coke]> perl6​: my $foo = 42; ($foo, "stuff")[0] = 24; say $foo;14​:10
<+p6eval> pugs b927740​: OUTPUT«*** Can't modify constant item​: VRef
            <Scalar​:0x7f41cc366fa1>␤    at /tmp/g6RkzZzOIu line 1,
column                15-38␤»14​:10 <+p6eval> ..rakudo bef928​:
OUTPUT«Cannot assign to a readonly variable or                a value␤
 in block <anon> at /tmp/eROaY_J02E​:1␤  in <anon> at
/tmp/eROaY_J02E​:1␤»14​:10 <+p6eval> ..niecza v12-3-g193ca57​:
OUTPUT«24␤»14​:10 < [Coke]> b​: my $foo = 42; ($foo, "stuff")[0] = 24;
say $foo;
14​:10 <+p6eval> b 1b7dd1​: OUTPUT«24␤»

This is a nom regression from b; test is in t/spec/S02-types/lists.t

There are other regressions in the file which may be related.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Feb 10, 2012

From @jnthn

On Mon Dec 05 11​:15​:52 2011, coke wrote​:

14​:09 < [Coke]> my $foo = 42; ($foo, "stuff")[0] = 24; say $foo;14​:10
< [Coke]> perl6​: my $foo = 42; ($foo, "stuff")[0] = 24; say $foo;14​:10
<+p6eval> pugs b927740​: OUTPUT«*** Can't modify constant item​: VRef
            <Scalar​:0x7f41cc366fa1>␤    at /tmp/g6RkzZzOIu line 1,
column                15-38␤»14​:10 <+p6eval> ..rakudo bef928​:
OUTPUT«Cannot assign to a readonly variable or                a value␤
 in block <anon> at /tmp/eROaY_J02E​:1␤  in <anon> at
/tmp/eROaY_J02E​:1␤»14​:10 <+p6eval> ..niecza v12-3-g193ca57​:
OUTPUT«24␤»14​:10 < [Coke]> b​: my $foo = 42; ($foo, "stuff")[0] = 24;
say $foo;
14​:10 <+p6eval> b 1b7dd1​: OUTPUT«24␤»

This is a nom regression from b; test is in t/spec/S02-types/lists.t

There are other regressions in the file which may be related.

Now​:

my $foo = 42; ($foo, 'stuff')[0] = 24; say $foo;
24

Tests enabled, so resolving.

/jnthn

@p6rt
Copy link
Author

p6rt commented Feb 10, 2012

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

@p6rt
Copy link
Author

p6rt commented Feb 10, 2012

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

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