Skip to content

Commit 1fa5f76

Browse files
author
Fitz Elliott
committed
[assign.t] add test for RT #74302 (assign list to a scalar and a hash)
1 parent d96889b commit 1fa5f76

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

S03-operators/assign.t

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use Test;
66
# V
77
# L<S03/Changes to Perl 5 operators/list assignment operator now parses on the right>
88

9-
plan 244;
9+
plan 246;
1010

1111

1212
# tests various assignment styles
@@ -147,6 +147,13 @@ plan 244;
147147
is(@b,'2 3',"'{\@b}' is '2 3'?: my (\$s,\@a) = 1 .. 3");
148148
}
149149

150+
# RT #74302
151+
{
152+
my ($a, %b) = "!", a => "1", b => "2", c => "3";
153+
is $a, "!", "got scalar in (scalar,hash) = list";
154+
is %b.keys.sort.join(", "), "a, b, c", "got hash in (scalar,hash) = list";
155+
}
156+
150157
#?rakudo skip 'assigning to array slices'
151158
{
152159
my @a;

0 commit comments

Comments
 (0)