# New Ticket Created by  Chris Fields 
# Please include the string:  [perl #58678]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58678 >


Rakudo, r30888.  When defining a grammar and regex, defining a regex  
after a grammar places the regex in the grammar namespace, but vice  
versa works fine.  Below is some demo code (switch the definition  
placements and comment out the check against Foo::Bar to see it  
magically work):

grammar Foo {
     rule TOP {\d+}
};

regex Bar {\d+};

# smart match against Foo may change based on RT 58676
'123' ~~ Foo;
say $/;

'1234' ~~ Foo::Bar; # works?!?
say $/;

'12345' ~~ Bar; # fails
say $/;



chris

Reply via email to