Skip to content

Commit 42df59c

Browse files
committed
Add tests for RT #77788
(one test fudged 'todo' for rakudo.moar)
1 parent 9c05ca0 commit 42df59c

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

S06-signature/named-parameters.t

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use v6;
22
use Test;
33

4-
plan 93;
4+
plan 95;
55

66
# L<S06/Required parameters/"Passing a named argument that cannot be bound to
77
# a normal subroutine is also a fatal error.">
@@ -302,4 +302,15 @@ eval-dies-ok 'sub svn28865( :$a, :@a ) {}',
302302
is named_empty(|%h), 42, 'can call function with empty named argument';
303303
}
304304

305+
# RT #77788
306+
{
307+
sub rt77788 (*%p) { %p<a> };
308+
is rt77788(a => 'b', a => 'c'), 'c',
309+
'can pass in several same-named arguments to sub, sigils other than "@" bind to last argument (1)';
310+
my %h = a => 'b';
311+
#?rakudo.moar todo 'RT #77788'
312+
is rt77788(|%h, a => 'c'), 'c',
313+
'can pass in several same-named arguments to sub, sigils other than "@" bind to last argument (2)';
314+
}
315+
305316
# vim: ft=perl6

0 commit comments

Comments
 (0)