Skip to content

Commit

Permalink
merge D2 pull #992
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright committed Jun 11, 2012
1 parent 6a0269c commit 0963937
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/parse.c
Expand Up @@ -2742,7 +2742,15 @@ Initializer *Parser::parseInitializer()
if (comma == 1)
error("comma expected separating array initializers, not %s", token.toChars());
value = parseInitializer();
ia->addInit(NULL, value);
if (token.value == TOKcolon)
{
nextToken();
e = value->toExpression();
value = parseInitializer();
}
else
e = NULL;
ia->addInit(e, value);
comma = 1;
continue;

Expand Down

0 comments on commit 0963937

Please sign in to comment.