icsharpcode / NRefactory

NRefactory - Refactoring Your C# Code
684 stars 261 forks source link

Missing comma node during ArrayInitializerExpression parsing in Dictionary initialization #498

Open KvanTTT opened 9 years ago

KvanTTT commented 9 years ago

I parsed the following code:

int[] dict = new int[] { 3, 5 };

And got the following Node:

ArrayInitializerExpression: CSharpTokenNode ({) Expression (3) CSharpTokenNode (,) Expression (5) CSharpTokenNode (})

But when I parse the following code:

Dictionary<int, int> dict = new Dictionary<int, int>() { { 3, 5 } };

I get the following Node:

ArrayInitializerExpression: CSharpTokenNode ({) Expression (3) Expression (5) CSharpTokenNode (})