mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-16 10:00:39 +08:00
Tweak handling of invalid function signature for function literal.
From-SVN: r167879
This commit is contained in:
parent
97d2b65862
commit
73487f1ebc
@ -2513,10 +2513,7 @@ Parse::function_lit()
|
|||||||
|
|
||||||
Function_type* type = this->signature(NULL, location);
|
Function_type* type = this->signature(NULL, location);
|
||||||
if (type == NULL)
|
if (type == NULL)
|
||||||
{
|
type = Type::make_function_type(NULL, NULL, NULL, location);
|
||||||
this->block();
|
|
||||||
return Expression::make_error(location);
|
|
||||||
}
|
|
||||||
|
|
||||||
// For a function literal, the next token must be a '{'. If we
|
// For a function literal, the next token must be a '{'. If we
|
||||||
// don't see that, then we may have a type expression.
|
// don't see that, then we may have a type expression.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user