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

'++++$x' should die with error message #1747

Closed
p6rt opened this issue May 5, 2010 · 5 comments
Closed

'++++$x' should die with error message #1747

p6rt opened this issue May 5, 2010 · 5 comments

Comments

@p6rt
Copy link

p6rt commented May 5, 2010

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

Searchable as RT74912$

@p6rt
Copy link
Author

p6rt commented May 5, 2010

From @zhuomingliang

rakudo​: my $x =3; say ++++$x
rakudo 1eef08​: OUTPUT«5â�¤Â»

rakudo​: my $a = 2; $a++++.say;

rakudo 1eef08​: OUTPUT«Cannot assign to readonly valueâ�¤current
instr.​: '&die' pc 17868 (src/builtins/Junction.pir​:393)â�¤Â»

moritz_> it should die like this in the first place
moritz_> because ++$a returns should return an immutable integer

�此�你身��康�天天快�
��亮

 

@p6rt
Copy link
Author

p6rt commented Aug 11, 2010

@coke - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Oct 3, 2011

From @coke

On Wed May 05 02​:12​:50 2010, jimmy wrote​:

rakudo​: my $x =3; say ++++$x
rakudo 1eef08​: OUTPUT«5â�¤Â»

rakudo​: my $a = 2; $a++++.say;

rakudo 1eef08​: OUTPUT«Cannot assign to readonly valueâ�¤current
instr.​: '&die' pc 17868 (src/builtins/Junction.pir​:393)â�¤Â»

moritz_> it should die like this in the first place
moritz_> because ++$a returns should return an immutable integer

�此�你身��康�天天快�
��亮

14​:32 < [Coke]> rakudo​: my $x =3; say ++++$x
14​:32 <+p6eval> rakudo 356fe7​: OUTPUT«Cannot assign to a readonly
variable or a
  valueâ�¤ in sub prefix​:<++> at
src/gen/CORE.setting​:2241â�¤ in
  block <anon> at /tmp/ufoahxjRzU​:1â�¤ in <anon> at
  /tmp/ufoahxjRzU​:1â�¤â�¤Â»

needs tests.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Jan 6, 2012

From @moritz

now tested in S03-operators/increment.t

@p6rt
Copy link
Author

p6rt commented Jan 6, 2012

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

@p6rt p6rt closed this as completed Jan 6, 2012
@p6rt p6rt added the testneeded label Jan 5, 2020
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