Skip to content

Commit

Permalink
Fix complaints about existing types
Browse files Browse the repository at this point in the history
Call typo_typename only if <typename> or <value> failed, not if
something else went wrong.

Resolves ½ of RT #127100.
  • Loading branch information
AlexDaniel committed Oct 7, 2017
1 parent c7a82d4 commit ac97a40
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Perl6/Grammar.nqp
Expand Up @@ -2943,7 +2943,9 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
<.ws>
[ <?before '-->' | ')' | ']' | '{' | ':'\s | ';;' > || <.malformed('parameter')> ]
{ $*IN_DECL := ''; }
[ '-->' <.ws> [[<typename>|<value>] <.ws> <?[ { ) ]> || <typo_typename(1)> || <.malformed('return value')>] ]?
[ '-->' <.ws> [ || [<typename>|<value>||<typo_typename(1)>] <.ws> <?[ { ) ]>
|| <.malformed('return value')>
] ]?
{ $*LEFTSIGIL := '@'; }
}
Expand Down

0 comments on commit ac97a40

Please sign in to comment.