| Submitter | Ian Taylor |
|---|---|
| Date | Sept. 27, 2012, 5:41 a.m. |
| Message ID | <mcrbogsf2e7.fsf@google.com> |
| Download | mbox | patch |
| Permalink | /patch/187280/ |
| State | New |
| Headers | show |
Comments
Patch
diff -r f47f5449a663 go/parse.cc --- a/go/parse.cc Mon Sep 24 15:20:45 2012 -0700 +++ b/go/parse.cc Wed Sep 26 22:21:36 2012 -0700 @@ -2723,7 +2723,11 @@ } 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;