# New Ticket Created by  Elizabeth Mattijsen 
# Please include the string:  [perl #126312]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=126312 >


$ 6 'my Int @a; @a[5] = 42; $_ = 666 for @a'
Cannot assign to an immutable value
  in block <unit> at -e:1

[23:11:32]  <lizmat>    .tell jnthn my Int @a; @a[5] = 42; $_ = 666 for @a 
fails because it gets an IterationBuffer as target, not an 
ArrayReificationTarget
[23:12:26]  <lizmat>    .tell the IterationBuffer doesn't have a descriptor

So I think it could be a code gen issue.  And is my previous fix for:

$ 6 'my Int @a; @a[5] = 42; .say for @a'
(Int)
(Int)
(Int)
(Int)
(Int)
42

basically wrong, as we don’t have typed lists (and those (Int) are appearing 
there because I took the .of of the given list, which gives the right type, but 
no descriptor.  In other words, for the @a case, it should never wind up in the 
List iterator anyway?



Liz

Reply via email to