Commit 73487f1e by Ian Lance Taylor

Tweak handling of invalid function signature for function literal.

From-SVN: r167879
parent 97d2b658
...@@ -2513,10 +2513,7 @@ Parse::function_lit() ...@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment