Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
RT #112362, arrays in hash and array slices
  • Loading branch information
moritz committed Apr 9, 2012
1 parent e33900b commit a3a3d3d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion S02-types/flattening.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 33;
plan 37;

{
my @array = 11 .. 15;
Expand Down Expand Up @@ -90,4 +90,15 @@ plan 33;
is(@a.elems, 5, 'Hash flattened');
}

# RT #112362
{
my @a = <a b c d e f>;
is @a[[3, 4], 0,], 'c a', '[] in array slice numifies (1)';
is @a[[3, 4]], 'c', '[] in array slice numifies (2)';

my %h = a => 1, b => 2, 'a b' => 3;
is %h{<a b>}, '1 2', 'hash slicing sanity';
is %h{[<a b>]}, '3', 'hash slicing stringifies []';
}

# vim: ft=perl6

0 comments on commit a3a3d3d

Please sign in to comment.