Tweak handling of invalid function signature for function literal.

From-SVN: r167879
This commit is contained in:
Ian Lance Taylor 2010-12-15 22:42:30 +00:00
parent 97d2b65862
commit 73487f1ebc

View File

@ -2513,10 +2513,7 @@ Parse::function_lit()
Function_type* type = this->signature(NULL, location);
if (type == NULL)
{
this->block();
return Expression::make_error(location);
}
type = Type::make_function_type(NULL, NULL, NULL, location);
// For a function literal, the next token must be a '{'. If we
// don't see that, then we may have a type expression.