unexpected typename error when there are typenames in an expression

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-12-05 17:14:44 +01:00
parent 2eea7b03c0
commit 04a57d871e

View file

@ -1571,6 +1571,10 @@ static ast_expression* parse_expression_leave(parser_t *parser, bool stopatcomma
vec_pop(parser->pot);
wantop = true;
}
else if (parser->tok == TOKEN_TYPENAME) {
parseerror(parser, "unexpected typename");
goto onerr;
}
else if (parser->tok != TOKEN_OPERATOR) {
if (wantop) {
parseerror(parser, "expected operator or end of statement");