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

glitch with anon vars causes incorrect Cannot assign to an immutable value error #6096

Closed
p6rt opened this issue Feb 24, 2017 · 4 comments
Closed

Comments

@p6rt
Copy link

p6rt commented Feb 24, 2017

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

Searchable as RT130855$

@p6rt
Copy link
Author

p6rt commented Feb 24, 2017

From @zoffixznet

Expected no errors, but in the first case it complains about assignment to immutable value even though none exist in the code.

  zoffix@​VirtualBox​:~$ perl6 -e 'm​: sub foo () {$ = 42}; for ^2000000 { $ = foo }; say now - INIT now'
  Cannot assign to an immutable value
  in block <unit> at -e line 1

  zoffix@​VirtualBox​:~$ MVM_SPESH_DISABLE=1 perl6 -e 'm​: sub foo () {$ = 42}; for ^2000000 { $ = foo }; say now - INIT now'
  2.6287172
  zoffix@​VirtualBox​:~$ perl6 --optimize=off -e 'm​: sub foo () {$ = 42}; for ^2000000 { $ = foo }; say now - INIT now'
  1.3881109
  zoffix@​VirtualBox​:~$ perl6 -e 'm​: sub foo () {$ = 42}; for ^2 { $ = foo }; say now - INIT now'
  0.00196070
  zoffix@​VirtualBox​:~$

@p6rt
Copy link
Author

p6rt commented Sep 6, 2017

From @jnthn

On Fri, 24 Feb 2017 15​:02​:23 -0800, cpan@​zoffix.com wrote​:

Expected no errors, but in the first case it complains about
assignment to immutable value even though none exist in the code.

zoffix@​VirtualBox​:~$ perl6 -e 'm​: sub foo () {$ = 42}; for ^2000000 {
$ = foo }; say now - INIT now'
Cannot assign to an immutable value
in block <unit> at -e line 1

Was fixed in spesh work last month or so; test now added to S04-declarations/state.t so we don't regress.

@p6rt
Copy link
Author

p6rt commented Sep 6, 2017

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

@p6rt
Copy link
Author

p6rt commented Sep 6, 2017

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

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