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 “Cannot modify an immutable X” error message also include the value? (42 = $x) #6267

Closed
p6rt opened this issue May 25, 2017 · 4 comments
Labels
LTA Less Than Awesome; typically an error message that could be better testneeded

Comments

@p6rt
Copy link

p6rt commented May 25, 2017

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

Searchable as RT131362$

@p6rt
Copy link
Author

p6rt commented May 25, 2017

From @AlexDaniel

Code​:
my $x; $x = 50; 42 = $x

Result​:
Cannot modify an immutable Int
  in block <unit> at -e line 1

So which one of the assignments actually failed (both are on the same line)?

This bug report is motivated by this thinkperl6 exercise​:

� We�ve seen that $n = 42 is legal. What about 42 = $n?

I think a good error message would be �Cannot modify an immutable Int (42)�, or whatever else which includes the value itself.

@p6rt
Copy link
Author

p6rt commented Jun 12, 2017

From @zoffixznet

Fixed in rakudo/rakudo@25d0430

Tests (in rakudo/t) needed.

@p6rt
Copy link
Author

p6rt commented Dec 12, 2017

@p6rt
Copy link
Author

p6rt commented Dec 12, 2017

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

@p6rt p6rt closed this as completed Dec 12, 2017
@p6rt p6rt added LTA Less Than Awesome; typically an error message that could be better testneeded labels Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTA Less Than Awesome; typically an error message that could be better testneeded
Projects
None yet
Development

No branches or pull requests

1 participant