This project is read-only.
2

Resolved

No semantic info from an ArrayInitializerExpression

description

Let's say I have a statement such as this:
int[] arr = { 1, 2, 3 };
The InitializerExpressionSyntax node (with kind ArrayInitializerExpression) returns no type from the semantic model. However, with this statement:
int[] arr = new[] { 1, 2, 3 };
The ImplicitArrayCreationExpressionSyntax node returns the proper array type from the semantic model. If no type should be returned, I would at least think a converted type symbol should be returned.

comments

VSadov wrote May 1, 2014 at 11:39 PM

Fixed in changeset 0140e6b2da50a418f7c9bba2e4af5e69da50b0f6