compiler: Better error for missing comma in composite literal.
From-SVN: r191796
This commit is contained in:
parent
9c25bd1a06
commit
7c28a6b710
|
@ -2723,7 +2723,11 @@ Parse::composite_lit(Type* type, int depth, Location location)
|
|||
}
|
||||
else
|
||||
{
|
||||
error_at(this->location(), "expected %<,%> or %<}%>");
|
||||
if (token->is_op(OPERATOR_SEMICOLON))
|
||||
error_at(this->location(),
|
||||
"need trailing comma before newline in composite literal");
|
||||
else
|
||||
error_at(this->location(), "expected %<,%> or %<}%>");
|
||||
|
||||
this->gogo_->mark_locals_used();
|
||||
int depth = 0;
|
||||
|
|
Loading…
Reference in New Issue