Message ID | mcr8w10vlba.fsf@google.com |
---|---|
State | New |
Headers | show |
diff -r 4cabf36880e8 go/parse.cc --- a/go/parse.cc Wed Nov 10 14:43:00 2010 -0800 +++ b/go/parse.cc Wed Nov 10 14:54:23 2010 -0800 @@ -2395,7 +2395,15 @@ vals->push_back(val); - val = this->expression(PRECEDENCE_NORMAL, false, true, NULL); + if (!token->is_op(OPERATOR_LCURLY)) + val = this->expression(PRECEDENCE_NORMAL, false, true, NULL); + else + { + // This must be a composite literal inside another + // composite literal, with the type omitted for the + // inner one. + val = this->composite_lit(type, depth + 1, token->location()); + } token = this->peek_token(); }