3 instantiations of BoundCollectionExpression
Microsoft.CodeAnalysis.CSharp (3)
Binder\Binder_Conversions.cs (2)
860return new BoundCollectionExpression( 2257return new BoundCollectionExpression(
Generated\BoundNodes.xml.Generated.cs (1)
6569var result = new BoundCollectionExpression(this.Syntax, collectionTypeKind, placeholder, collectionCreation, collectionBuilderMethod, collectionBuilderElementsPlaceholder, wasTargetTyped, hasWithElement, unconvertedCollectionExpression, elements, type, this.HasErrors);
73 references to BoundCollectionExpression
Microsoft.CodeAnalysis.CSharp (73)
Binder\Binder.ValueChecks.cs (3)
4604return GetCollectionExpressionSafeContext((BoundCollectionExpression)conversion.Operand); 4776private SafeContext GetCollectionExpressionSafeContext(BoundCollectionExpression expr) 5342var safeContext = GetCollectionExpressionSafeContext((BoundCollectionExpression)conversion.Operand);
Binder\Binder_Attributes.cs (2)
877private TypedConstant VisitArrayCollectionExpression(TypeSymbol type, BoundCollectionExpression collection, BindingDiagnosticBag diagnostics, ref bool attrHasErrors, bool curArgumentHasErrors) 920return VisitArrayCollectionExpression(type, (BoundCollectionExpression)operand, diagnostics, ref attrHasErrors, curArgumentHasErrors);
Binder\Binder_Conversions.cs (13)
243var collectionExpression = ConvertCollectionExpression( 827private BoundCollectionExpression ConvertCollectionExpression( 857private BoundCollectionExpression CreateCollectionExpression( 878public BoundCollectionExpression Convert() 899var result = TryConvertCollectionExpression(collectionTypeKind, elementType, constructor); 909private readonly BoundCollectionExpression? TryConvertCollectionExpression( 963private readonly BoundCollectionExpression? TryConvertCollectionExpressionImplementsIEnumerableType(MethodSymbol? constructor) 1149private readonly BoundCollectionExpression? TryConvertCollectionExpressionArrayOrSpanType( 1178private readonly BoundCollectionExpression? TryConvertCollectionExpressionArrayInterfaceType(ImmutableArray<BoundNode> elements) 1266private readonly BoundCollectionExpression? TryConvertCollectionExpressionBuilderType(ImmutableArray<BoundNode> elements) 2148internal static BoundExpression GetUnderlyingCollectionExpressionElement(BoundCollectionExpression expr, BoundExpression element, bool throwOnErrors) 2197else if (arg is BoundConversion { Operand: BoundCollectionExpression { Elements: [BoundExpression collectionElement] } }) 2230private BoundCollectionExpression BindCollectionExpressionForErrorRecovery(
Binder\Binder_Invocation.cs (1)
1871BoundCollectionExpression converted;
Binder\RefSafetyAnalysis.cs (1)
1311public override BoundNode? VisitCollectionExpression(BoundCollectionExpression node)
BoundTree\BoundNode.cs (2)
364BoundCollectionExpression { WasCompilerGenerated: true, UnconvertedCollectionExpression.IsParamsArrayOrCollection: true } or 365BoundConversion { Operand: BoundCollectionExpression { IsParamsArrayOrCollection: true } });
Compilation\CSharpSemanticModel.cs (1)
2176else if (boundExpr is BoundCollectionExpression convertedCollection)
FlowAnalysis\AbstractFlowPass.cs (1)
2074public override BoundNode VisitCollectionExpression(BoundCollectionExpression node)
FlowAnalysis\NullableWalker.cs (10)
3866public override BoundNode? VisitCollectionExpression(BoundCollectionExpression node) 3913Action<TypeSymbol>? visitCollectionCreationArguments(BoundCollectionExpression node) 4021void visitElement(BoundNode element, BoundCollectionExpression node, TypeWithAnnotations targetElementType, ArrayBuilder<Action<TypeWithAnnotations, TypeSymbol>> elementConversionCompletions) 4113BoundCollectionExpression node, 4154static NullableFlowState getResultState(BoundCollectionExpression node, CollectionExpressionTypeKind collectionKind) 4169(CollectionExpressionTypeKind, TypeWithAnnotations) getCollectionDetails(BoundCollectionExpression node, TypeSymbol collectionType) 5122BoundCollectionExpression { WasTargetTyped: true }; 7713elements = ((BoundCollectionExpression)((BoundConversion)argument).Operand).UnconvertedCollectionExpression.Elements.CastArray<BoundExpression>(); 8717var collection = (BoundCollectionExpression)argument;
FlowAnalysis\NullableWalker.DebugVerifier.cs (1)
117public override BoundNode? VisitCollectionExpression(BoundCollectionExpression node)
Generated\BoundNodes.xml.Generated.cs (10)
6565public BoundCollectionExpression Update(CollectionExpressionTypeKind collectionTypeKind, BoundObjectOrCollectionValuePlaceholder? placeholder, BoundExpression? collectionCreation, MethodSymbol? collectionBuilderMethod, BoundCollectionBuilderElementsPlaceholder? collectionBuilderElementsPlaceholder, bool wasTargetTyped, bool hasWithElement, BoundUnconvertedCollectionExpression unconvertedCollectionExpression, ImmutableArray<BoundNode> elements, TypeSymbol type) 6569var result = new BoundCollectionExpression(this.Syntax, collectionTypeKind, placeholder, collectionCreation, collectionBuilderMethod, collectionBuilderElementsPlaceholder, wasTargetTyped, hasWithElement, unconvertedCollectionExpression, elements, type, this.HasErrors); 9314return VisitCollectionExpression((BoundCollectionExpression)node, arg); 9619public virtual R VisitCollectionExpression(BoundCollectionExpression node, A arg) => this.DefaultVisit(node, arg); 9857public virtual BoundNode? VisitCollectionExpression(BoundCollectionExpression node) => this.DefaultVisit(node); 10649public override BoundNode? VisitCollectionExpression(BoundCollectionExpression node) 12064public override BoundNode? VisitCollectionExpression(BoundCollectionExpression node) 14362public override BoundNode? VisitCollectionExpression(BoundCollectionExpression node) 14370BoundCollectionExpression updatedNode; 16799public override TreeDumperNode VisitCollectionExpression(BoundCollectionExpression node, object? arg) => new TreeDumperNode("collectionExpression", null, new TreeDumperNode[]
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
1117public override BoundNode VisitCollectionExpression(BoundCollectionExpression node)
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (19)
18public override BoundNode? VisitCollectionExpression(BoundCollectionExpression node) 29private BoundExpression RewriteCollectionExpressionConversion(Conversion conversion, BoundCollectionExpression node) 108static bool useListOptimization(CSharpCompilation compilation, BoundCollectionExpression node) 142static BoundNode unwrapListElement(BoundCollectionExpression node, BoundNode element) 169private bool TryRewriteSingleElementSpreadToList(BoundCollectionExpression node, TypeWithAnnotations listElementType, [NotNullWhen(true)] out BoundExpression? result) 226private static bool CanOptimizeSingleSpreadAsCollectionBuilderArgument(BoundCollectionExpression node, [NotNullWhen(true)] out BoundExpression? spreadExpression) 250private BoundExpression VisitArrayOrSpanCollectionExpression(BoundCollectionExpression node, TypeSymbol collectionType) 288BoundExpression createImmutableArray(BoundCollectionExpression node, NamedTypeSymbol immutableArrayType) 318BoundExpression? tryCreateNonArrayBackedSpan(BoundCollectionExpression node, NamedTypeSymbol spanType, bool isReadOnlySpan) 358BoundExpression createSpan(BoundCollectionExpression node, NamedTypeSymbol spanType, bool isReadOnlySpan) 388BoundExpression createArray(BoundCollectionExpression node, ArrayTypeSymbol arrayType, bool targetsReadOnlyCollection) 419private BoundExpression VisitCollectionInitializerCollectionExpression(BoundCollectionExpression node, TypeSymbol collectionType) 481private BoundExpression VisitListInterfaceCollectionExpression(BoundCollectionExpression node) 565BoundExpression createArray(BoundCollectionExpression node, ArrayTypeSymbol arrayType) 579private BoundExpression VisitCollectionBuilderCollectionExpression(BoundCollectionExpression node) 726private static bool ShouldUseKnownLength(BoundCollectionExpression node, out int numberIncludingLastSpread) 756private BoundExpression? TryOptimizeSingleSpreadToArray_NoConversionApplied(BoundCollectionExpression node, bool targetsReadOnlyCollection, ArrayTypeSymbol arrayType) 825private BoundExpression CreateAndPopulateArray(BoundCollectionExpression node, ArrayTypeSymbol arrayType) 1156BoundCollectionExpression node,
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 (6)
103return CreateBoundCollectionExpression((BoundCollectionExpression)boundNode); 1238private ICollectionExpressionOperation CreateBoundCollectionExpression(BoundCollectionExpression expr) 1249static MethodSymbol? getConstructMethod(BoundCollectionExpression expr) 1269CSharpOperationFactory @this, BoundCollectionExpression expr) 1308private IOperation CreateBoundCollectionExpressionElement(BoundCollectionExpression expr, BoundNode element) 1315private ISpreadOperation CreateBoundCollectionExpressionSpreadElement(BoundCollectionExpression expr, BoundCollectionExpressionSpreadElement element)