1 instantiation of BoundCollectionExpression
Microsoft.CodeAnalysis.CSharp (1)
Generated\BoundNodes.xml.Generated.cs (1)
6469var result = new BoundCollectionExpression(this.Syntax, collectionTypeKind, placeholder, collectionCreation, collectionBuilderMethod, collectionBuilderInvocationPlaceholder, collectionBuilderInvocationConversion, wasTargetTyped, unconvertedCollectionExpression, elements, type, this.HasErrors);
53 references to BoundCollectionExpression
Microsoft.CodeAnalysis.CSharp (53)
Binder\Binder.ValueChecks.cs (3)
4331return HasLocalScope((BoundCollectionExpression)conversion.Operand) ? 4514private bool HasLocalScope(BoundCollectionExpression expr) 5108if (HasLocalScope((BoundCollectionExpression)conversion.Operand) && !SafeContext.CurrentMethod.IsConvertibleTo(escapeTo))
Binder\Binder_Attributes.cs (2)
875private TypedConstant VisitArrayCollectionExpression(TypeSymbol type, BoundCollectionExpression collection, BindingDiagnosticBag diagnostics, ref bool attrHasErrors, bool curArgumentHasErrors) 918return VisitArrayCollectionExpression(type, (BoundCollectionExpression)operand, diagnostics, ref attrHasErrors, curArgumentHasErrors);
Binder\Binder_Invocation.cs (1)
1746BoundCollectionExpression converted;
BoundTree\BoundNode.cs (2)
364BoundCollectionExpression { WasCompilerGenerated: true, UnconvertedCollectionExpression.IsParamsArrayOrCollection: true } or 365BoundConversion { Operand: BoundCollectionExpression { IsParamsArrayOrCollection: true } });
Compilation\CSharpSemanticModel.cs (1)
2165else if (boundExpr is BoundCollectionExpression convertedCollection)
FlowAnalysis\AbstractFlowPass.cs (1)
2068public override BoundNode VisitCollectionExpression(BoundCollectionExpression node)
FlowAnalysis\NullableWalker.cs (8)
3747public override BoundNode? VisitCollectionExpression(BoundCollectionExpression node) 3827TypeWithState convertCollection(BoundCollectionExpression node, TypeWithAnnotations targetCollectionType, ArrayBuilder<Func<TypeWithAnnotations, TypeWithState>> completions) 3854static NullableFlowState getResultState(BoundCollectionExpression node, CollectionExpressionTypeKind collectionKind) 3869(CollectionExpressionTypeKind, TypeWithAnnotations) getCollectionDetails(BoundCollectionExpression node, TypeSymbol collectionType) 4751BoundCollectionExpression { WasTargetTyped: true }; 7078elements = ((BoundCollectionExpression)((BoundConversion)argument).Operand).UnconvertedCollectionExpression.Elements.CastArray<BoundExpression>(); 8019var collection = (BoundCollectionExpression)argument;
FlowAnalysis\NullableWalker.DebugVerifier.cs (1)
117public override BoundNode? VisitCollectionExpression(BoundCollectionExpression node)
Generated\BoundNodes.xml.Generated.cs (10)
6465public BoundCollectionExpression Update(CollectionExpressionTypeKind collectionTypeKind, BoundObjectOrCollectionValuePlaceholder? placeholder, BoundExpression? collectionCreation, MethodSymbol? collectionBuilderMethod, BoundValuePlaceholder? collectionBuilderInvocationPlaceholder, BoundExpression? collectionBuilderInvocationConversion, bool wasTargetTyped, BoundUnconvertedCollectionExpression unconvertedCollectionExpression, ImmutableArray<BoundNode> elements, TypeSymbol type) 6469var result = new BoundCollectionExpression(this.Syntax, collectionTypeKind, placeholder, collectionCreation, collectionBuilderMethod, collectionBuilderInvocationPlaceholder, collectionBuilderInvocationConversion, wasTargetTyped, unconvertedCollectionExpression, elements, type, this.HasErrors); 9206return VisitCollectionExpression((BoundCollectionExpression)node, arg); 9509public virtual R VisitCollectionExpression(BoundCollectionExpression node, A arg) => this.DefaultVisit(node, arg); 9745public virtual BoundNode? VisitCollectionExpression(BoundCollectionExpression node) => this.DefaultVisit(node); 10529public override BoundNode? VisitCollectionExpression(BoundCollectionExpression node) 11814public override BoundNode? VisitCollectionExpression(BoundCollectionExpression node) 14077public override BoundNode? VisitCollectionExpression(BoundCollectionExpression node) 14086BoundCollectionExpression updatedNode; 16505public override TreeDumperNode VisitCollectionExpression(BoundCollectionExpression node, object? arg) => new TreeDumperNode("collectionExpression", null, new TreeDumperNode[]
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
1057public override BoundNode VisitCollectionExpression(BoundCollectionExpression node)
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (16)
20public override BoundNode? VisitCollectionExpression(BoundCollectionExpression node) 31private BoundExpression RewriteCollectionExpressionConversion(Conversion conversion, BoundCollectionExpression node) 99static bool useListOptimization(CSharpCompilation compilation, BoundCollectionExpression node) 133static BoundNode unwrapListElement(BoundCollectionExpression node, BoundNode element) 160private bool TryRewriteSingleElementSpreadToList(BoundCollectionExpression node, TypeWithAnnotations listElementType, [NotNullWhen(true)] out BoundExpression? result) 217private static bool CanOptimizeSingleSpreadAsCollectionBuilderArgument(BoundCollectionExpression node, [NotNullWhen(true)] out BoundExpression? spreadExpression) 235private BoundExpression VisitImmutableArrayCollectionExpression(BoundCollectionExpression node, TypeWithAnnotations elementType, MethodSymbol asImmutableArray) 246private BoundExpression VisitArrayOrSpanCollectionExpression(BoundCollectionExpression node, CollectionExpressionTypeKind collectionTypeKind, TypeSymbol collectionType, TypeWithAnnotations elementType) 332private BoundExpression VisitCollectionInitializerCollectionExpression(BoundCollectionExpression node, TypeSymbol collectionType) 394private BoundExpression VisitListInterfaceCollectionExpression(BoundCollectionExpression node) 459BoundExpression createArray(BoundCollectionExpression node, ArrayTypeSymbol arrayType) 468private BoundExpression VisitCollectionBuilderCollectionExpression(BoundCollectionExpression node) 630private static bool ShouldUseKnownLength(BoundCollectionExpression node, out int numberIncludingLastSpread) 657private BoundExpression? TryOptimizeSingleSpreadToArray(BoundCollectionExpression node, ArrayTypeSymbol arrayType) 719private BoundExpression CreateAndPopulateArray(BoundCollectionExpression node, ArrayTypeSymbol arrayType) 1021private BoundExpression CreateAndPopulateList(BoundCollectionExpression node, TypeWithAnnotations elementType, ImmutableArray<BoundNode> elements)
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (2)
62var rewrittenCollection = RewriteCollectionExpressionConversion(node.Conversion.UnderlyingConversions[0], (BoundCollectionExpression)node.Operand); 66return RewriteCollectionExpressionConversion(node.Conversion, (BoundCollectionExpression)node.Operand);
Operations\CSharpOperationFactory.cs (5)
104return CreateBoundCollectionExpression((BoundCollectionExpression)boundNode); 1223private ICollectionExpressionOperation CreateBoundCollectionExpression(BoundCollectionExpression expr) 1238static MethodSymbol? getConstructMethod(CSharpCompilation compilation, BoundCollectionExpression expr) 1258private IOperation CreateBoundCollectionExpressionElement(BoundCollectionExpression expr, BoundNode element) 1265private ISpreadOperation CreateBoundCollectionExpressionSpreadElement(BoundCollectionExpression expr, BoundCollectionExpressionSpreadElement element)