This is an automatically generated mail to inform you that tests are now 
available in t/spec/S02-builtin_data_types/lists.t

commit f875d2ccaeddf929238237855d0f0cc57ec5a1e6
Author: kyle <k...@c213334d-75ef-0310-aa23-eaa082d1ae64>
Date:   Wed Nov 4 20:55:10 2009 +0000

    [t/spec] Test for RT #66304: list promoted to array when assigned to scalar
    
    git-svn-id: http://svn.pugscode.org/p...@28986 
c213334d-75ef-0310-aa23-eaa082d1ae64

diff --git a/t/spec/S02-builtin_data_types/lists.t 
b/t/spec/S02-builtin_data_types/lists.t
index f8fdf0d..6eda0bb 100644
--- a/t/spec/S02-builtin_data_types/lists.t
+++ b/t/spec/S02-builtin_data_types/lists.t
@@ -7,7 +7,7 @@ use Test;
 # for this test. See
 # L<"http://www.nntp.perl.org/group/perl.perl6.language/22924";>
 
-plan 21;
+plan *;
 
 # Indexing lists
 {
@@ -144,4 +144,23 @@ plan 21;
     is <1 2 3>.rt62836_x, 62836, 'call user-declared method in List:: class';
 }
 
+# RT #66304
+{
+    my $rt66304 = (1, 2, 4);
+    isa_ok $rt66304, List, 'List assigned to scalar is-a List';
+    #?rakudo 3 todo 'RT 66304'
+    is( $rt66304.WHAT, (1, 2, 4).WHAT,
+        'List.WHAT is the same as .WHAT of list assigned to scalar' );
+    dies_ok { $rt66304[1] = 'ro' }, 'literal List element is immutable';
+    is $rt66304, (1, 2, 4), 'List is not changed by attempted assignment';
+    
+    my $x = 44;
+    $rt66304 = ( 11, $x, 22 );
+    lives_ok { $rt66304[1] = 'rw' }, 'variable List element is mutable';
+    #?rakudo todo 'RT 66304'
+    is $x, 'rw', 'variable changed via assignment to list element';
+}
+
+done_testing;
+
 # vim: ft=perl6

Reply via email to