Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
RT #76320, %$h coercion syntax
  • Loading branch information
moritz committed Apr 22, 2012
1 parent 2f0ccea commit 1858f90
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion S03-operators/context.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 29;
plan 32;

# L<S03/List prefix precedence/The list contextualizer>

Expand Down Expand Up @@ -88,4 +88,22 @@ eval_dies_ok('@', 'Anonymous @ variable outside of declaration');
eval_dies_ok('%', 'Anonymous % variable outside of declaration');
eval_dies_ok('&', 'Anonymous & variable outside of declaration');

# RT #76320
{
my $h = <a b c d>;
is ~%$h.keys.sort, 'a c', '%$var coercion';

my $c = 0;
$c++ for @$h;
is $c, 4, '@$var coercion';
}

#?rakudo skip '$@var syntax'
{
my @a = <a b c d>;
my $c = 0;
$c++ for $@a;
is $c, 1, '$@var itemization'
}

# vim: ft=perl6

0 comments on commit 1858f90

Please sign in to comment.