Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Catch undeclared symbol use in 'is' trait.
Fixes RT #125228.
  • Loading branch information
jnthn committed Jun 23, 2015
1 parent db71bf4 commit 6f8d25b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Perl6/Grammar.nqp
Expand Up @@ -2955,7 +2955,11 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
}

proto rule trait_mod { <...> }
rule trait_mod:sym<is> { <sym> [ [<longname><circumfix>**0..1] || <.panic: 'Invalid name'>] }
rule trait_mod:sym<is> {
:my %*MYSTERY;
<sym> [ [<longname><circumfix>**0..1] || <.panic: 'Invalid name'> ]
<.explain_mystery> <.cry_sorrows>
}
rule trait_mod:sym<hides> { <sym> [ <typename> || <.panic: 'Invalid typename'>] }
rule trait_mod:sym<does> { <sym> [ <typename> || <.panic: 'Invalid typename'>] }
rule trait_mod:sym<will> { <sym> [ <identifier> || <.panic: 'Invalid name'>] <pblock(1)> }
Expand Down

0 comments on commit 6f8d25b

Please sign in to comment.