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

with statement modifier doesn't return writable values #5536

Open
p6rt opened this issue Aug 5, 2016 · 3 comments
Open

with statement modifier doesn't return writable values #5536

p6rt opened this issue Aug 5, 2016 · 3 comments
Labels
LTA Less Than Awesome; typically an error message that could be better

Comments

@p6rt
Copy link

p6rt commented Aug 5, 2016

Migrated from rt.perl.org#128846 (status was 'new')

Searchable as RT128846$

@p6rt
Copy link
Author

p6rt commented Aug 5, 2016

From @LLFourn

my $a = "foo"; ($a if $a) = "bar"; say $a # bar

my $a = "foo"; ($a with $a) = "bar"; say $a # Cannot modify an immutable Str

my $a = "foo"; ($_ with $a) = "bar"; say $a # Cannot modify an immutable Str

@p6rt
Copy link
Author

p6rt commented Sep 22, 2016

From @zoffixznet

Changed it back to BUG based on discussion in http://irclog.perlgeek.de/perl6-dev/2016-09-22#i_13254335

@p6rt
Copy link
Author

p6rt commented Sep 22, 2016

From @LLFourn

20​:21 < llfourn_> m​: my $a = "foo"; ($a andthen $_) = "bar"; say $a
20​:21 < camelia> rakudo-moar e9409c​: OUTPUT«Cannot modify an immutable Str␤
in block <unit> at <tmp> line 1␤␤»

andthen also has the same behaviour.

On Fri, Aug 5, 2016 at 4​:53 PM Lloyd Fournier <perl6-bugs-followup@​perl.org>
wrote​:

# New Ticket Created by Lloyd Fournier
# Please include the string​: [perl #​128846]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=128846 >

my $a = "foo"; ($a if $a) = "bar"; say $a # bar

my $a = "foo"; ($a with $a) = "bar"; say $a # Cannot modify an immutable
Str

my $a = "foo"; ($_ with $a) = "bar"; say $a # Cannot modify an immutable
Str

@p6rt p6rt added the LTA Less Than Awesome; typically an error message that could be better label 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
Projects
None yet
Development

No branches or pull requests

1 participant