Author: moritz
Date: 2009-10-21 00:15:32 +0200 (Wed, 21 Oct 2009)
New Revision: 28865

Modified:
   docs/Perl6/Spec/S06-routines.pod
Log:
[S06] extend uniq name constraint to named parameters too

Modified: docs/Perl6/Spec/S06-routines.pod
===================================================================
--- docs/Perl6/Spec/S06-routines.pod    2009-10-20 22:03:48 UTC (rev 28864)
+++ docs/Perl6/Spec/S06-routines.pod    2009-10-20 22:15:32 UTC (rev 28865)
@@ -503,10 +503,16 @@
 possible on those arguments that are bound to a final slurpy or
 arglist variable.)
 
-All positional parameters must either have a unique name (sigil included)
+All parameters must either have a unique name (sigil included)
 or be anonymous. Declaring a routine having two positionals with exactly
-the same name counts as a compile-time error.
+the same name counts as a compile-time error. Renaming a named parameter
+can also cause forbidden name collisions:
 
+    :($a, $a)       # wrong, two a
+    :($a, :a($b))   # wrong, one a, one a through renaming
+    :($a, :a(@b))   # wrong 
+    :(:$a, :@a)     # wrong
+
 =head2 Named arguments
 
 Named arguments are recognized syntactically at the "comma" level.

Reply via email to