You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Left: IOperation: (OperationKind.None) (Syntax: 'Field') must be an IFieldReferenceExpression and
Left: IOperation: (OperationKind.None) (Syntax: 'Property') must be an IPropertyReferenceExpression
Similar code in VB does contain the field and property reference expressions on Left:
Friend Class [Class]
Public Field As Integer
Public Property Prop As Integer
Public Sub M()
Dim c = New [Class]() With {.Field = 0, .Prop = 0}
End Sub
End Class
There are couple of changes here:
1. API change: `ImmutableArray<ISymbolInitializer> MemberInitializers` is changed to `ImmutableArray<IOperation> Initializers`.
2. Implementation changes:
1. Instead of returning the member initializers as synthesized ISymbolInitializer nodes, we now return member intializers as IAssignmentExpression nodes. This ensures completeness of IOperation tree.
2. Now we also return the collection intializer expressions within an object creation expression.
Fixesdotnet#18115
There are 2 bugs still affecting this area:
1. dotnet#18781: IOperation API shape for collection initializer expressions
2. dotnet#19276: Missing Field/Property reference expression nodes in object creation initializer node
Expected:
Left: IOperation: (OperationKind.None) (Syntax: 'Field')
must be an IFieldReferenceExpression andLeft: IOperation: (OperationKind.None) (Syntax: 'Property')
must be an IPropertyReferenceExpressionSimilar code in VB does contain the field and property reference expressions on Left:
The text was updated successfully, but these errors were encountered: