Permalink
Browse files

[t/spec] test based on spec r28870

git-svn-id: http://svn.pugscode.org/pugs@28871 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent 8ebc55e commit 2ed580ff17e228731eeb825952ff5530f6e05a70 kyle committed Oct 21, 2009
Showing with 11 additions and 1 deletion.
  1. +11 −1 S06-signature/named-parameters.t
View
12 S06-signature/named-parameters.t
@@ -212,7 +212,7 @@ ok(%fellowship<dwarf> ~~ undef, "dwarf arg was not given");
dies_ok { renames(:x(23)) }, 'old name is not available';
}
-# L<06/Parameters and arguments/"All parameters must either have a unique name">
+# L<06/Parameters and arguments/"A signature containing a name collision">
#?rakudo todo 'RT #68086'
eval_dies_ok 'sub rt68086( $a, $a ) { }', 'two sub params with the same name';
@@ -225,6 +225,16 @@ eval_dies_ok 'sub svn28865( $a, :a(@b) ) {}',
eval_dies_ok 'sub svn28865( :$a, :@a ) {}',
'sub params with the same name and different types';
+{
+ sub svn28870( $a, @a ) { return ( $a, +@a ) }
+
+ my $item = 'bughunt';
+ my @many = ( 22, 'twenty-two', 47 );
+
+ is( svn28870( $item, @many ), ( 'bughunt', 3 ),
+ 'call to sub with position params of same name and different type' );
+}
+
# RT #68524
{
sub rt68524( :$a! ) {}

0 comments on commit 2ed580f

Please sign in to comment.