# New Ticket Created by  Sam S. 
# Please include the string:  [perl #127872]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=127872 >


The following fails to compile with "Undeclared routine: regex":

    my token foo (&another-regex) { <&another-regex> };

Since routine arguments are supposed to become available to the routine body as 
lexical symbols, and <&foo> is the regex syntax for calling another regex by 
its lexical name, I assume this error is a bug.


For comparison, the following two variations do compile and work just fine:

    my token foo ($another-regex) { $another-regex };

    my token foo (&another-regex) { {say &another-regex} };


(This is Rakudo version 2016.03-108-g98b5b8c built on MoarVM version 
2016.03-104-g10d3971
implementing Perl 6.c.)

Reply via email to