Skip Menu |
Report information
Id: 128846
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: lloyd.fourn [at] gmail.com
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Date: Fri, 05 Aug 2016 06:52:06 +0000
From: Lloyd Fournier <lloyd.fourn [...] gmail.com>
Subject: with statement modifier doesn't return writable values
To: "rakudobug [...] perl.org" <rakudobug [...] perl.org>
Download (untitled) / with headers
text/plain 204b

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

Download (untitled) / with headers
text/plain 103b
Changed it back to BUG based on discussion in http://irclog.perlgeek.de/perl6-dev/2016-09-22#i_13254335
Date: Thu, 22 Sep 2016 10:28:18 +0000
To: perl6-compiler [...] perl.org, bugs-bitbucket [...] rt.perl.org
Subject: Re: [perl #128846] with statement modifier doesn't return writable values
From: Lloyd Fournier <lloyd.fourn [...] gmail.com>
Download (untitled) / with headers
text/plain 756b
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:
Show quoted text
# 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.perl.org/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


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org