Is there an API that gets the type of a CollectionInitializer? I can call GetTypeInfo to get the type of an Expression or identifier or NumericLiteralExpression and for one element of a CollectionInitializer but not the type Roslyn would infer.
SemanticModel.GetTypeInfo(CollectionInitializer.Initializers(0)).Type
For example Dim I = {1,2.6} should yield a type of Double but using the code above I would get Integer.
I could run a loop and look at each element and then try to figure out what is the correct type but Roslyn knows, how do I get it to tell me?