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


According to the docs:
http://docs.perl6.org/type/Grammar#method_parse
"Method parse ... Returns a Match object on success, and Nil on failure."

 18:07 mr_ron m: grammar G { token TOP { a+ } }; my Nil $x = G.parse("zz")
 18:07 camelia rakudo-moar 273e89: OUTPUT«Type check failed in assignment to 
$x; expected Nil but got Any␤ in block <unit> at /tmp/HMNfyPJjvI:1␤␤»

 17:56 mr_ron m: grammar G { token TOP { a+ | <bs> }; token bs { b+ } }; say 
G.parse("zz").WHAT; say G.parse("aa")<bs>.WHAT
 17:56 camelia rakudo-moar 273e89: OUTPUT«(Any)␤Nil␤»

Then http://irclog.perlgeek.de/perl6/2015-11-03#i_11477014

Reply via email to