develooper Front page | perl.perl6.compiler | Postings from May 2008

[perl #53814] Named/Positional dispatch confusion

Thread Next
From:
Stephen Weeks
Date:
May 7, 2008 05:13
Subject:
[perl #53814] Named/Positional dispatch confusion
# New Ticket Created by  Stephen Weeks 
# Please include the string:  [perl #53814]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=53814 >


Rakudo currently passes positional arguments into named parameters of
functions.  This is in violation of S06:748.

sub a (:$a) { say $a }

a(1);

Possibly related, this also does the wrong thing:

multi sub t ($a) { say 'one positional' }
multi sub t ($:a) { say 'one named' }

t(1);

Prints: "one named".

Thread Next


Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About