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


# this internally uses .push-at-least
$ 6 'my $l = gather { take-rw my $ = 1 }; $l.AT-POS(0) = 42'
Cannot modify an immutable Int
  in block <unit> at -e:1

# this internally uses .pull-one
$ 6 'my $l = gather { take-rw my $ = 1 }; for @$l { $_ = 42 }; dd $l.AT-POS(0)'
Int $var = 42

The former follows List!AT-POS-SLOWPATH, which in turn calls .push-at-least.  
The latter does a .pull-one.


There were some “is raw” missing, but not on the AT-POS’s that were encountered 
in this example.

Also considered that we would need to have a Mu on the $pulled in 
Iterator.push-at-least.


I also checked pushing to IterationBuffer:

$ 6 'my $b = IterationBuffer.new; my $a = 42; $b.push($a); dd $b[0] = 666'
Int $var = 666

So, I’m not sure anymore what TF is going on  :-(



Liz

Reply via email to