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


Version: Rakudo version 2017.08-14-gf097e551b built on MoarVM version
2017.08.1-32-gcd41322e
implementing Perl 6.c.

When running the attached script, the error output should be:
No such method 'hash' for invocant of type 'Matcher'

Instead, the error given is:
P6opaque: no such attribute '$!pos' in type Match when trying to get a value

Test case:

grammar Matcher {
    rule TOP { <hash> }
    proto rule atom {*}
    rule atom:sym<hash> { . }
}
Matcher.parse('x'); # Generates the wrong error.
'x' ~~ /<Matcher::TOP>/; # Generates the same error as above.
'x' ~~ /<Matcher::hash>/; # Generates the right error.

Reply via email to