Commit 484d5dde by Ian Lance Taylor

compiler: Don't parse malformed receiver/parameters.

    
    Fixes golang/go#11576.
    
    Reviewed-on: https://go-review.googlesource.com/12157

From-SVN: r226185
parent 37aa341d
46117382a58843af60fc2feab68c433a96f79e79
e4a5e2b2a9dc556685db09421a95871f195f768b
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
......@@ -787,9 +787,11 @@ Parse::parameters(Typed_identifier_list** pparams, bool* is_varargs)
// The optional trailing comma is picked up in parameter_list.
if (!token->is_op(OPERATOR_RPAREN))
error_at(this->location(), "expected %<)%>");
else
this->advance_token();
{
error_at(this->location(), "expected %<)%>");
return false;
}
this->advance_token();
if (saw_error)
return false;
......
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