> On 24 Dec 2016, at 07:01, Itsuki Toyota (via RT) 
> <perl6-bugs-follo...@perl.org> wrote:
> 
> # New Ticket Created by  Itsuki Toyota 
> # Please include the string:  [perl #130396]
> # in the subject line of all future correspondence about this issue. 
> # <URL: https://rt.perl.org/Ticket/Display.html?id=130396 >
> 
> 
> See the following results:
> 
> $ perl6 -e 'my @a = 1,2; my $b = @a.item; say $b =:= @a;'
> 
> False
> 
> $ perl6 -e 'my @a = 1,2; my $b = @a.item; $b.shift; say @a;'
> [2]
> 
> I think the 1st example should return True, because both $b and @a share the 
> same container.

No, they don’t share the same container.  The @a.item creates a new container, 
and the *assignment* to $b creates another new one.  Only if you would do my $b 
:= @a, would they share the same container:

$ perl6 -e 'my @a = 1,2; my $b := @a; say $b =:= @a;'
True


Rejecting this ticket as NOTABUG.

Reply via email to