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

.pairs elements of the shaped array are no longer writable (for @a.pairs -> $p { $p.value = 42 }) #5938

Closed
p6rt opened this issue Dec 29, 2016 · 7 comments

Comments

@p6rt
Copy link

p6rt commented Dec 29, 2016

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

Searchable as RT130440$

@p6rt
Copy link
Author

p6rt commented Dec 29, 2016

From @AlexDaniel

Code​:
my @​a[3;3]; for @​a.pairs -> $p { $p.value = $++ }; say @​a.perl

Result (2015.12,2016.10)​:
Array.new(​:shape(3, 3), [0, 1, 2], [3, 4, 5], [6, 7, 8])

Result (2016.11,HEAD)​:
Cannot modify an immutable Mu
in block <unit> at /tmp/kUSl3oiqTO line 1

Bisectable points to rakudo/rakudo@0f2566a

Not sure if the previous behavior was right, I'm just pointing out what was changed and what kind of code it could've broken (after all, somebody actually tried this on camelia).

@p6rt
Copy link
Author

p6rt commented Dec 29, 2016

From @AlexDaniel

Oh wait, there's more!

Code​:
my @​a[5] = 1, 2, 3, 4; for @​a.values <-> $a { $a = 42 }; say @​a

Result (2015.12,2016.10)
[42 42 42 42 42]

Result (2016.11,HEAD)​:
X​::TypeCheck​::Binding exception produced no message
  in block <unit> at /tmp/67YIIistWY line 1

On 2016-12-29 08​:32​:02, alex.jakimenko@​gmail.com wrote​:

Code​:
my @​a[3;3]; for @​a.pairs -> $p { $p.value = $++ }; say @​a.perl

Result (2015.12,2016.10)​:
Array.new(​:shape(3, 3), [0, 1, 2], [3, 4, 5], [6, 7, 8])

Result (2016.11,HEAD)​:
Cannot modify an immutable Mu
in block <unit> at /tmp/kUSl3oiqTO line 1

Bisectable points to
rakudo/rakudo@0f2566a

Not sure if the previous behavior was right, I'm just pointing out
what was changed and what kind of code it could've broken (after all,
somebody actually tried this on camelia).

@p6rt
Copy link
Author

p6rt commented Dec 29, 2016

From @lizmat

Fixed with dc7b688 , tests needed.

On 29 Dec 2016, at 17​:32, Aleks-Daniel Jakimenko-Aleksejev (via RT) <perl6-bugs-followup@​perl.org> wrote​:

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

Code​:
my @​a[3;3]; for @​a.pairs -> $p { $p.value = $++ }; say @​a.perl

Result (2015.12,2016.10)​:
Array.new(​:shape(3, 3), [0, 1, 2], [3, 4, 5], [6, 7, 8])

Result (2016.11,HEAD)​:
Cannot modify an immutable Mu
in block <unit> at /tmp/kUSl3oiqTO line 1

Bisectable points to rakudo/rakudo@0f2566a

Not sure if the previous behavior was right, I'm just pointing out what was changed and what kind of code it could've broken (after all, somebody actually tried this on camelia).

@p6rt
Copy link
Author

p6rt commented Dec 29, 2016

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

@p6rt
Copy link
Author

p6rt commented Dec 30, 2016

From @AlexDaniel

Another problem mentioned in the comment is not fixed. Want me to create another ticket for that?

On 2016-12-29 12​:32​:59, elizabeth wrote​:

Fixed with dc7b688 , tests needed.

On 29 Dec 2016, at 17​:32, Aleks-Daniel Jakimenko-Aleksejev (via RT)
<perl6-bugs-followup@​perl.org> wrote​:

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

Code​:
my @​a[3;3]; for @​a.pairs -> $p { $p.value = $++ }; say @​a.perl

Result (2015.12,2016.10)​:
Array.new(​:shape(3, 3), [0, 1, 2], [3, 4, 5], [6, 7, 8])

Result (2016.11,HEAD)​:
Cannot modify an immutable Mu
in block <unit> at /tmp/kUSl3oiqTO line 1

Bisectable points to
rakudo/rakudo@0f2566a

Not sure if the previous behavior was right, I'm just pointing out
what was changed and what kind of code it could've broken (after all,
somebody actually tried this on camelia).

@p6rt
Copy link
Author

p6rt commented Mar 2, 2017

From @zoffixznet

Tests in Raku/roast@1f5dead548

@p6rt p6rt closed this as completed Mar 2, 2017
@p6rt
Copy link
Author

p6rt commented Mar 2, 2017

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

@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