Permalink
Browse files

[t/spec] Tests for renaming parameters in the signature.

git-svn-id: http://svn.pugscode.org/pugs@25995 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent f4679a9 commit b2558b0183ffc28f69a878ae6eeb4d68a14454b1 jnthn committed Mar 25, 2009
Showing with 8 additions and 1 deletion.
  1. +8 −1 S06-signature/named-parameters.t
@@ -1,7 +1,7 @@
use v6;
use Test;
-plan 72;
+plan 74;
# L<S06/Required parameters/"Passing a named argument that cannot be bound to
# a normal subroutine is also a fatal error.">
@@ -209,4 +209,11 @@ ok(%fellowship<dwarf> ~~ undef, "dwarf arg was not given");
dies_ok({ typed_named("BBQ") }, 'and the type check is enforced');
}
+{
+ sub renames(:y($x)) { $x }
+ is(renames(:y(42)), 42, 'renaming of parameters works');
+ is(renames(y => 42), 42, 'renaming of parameters works');
+}
+
+
# vim: ft=perl6

0 comments on commit b2558b0

Please sign in to comment.