2362 references to BoundKind
Microsoft.CodeAnalysis.CSharp (2362)
Binder\Binder.cs (1)
873RoslynDebug.Assert(statement.Kind != BoundKind.StatementList);
Binder\Binder.ValueChecks.cs (226)
485case BoundKind.PropertyGroup: 495case BoundKind.Local: 499case BoundKind.OutVariablePendingInference: 500case BoundKind.OutDeconstructVarPendingInference: 504case BoundKind.DiscardExpression: 508case BoundKind.PropertyAccess: 530case BoundKind.IndexerAccess: 534case BoundKind.ImplicitIndexerAccess: 552case BoundKind.UnconvertedObjectCreationExpression: 559case BoundKind.UnconvertedCollectionExpression: 566case BoundKind.PointerIndirectionOperator: 574case BoundKind.PointerElementAccess: 589if (expr.Kind == BoundKind.MethodGroup && valueKind != BindValueKind.RValueOrMethodGroup) 614if ((object)otherSymbol != null && receiver?.Kind == BoundKind.TypeOrValueExpression) 653case BoundKind.TypeOrValueExpression: 654case BoundKind.QueryClause when ((BoundQueryClause)expression).Value.Kind == BoundKind.TypeOrValueExpression: 686case BoundKind.PropertyAccess: 687case BoundKind.IndexerAccess: 688case BoundKind.ImplicitIndexerAccess when ((BoundImplicitIndexerAccess)expr).IndexerOrSliceAccess.Kind == BoundKind.IndexerAccess: 691case BoundKind.EventAccess: 711case BoundKind.NamespaceExpression: 716case BoundKind.TypeExpression: 721case BoundKind.Lambda: 722case BoundKind.UnboundLambda: 727case BoundKind.UnconvertedAddressOfOperator: 732case BoundKind.MethodGroup when valueKind == BindValueKind.AddressOf: 737case BoundKind.MethodGroup: 743case BoundKind.RangeVariable: 759case BoundKind.Conversion: 770case BoundKind.ArrayAccess: 774case BoundKind.PointerIndirectionOperator: 776case BoundKind.RefValueOperator: 778case BoundKind.DynamicMemberAccess: 779case BoundKind.DynamicIndexerAccess: 780case BoundKind.DynamicObjectInitializerMember: 792case BoundKind.PointerElementAccess: 809case BoundKind.Parameter: 813case BoundKind.Local: 817case BoundKind.ThisReference: 845case BoundKind.ImplicitReceiver: 846case BoundKind.ObjectOrCollectionValuePlaceholder: 850case BoundKind.Call: 854case BoundKind.FunctionPointerInvocation: 862case BoundKind.ImplicitIndexerAccess: 876case BoundKind.InlineArrayAccess: 898case BoundKind.ImplicitIndexerReceiverPlaceholder: 901case BoundKind.DeconstructValuePlaceholder: 904case BoundKind.ConditionalOperator: 924case BoundKind.FieldAccess: 930case BoundKind.AssignmentOperator: 941case BoundKind.ValuePlaceholder: 993case BoundKind.NamespaceExpression: 996case BoundKind.TypeExpression: 1608return Flags.Includes(BinderFlags.ObjectInitializerMember) && receiver.Kind == BoundKind.ObjectOrCollectionValuePlaceholder || 1772ReportDiagnosticsIfObsolete(diagnostics, setMethod, node, receiver?.Kind == BoundKind.BaseReference); 1822ReportDiagnosticsIfObsolete(diagnostics, getMethod, node, receiver?.Kind == BoundKind.BaseReference); 1905if (receiverOpt?.Kind == BoundKind.BaseReference && member.IsAbstract) 2318if (argument.Kind == BoundKind.ArgListOperator) 3345case BoundKind.ArrayAccess: 3346case BoundKind.PointerIndirectionOperator: 3347case BoundKind.PointerElementAccess: 3351case BoundKind.RefValueOperator: 3357case BoundKind.DiscardExpression: 3361case BoundKind.DynamicMemberAccess: 3362case BoundKind.DynamicIndexerAccess: 3368case BoundKind.Parameter: 3371case BoundKind.Local: 3374case BoundKind.CapturedReceiverPlaceholder: 3378case BoundKind.ThisReference: 3383case BoundKind.ConditionalOperator: 3396case BoundKind.FieldAccess: 3399case BoundKind.EventAccess: 3418case BoundKind.Call: 3440case BoundKind.FunctionPointerInvocation: 3462case BoundKind.IndexerAccess: 3479case BoundKind.ImplicitIndexerAccess: 3527case BoundKind.InlineArrayAccess: 3555case BoundKind.PropertyAccess: 3570case BoundKind.AssignmentOperator: 3581case BoundKind.Conversion: 3588case BoundKind.UnaryOperator: 3595case BoundKind.BinaryOperator: 3602case BoundKind.UserDefinedConditionalLogicalOperator: 3608case BoundKind.CompoundAssignmentOperator: 3660case BoundKind.ArrayAccess: 3661case BoundKind.PointerIndirectionOperator: 3662case BoundKind.PointerElementAccess: 3666case BoundKind.RefValueOperator: 3677case BoundKind.DiscardExpression: 3681case BoundKind.DynamicMemberAccess: 3682case BoundKind.DynamicIndexerAccess: 3688case BoundKind.Parameter: 3692case BoundKind.Local: 3696case BoundKind.CapturedReceiverPlaceholder: 3704case BoundKind.ThisReference: 3709case BoundKind.ConditionalOperator: 3721case BoundKind.FieldAccess: 3725case BoundKind.EventAccess: 3735case BoundKind.Call: 3761case BoundKind.IndexerAccess: 3787case BoundKind.ImplicitIndexerAccess: 3848case BoundKind.InlineArrayAccess: 3880case BoundKind.FunctionPointerInvocation: 3904case BoundKind.PropertyAccess: 3929case BoundKind.AssignmentOperator: 3946case BoundKind.Conversion: 3958case BoundKind.UnaryOperator: 3965case BoundKind.BinaryOperator: 3972case BoundKind.UserDefinedConditionalLogicalOperator: 3978case BoundKind.CompoundAssignmentOperator: 3985case BoundKind.ThrowExpression: 4048case BoundKind.ThisReference: 4052case BoundKind.DefaultLiteral: 4053case BoundKind.DefaultExpression: 4054case BoundKind.Utf8String: 4058case BoundKind.Parameter: 4061case BoundKind.FromEndIndexExpression: 4066case BoundKind.TupleLiteral: 4067case BoundKind.ConvertedTupleLiteral: 4071case BoundKind.MakeRefOperator: 4072case BoundKind.RefValueOperator: 4078case BoundKind.DiscardExpression: 4081case BoundKind.DeconstructValuePlaceholder: 4082case BoundKind.InterpolatedStringArgumentPlaceholder: 4083case BoundKind.AwaitableValuePlaceholder: 4086case BoundKind.Local: 4089case BoundKind.CapturedReceiverPlaceholder: 4094case BoundKind.StackAllocArrayCreation: 4095case BoundKind.ConvertedStackAllocExpression: 4098case BoundKind.ConditionalOperator: 4113case BoundKind.NullCoalescingOperator: 4119case BoundKind.FieldAccess: 4132case BoundKind.Call: 4148case BoundKind.FunctionPointerInvocation: 4163case BoundKind.IndexerAccess: 4180case BoundKind.ImplicitIndexerAccess: 4221case BoundKind.InlineArrayAccess: 4241case BoundKind.PropertyAccess: 4256case BoundKind.ObjectCreationExpression: 4281case BoundKind.NewT: 4296case BoundKind.WithExpression: 4302case BoundKind.UnaryOperator: 4320case BoundKind.Conversion: 4373case BoundKind.AssignmentOperator: 4380case BoundKind.NullCoalescingAssignmentOperator: 4383case BoundKind.IncrementOperator: 4386case BoundKind.CompoundAssignmentOperator: 4406case BoundKind.BinaryOperator: 4426case BoundKind.RangeExpression: 4432case BoundKind.UserDefinedConditionalLogicalOperator: 4446case BoundKind.QueryClause: 4449case BoundKind.RangeVariable: 4452case BoundKind.ObjectInitializerExpression: 4456case BoundKind.CollectionInitializerExpression: 4460case BoundKind.CollectionElementInitializer: 4464case BoundKind.ObjectInitializerMember: 4470case BoundKind.ImplicitReceiver: 4471case BoundKind.ObjectOrCollectionValuePlaceholder: 4476case BoundKind.InterpolatedStringHandlerPlaceholder: 4481case BoundKind.DisposableValuePlaceholder: 4486case BoundKind.PointerElementAccess: 4487case BoundKind.PointerIndirectionOperator: 4491case BoundKind.AsOperator: 4492case BoundKind.AwaitExpression: 4493case BoundKind.ConditionalAccess: 4494case BoundKind.ConditionalReceiver: 4495case BoundKind.ArrayAccess: 4499case BoundKind.ConvertedSwitchExpression: 4500case BoundKind.UnconvertedSwitchExpression: 4595if (expr.Kind == BoundKind.AssignmentOperator) 4745case BoundKind.ThisReference: 4750case BoundKind.DefaultLiteral: 4751case BoundKind.DefaultExpression: 4752case BoundKind.Utf8String: 4756case BoundKind.Parameter: 4759case BoundKind.TupleLiteral: 4760case BoundKind.ConvertedTupleLiteral: 4764case BoundKind.MakeRefOperator: 4765case BoundKind.RefValueOperator: 4769case BoundKind.DiscardExpression: 4773case BoundKind.DeconstructValuePlaceholder: 4774case BoundKind.AwaitableValuePlaceholder: 4775case BoundKind.InterpolatedStringArgumentPlaceholder: 4783case BoundKind.Local: 4792case BoundKind.CapturedReceiverPlaceholder: 4797case BoundKind.StackAllocArrayCreation: 4798case BoundKind.ConvertedStackAllocExpression: 4806case BoundKind.UnconvertedConditionalOperator: 4814case BoundKind.ConditionalOperator: 4830case BoundKind.NullCoalescingOperator: 4835case BoundKind.FieldAccess: 4848case BoundKind.Call: 4869case BoundKind.FunctionPointerInvocation: 4888case BoundKind.IndexerAccess: 4909case BoundKind.ImplicitIndexerAccess: 4960case BoundKind.InlineArrayAccess: 4984case BoundKind.PropertyAccess: 5003case BoundKind.ObjectCreationExpression: 5039case BoundKind.NewT: 5060case BoundKind.WithExpression: 5071case BoundKind.UnaryOperator: 5093case BoundKind.FromEndIndexExpression: 5097case BoundKind.Conversion: 5161case BoundKind.AssignmentOperator: 5165case BoundKind.NullCoalescingAssignmentOperator: 5169case BoundKind.IncrementOperator: 5173case BoundKind.CompoundAssignmentOperator: 5197case BoundKind.BinaryOperator: 5226case BoundKind.RangeExpression: 5236case BoundKind.UserDefinedConditionalLogicalOperator: 5254case BoundKind.QueryClause: 5258case BoundKind.RangeVariable: 5262case BoundKind.ObjectInitializerExpression: 5268case BoundKind.CollectionInitializerExpression: 5274case BoundKind.CollectionElementInitializer: 5278case BoundKind.PointerElementAccess: 5282case BoundKind.PointerIndirectionOperator: 5286case BoundKind.AsOperator: 5287case BoundKind.AwaitExpression: 5288case BoundKind.ConditionalAccess: 5289case BoundKind.ConditionalReceiver: 5290case BoundKind.ArrayAccess: 5294case BoundKind.UnconvertedSwitchExpression: 5295case BoundKind.ConvertedSwitchExpression:
Binder\Binder_Attributes.cs (5)
814case BoundKind.FieldAccess: 819case BoundKind.PropertyAccess: 864case BoundKind.Conversion: 866case BoundKind.TypeOfOperator: 868case BoundKind.ArrayCreation:
Binder\Binder_Await.cs (4)
78if (expression.Kind != BoundKind.Call || 340if (getAwaiterCall.Kind != BoundKind.Call) 379if (qualified.Kind != BoundKind.PropertyAccess) 447if (getAwaiterGetResultCall.Kind != BoundKind.Call)
Binder\Binder_Conversions.cs (4)
138if (conversion.IsAnonymousFunction && source.Kind == BoundKind.UnboundLambda) 209if (source.Kind == BoundKind.UnconvertedSwitchExpression) 231if (source.Kind == BoundKind.UnconvertedCollectionExpression) 253if (source.Kind == BoundKind.UnconvertedConditionalOperator)
Binder\Binder_Deconstruct.cs (9)
212if (boundRHS.Kind == BoundKind.TupleLiteral) 371case BoundKind.DeconstructionVariablePendingInference: 376case BoundKind.DiscardExpression: 406case BoundKind.DeconstructionVariablePendingInference: 410case BoundKind.DiscardExpression: 488if (element.Kind == BoundKind.TupleLiteral) 597if (expression.Kind == BoundKind.DiscardExpression) 661if (memberAccess.Kind != BoundKind.MethodGroup) 792if (expression == null && checkedVariable.Kind != BoundKind.DiscardExpression)
Binder\Binder_Expressions.cs (71)
200BoundKind exprKind = expr.Kind; 202if (expr.HasAnyErrors && ((object)resultType != null || exprKind == BoundKind.UnboundLambda || exprKind == BoundKind.DefaultLiteral)) 207if (exprKind == BoundKind.BadExpression) 254if (valueOrType.Kind == BoundKind.TypeExpression) 411Debug.Assert(expr.Kind is BoundKind.UnboundLambda or BoundKind.MethodGroup); 539if (expr.Kind == BoundKind.ArgListOperator) 581if (IsEarlyAttributeBinder && result.Kind == BoundKind.MethodGroup && (!IsInsideNameof || EnclosingNameofArgument != node)) 2727if (operand.Kind == BoundKind.UnboundLambda) 2776case BoundKind.MethodGroup: 2786case BoundKind.TupleLiteral: 2810case BoundKind.StackAllocArrayCreation: 2816case BoundKind.UnconvertedConditionalOperator when operand.Type is null: 2817case BoundKind.UnconvertedSwitchExpression when operand.Type is null: 2822case BoundKind.UnconvertedCollectionExpression: 2827case BoundKind.UnconvertedAddressOfOperator: 3073case BoundKind.PropertyAccess: 3074case BoundKind.IndexerAccess: 3529else if (argument.Kind == BoundKind.OutVariablePendingInference) 3533else if (argument.Kind == BoundKind.OutDeconstructVarPendingInference) 3537else if (argument.Kind == BoundKind.DiscardExpression && !argument.HasExpressionType()) 3573(BoundKind.OutVariablePendingInference or BoundKind.OutDeconstructVarPendingInference or BoundKind.DiscardExpression or BoundKind.ArgListOperator)); 5379else if (argument.Kind == BoundKind.MethodGroup) 5816if (boundMember.Kind == BoundKind.PropertyGroup) 5858BoundKind boundMemberKind = boundMember.Kind; 5870case BoundKind.FieldAccess: 5887case BoundKind.EventAccess: 5890case BoundKind.PropertyAccess: 5894case BoundKind.IndexerAccess: 5928case BoundKind.ImplicitIndexerAccess: 5939case BoundKind.DynamicObjectInitializerMember: 5942case BoundKind.DynamicIndexerAccess: 5952case BoundKind.ArrayAccess: 5953case BoundKind.PointerElementAccess: 6447if (addMethodInvocation.Kind == BoundKind.DynamicInvocation) 6458else if (addMethodInvocation.Kind == BoundKind.Call) 6487Debug.Assert(addMethodInvocation.Kind == BoundKind.BadExpression); 6966case BoundKind.ObjectCreationExpression: 6972case BoundKind.BadExpression: 7449if (boundValue.Kind == BoundKind.Conversion) 7641if (boundLeft.Kind == BoundKind.UnboundLambda) 7688case BoundKind.NamespaceExpression: 7698case BoundKind.TypeExpression: 7708case BoundKind.TypeOrValueExpression: 7718if (boundLeft.Kind == BoundKind.Literal && ((BoundLiteral)boundLeft).ConstantValueOpt == ConstantValue.Null) 7891case BoundKind.MethodGroup: 7913case BoundKind.PropertyGroup: 7946bool leftIsBaseReference = boundLeft.Kind == BoundKind.BaseReference; 8037if (boundLeft.HasAnyErrors && boundLeft.Kind != BoundKind.TypeOrValueExpression) 8059else if (boundLeft.Kind == BoundKind.TypeExpression || 8060boundLeft.Kind == BoundKind.BaseReference || 8276ReportDiagnosticsIfObsolete(diagnostics, symbol, node, hasBaseReceiver: left.Kind == BoundKind.BaseReference); 8679ReportDiagnosticsIfObsolete(diagnostics, propertySymbol, node, hasBaseReceiver: receiver?.Kind == BoundKind.BaseReference); 8784case BoundKind.PreviousSubmissionReference: 8787case BoundKind.TypeExpression: 8789case BoundKind.QueryClause: 8980if (receiver.Kind == BoundKind.PropertyGroup) 9395if (index.Kind == BoundKind.OutVariablePendingInference) 9399else if (index.Kind == BoundKind.DiscardExpression && !index.HasExpressionType()) 9587LookupOptions lookupOptions = expr.Kind == BoundKind.BaseReference ? LookupOptions.UseBaseReferenceAccessibility : LookupOptions.Default; 9701BoundKind receiverKind = receiver.Kind; 9702if (receiverKind == BoundKind.BaseReference) 9707else if (receiverKind == BoundKind.TypeOrValueExpression) 9843ReportDiagnosticsIfObsolete(diagnostics, property, syntax, hasBaseReceiver: receiver != null && receiver.Kind == BoundKind.BaseReference); 9853if (!gotError && receiver != null && receiver.Kind == BoundKind.ThisReference && receiver.WasCompilerGenerated) 10958if (access.Kind == BoundKind.MethodGroup) 11117if (receiver.Kind == BoundKind.UnboundLambda)
Binder\Binder_Initializers.cs (2)
268if (statement.Kind == BoundKind.LabeledStatement) 271while (labeledStatementBody.Kind == BoundKind.LabeledStatement)
Binder\Binder_Invocation.cs (40)
107if (!allowFieldsAndProperties && (boundExpression.Kind == BoundKind.FieldAccess || boundExpression.Kind == BoundKind.PropertyAccess)) 112if (boundExpression.Kind == BoundKind.FieldAccess) 124Debug.Assert(allowFieldsAndProperties || boundExpression.Kind is (BoundKind.MethodGroup or BoundKind.BadExpression)); 129Debug.Assert(!args.Any(static e => e.Kind == BoundKind.OutVariablePendingInference || 130e.Kind == BoundKind.OutDeconstructVarPendingInference || 131e.Kind == BoundKind.DiscardExpression && !e.HasExpressionType())); 145if (queryClause != null && result.Kind == BoundKind.DynamicInvocation) 161if (boundExpression.Kind == BoundKind.FieldAccess) 246string name = boundExpression.Kind == BoundKind.MethodGroup ? GetName(node.Expression) : null; 274if (argument.Kind == BoundKind.OutVariablePendingInference) 350else if (boundExpression.Kind == BoundKind.MethodGroup) 402if (expression.Kind == BoundKind.MethodGroup) 412case BoundKind.BaseReference: 417case BoundKind.ThisReference: 440case BoundKind.TypeOrValueExpression: 585if (arg.Kind == BoundKind.Lambda || arg.Kind == BoundKind.UnboundLambda) 591else if (arg.Kind == BoundKind.MethodGroup) 597else if (arg.Kind == BoundKind.ArgListOperator) 1042case BoundKind.Call: 1056else if (call.ReceiverOpt.Kind == BoundKind.BaseReference && this.ContainingType.IsRestrictedType()) 1064case BoundKind.DynamicInvocation: 1077case BoundKind.FunctionPointerInvocation: 1265if (!gotError && method.RequiresInstanceReceiver && receiver != null && receiver.Kind == BoundKind.ThisReference && receiver.WasCompilerGenerated) 1281bool hasBaseReceiver = receiver != null && receiver.Kind == BoundKind.BaseReference; 1837case BoundKind.TypeOrValueExpression: 1863case BoundKind.QueryClause: 1901if ((object)expr != null && expr.Kind != BoundKind.TypeExpression) 2016case BoundKind.UnboundLambda: 2051case BoundKind.OutVariablePendingInference: 2052case BoundKind.DiscardExpression: 2060if (argument.Kind == BoundKind.OutVariablePendingInference) 2071else if (argument.Kind == BoundKind.DiscardExpression) 2085case BoundKind.OutDeconstructVarPendingInference: 2090case BoundKind.Parameter: 2091case BoundKind.Local: 2179var originalMethods = (expr.Kind == BoundKind.MethodGroup) ? ((BoundMethodGroup)expr).Methods : ImmutableArray<MethodSymbol>.Empty; 2227if (!boundArgument.HasAnyErrors && syntaxIsOk && boundArgument.Kind == BoundKind.MethodGroup)
Binder\Binder_Operators.cs (43)
33if (left.Kind == BoundKind.EventAccess) 99if (left.Kind == BoundKind.EventAccess && !CheckEventValueKind((BoundEventAccess)left, BindValueKind.Assignable, diagnostics)) 241Debug.Assert(left.Kind != BoundKind.EventAccess || hasError); 474if (result.Kind == BoundKind.TypeExpression 479else if (result.Kind == BoundKind.BadExpression) 836case (BoundKind.DefaultLiteral, _) when !isEquality: 837case (_, BoundKind.DefaultLiteral) when !isEquality: 841case (BoundKind.DefaultLiteral, BoundKind.DefaultLiteral): 844case (BoundKind.DefaultLiteral, _) when right.Type is TypeParameterSymbol: 848case (_, BoundKind.DefaultLiteral) when left.Type is TypeParameterSymbol: 852case (BoundKind.UnconvertedObjectCreationExpression, _): 855case (_, BoundKind.UnconvertedObjectCreationExpression): 1951if (left.Kind == BoundKind.Conversion && right.Kind == BoundKind.Conversion) 2451case BoundKind.NamespaceExpression: 2452case BoundKind.TypeExpression: 2573BoundKind exprKind = expr.Kind; 2576case BoundKind.FieldAccess: 2577case BoundKind.EventAccess: 2581if (exprKind == BoundKind.FieldAccess) 2623case BoundKind.InlineArrayAccess: 2635case BoundKind.RangeVariable: 2643case BoundKind.Parameter: 2666case BoundKind.ThisReference: 2667case BoundKind.BaseReference: 2672case BoundKind.Local: 2682case BoundKind.PointerIndirectionOperator: //Covers ->, since the receiver will be one of these. 2683case BoundKind.ConvertedStackAllocExpression: 2687case BoundKind.PointerElementAccess: 2702case BoundKind.PropertyAccess: // Never fixed 2703case BoundKind.IndexerAccess: // Never fixed 3164case BoundKind.UnboundLambda: 3165case BoundKind.Lambda: 3166case BoundKind.MethodGroup: // New in Roslyn - see DevDiv #864740. 3294operand.Kind == BoundKind.MethodGroup || 3712case BoundKind.UnboundLambda: 3713case BoundKind.Lambda: 3714case BoundKind.MethodGroup: // New in Roslyn - see DevDiv #864740. 3723case BoundKind.TupleLiteral: 3724case BoundKind.ConvertedTupleLiteral: 4023if (leftOperand.Kind == BoundKind.UnboundLambda || leftOperand.Kind == BoundKind.MethodGroup)
Binder\Binder_Patterns.cs (11)
508wasExpression = expression.Kind != BoundKind.TypeExpression; 515Debug.Assert(expression is { Kind: BoundKind.TypeExpression, Type: { } }); 537wasExpression = expression.Kind switch { BoundKind.BadExpression => false, BoundKind.TypeExpression => false, _ => true }; 686if (convertedExpression.Kind == BoundKind.Conversion) 1561if (boundMember.Kind == BoundKind.PropertyGroup) 1571case BoundKind.FieldAccess: 1572case BoundKind.PropertyAccess: 1575case BoundKind.IndexerAccess: 1576case BoundKind.DynamicIndexerAccess: 1577case BoundKind.EventAccess:
Binder\Binder_Query.cs (7)
924while (ultimateReceiver.Kind == BoundKind.QueryClause) 947else if (ultimateReceiver.Kind == BoundKind.NamespaceExpression) 951else if (ultimateReceiver.Kind == BoundKind.Lambda || ultimateReceiver.Kind == BoundKind.UnboundLambda) 956else if (ultimateReceiver.Kind == BoundKind.MethodGroup) 977else if (ultimateReceiver.Kind == BoundKind.TypeExpression) 985else if (ultimateReceiver.Kind == BoundKind.TypeOrValueExpression)
Binder\Binder_QueryErrors.cs (1)
220if (arg.Kind == BoundKind.UnboundLambda)
Binder\Binder_Statements.cs (39)
152(result.Kind == BoundKind.Block && 892BoundExpression expression = value.Kind is BoundKind.UnboundLambda or BoundKind.MethodGroup ? 1247case BoundKind.AddressOfOperator: 1251case BoundKind.FieldAccess: 1428bool discardAssignment = op1.Kind == BoundKind.DiscardExpression; 1496if (op1.Kind != BoundKind.DynamicIndexerAccess && 1497op1.Kind != BoundKind.DynamicMemberAccess && 1498op1.Kind != BoundKind.DynamicObjectInitializerMember) 1513if ((op1.Kind == BoundKind.EventAccess) && 1570else if (op1.Kind is BoundKind.Local or BoundKind.Parameter) 1583Debug.Assert(op1.Kind != BoundKind.Parameter); // If the assert fails, add a corresponding test. 1637case BoundKind.PropertyAccess: 1644case BoundKind.IndexerAccess: 1651case BoundKind.ImplicitIndexerAccess: 1775(propertyIsStatic || receiver?.Kind == BoundKind.ThisReference); 1810else if (receiver.Kind == BoundKind.BaseReference) 1936if (expression.HasAnyErrors && expression.Kind != BoundKind.UnboundLambda) 2322case BoundKind.BadExpression: 2326case BoundKind.UnboundLambda: 2331case BoundKind.TupleLiteral: 2355case BoundKind.MethodGroup: 2360case BoundKind.UnconvertedAddressOfOperator: 2365case BoundKind.Literal: 2382case BoundKind.StackAllocArrayCreation: 2388case BoundKind.UnconvertedSwitchExpression: 2401case BoundKind.UnconvertedCollectionExpression: 2406case BoundKind.AddressOfOperator when targetType.IsFunctionPointer(): 2411case BoundKind.UnconvertedConditionalOperator: 2440Debug.Assert(operand.HasAnyErrors && operand.Kind != BoundKind.UnboundLambda, "Missing a case in implicit conversion error reporting"); 2683if (expr.Kind == BoundKind.AssignmentOperator) 2686if (assignment.Right.Kind == BoundKind.Literal && assignment.Right.ConstantValueOpt.Discriminator == ConstantValueTypeDiscriminator.Boolean) 3160if (!argument.HasAnyErrors || argument.Kind == BoundKind.UnboundLambda) 3434if (expression.Kind == BoundKind.DelegateCreationExpression || expression.Kind == BoundKind.NameOfOperator) 3462if ((refKind != RefKind.None) != (returnRefKind != RefKind.None) && expression.Kind != BoundKind.ThrowExpression) 4116if (boundAccess.Kind != BoundKind.MethodGroup) 4142if (patternMethodCall.Kind != BoundKind.Call)
Binder\Binder_TupleOperators.cs (2)
217Debug.Assert((object)left.Type != null || left.Kind == BoundKind.TupleLiteral); 218Debug.Assert((object)right.Type != null || right.Kind == BoundKind.TupleLiteral);
Binder\DecisionDagBuilder.cs (3)
2431if (RemainingTests[0] is One { Test: { Kind: BoundKind.DagNonNullTest } planA }) 2438case One { Test: { Kind: BoundKind.DagTypeTest } planB1 }: 2445case One { Test: { Kind: BoundKind.DagValueTest } planB2 }:
Binder\DecisionDagBuilder_ListPatterns.cs (1)
18list.Subpatterns.Count(p => p.Kind == BoundKind.SlicePattern) == (list.HasSlice ? 1 : 0) &&
Binder\ForEachLoopBinder.cs (1)
400if (iterationErrorExpression.Kind == BoundKind.DiscardExpression)
Binder\ForLoopBinder.cs (2)
108Debug.Assert(increment.Kind != BoundKind.StatementList || ((BoundStatementList)increment).Statements.Length > 1); 113if (increment.Kind == BoundKind.StatementList)
Binder\LockOrUsingBinder.cs (2)
61case BoundKind.Local: 64case BoundKind.Parameter:
Binder\RefSafetyAnalysis.cs (1)
541if (node.Left.Kind != BoundKind.DiscardExpression)
Binder\Semantics\Conversions\ConversionsBase.cs (16)
1061case BoundKind.Literal: 1069case BoundKind.DefaultLiteral: 1072case BoundKind.ExpressionWithNullability: 1082case BoundKind.TupleLiteral: 1090case BoundKind.UnboundLambda: 1097case BoundKind.MethodGroup: 1105case BoundKind.UnconvertedInterpolatedString: 1106case BoundKind.BinaryOperator when ((BoundBinaryOperator)sourceExpression).IsUnconvertedInterpolatedStringAddition: 1113case BoundKind.StackAllocArrayCreation: 1121case BoundKind.UnconvertedAddressOfOperator when destination is FunctionPointerTypeSymbol funcPtrType: 1129case BoundKind.ThrowExpression: 1132case BoundKind.UnconvertedObjectCreationExpression: 1135case BoundKind.UnconvertedCollectionExpression: 1410if (sourceExpression.Kind == BoundKind.TupleLiteral) 1648if (source.Kind != BoundKind.UnboundLambda) 1951if (sourceExpressionOpt?.Kind == BoundKind.TupleLiteral)
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (1)
456&& nonDelegate.Kind == BoundKind.UnboundLambda)
Binder\Semantics\OverloadResolution\MethodGroup.cs (1)
112if (this.Receiver.Kind == BoundKind.TypeExpression)
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (17)
609if (argument.Kind == BoundKind.UnboundLambda && target.Type.GetDelegateType() is { }) 614else if (argument.Kind == BoundKind.UnconvertedCollectionExpression) 618else if (argument.Kind != BoundKind.TupleLiteral || 851if (argument.Kind == BoundKind.TupleLiteral && (object)argument.Type == null) 855else if (argument.Kind == BoundKind.UnconvertedCollectionExpression) 995if ((isFunctionPointer && argument.Kind != BoundKind.UnconvertedAddressOfOperator) || 996(!isFunctionPointer && argument.Kind is not (BoundKind.UnboundLambda or BoundKind.MethodGroup))) 1051if ((isFunctionPointer && argument.Kind != BoundKind.UnconvertedAddressOfOperator) || 1052(!isFunctionPointer && argument.Kind is not (BoundKind.UnboundLambda or BoundKind.MethodGroup))) 1420if (source.Kind is not (BoundKind.MethodGroup or BoundKind.UnconvertedAddressOfOperator)) 1431if (delegateOrFunctionPointerType.IsFunctionPointer() != (source.Kind == BoundKind.UnconvertedAddressOfOperator)) 1529if (source.Kind != BoundKind.UnboundLambda) 1583if (source.Kind != BoundKind.UnboundLambda) 3060if (source.Kind != BoundKind.UnboundLambda)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (16)
2160if (argumentKind == BoundKind.ArgListOperator) 2302if (argumentKind == BoundKind.ArgListOperator) 2462if (arguments[i].Kind == BoundKind.ArgListOperator) 2613if (arguments[i].Kind != BoundKind.ArgListOperator) 2900var nodeKind = node.Kind; 2901if (nodeKind == BoundKind.OutVariablePendingInference || 2902nodeKind == BoundKind.OutDeconstructVarPendingInference || 2903(nodeKind == BoundKind.DiscardExpression && !node.HasExpressionType())) 3236if (node.Kind == BoundKind.TupleLiteral) 3252if (node.Kind == BoundKind.UnboundLambda && 3292if (lambda.Body.Statements[0].Kind == BoundKind.ReturnStatement) 3547if (node?.Kind == BoundKind.MethodGroup) 4427if (argument.Kind == BoundKind.ArgListOperator) 4596if (argument.Kind == BoundKind.OutVariablePendingInference || 4597argument.Kind == BoundKind.OutDeconstructVarPendingInference || 4598(argument.Kind == BoundKind.DiscardExpression && (object)argType == null))
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (13)
659if (receiverOpt?.Kind == BoundKind.QueryClause) 1070if (argument.Kind == BoundKind.UnboundLambda) 1208argument.Kind != BoundKind.OutDeconstructVarPendingInference && 1209argument.Kind != BoundKind.OutVariablePendingInference && 1210argument.Kind != BoundKind.DiscardExpression) 1216if (argument.Kind == BoundKind.UnboundLambda && refArg == refParameter) 1220else if (argument.Kind == BoundKind.MethodGroup && parameterType.TypeKind == TypeKind.Delegate && 1225else if (argument.Kind == BoundKind.MethodGroup && parameterType.TypeKind == TypeKind.FunctionPointer) 1229else if (argument.Kind == BoundKind.UnconvertedAddressOfOperator && 1234else if (argument.Kind == BoundKind.UnconvertedCollectionExpression) 1299Debug.Assert(argument.Kind != BoundKind.OutDeconstructVarPendingInference); 1300Debug.Assert(argument.Kind != BoundKind.OutVariablePendingInference); 1301Debug.Assert(argument.Kind != BoundKind.DiscardExpression || argument.HasExpressionType());
BoundTree\BoundDecisionDag.cs (1)
205return this.TopologicallySortedNodes.Any(static node => node is BoundEvaluationDecisionDagNode e && e.Evaluation.Kind == BoundKind.DagAssignmentEvaluation);
BoundTree\BoundExpression.cs (15)
56if ((Kind != BoundKind.Local && Kind != BoundKind.Parameter) || this.WasConverted) 76case BoundKind.TupleLiteral: 77case BoundKind.UnconvertedSwitchExpression: 78case BoundKind.UnconvertedObjectCreationExpression: 79case BoundKind.UnconvertedConditionalOperator: 80case BoundKind.DefaultLiteral: 81case BoundKind.UnconvertedInterpolatedString: 82case BoundKind.UnconvertedCollectionExpression: 84case BoundKind.StackAllocArrayCreation: 89case BoundKind.BinaryOperator: 92case BoundKind.Local when !WasConverted: 93case BoundKind.Parameter when !WasConverted: 605return this.Condition.Kind == BoundKind.UnaryOperator && ((BoundUnaryOperator)this.Condition).OperatorKind.IsDynamic(); 731if (argument.Kind == BoundKind.TupleLiteral)
BoundTree\BoundExpressionExtensions.cs (22)
24case BoundKind.Local: 27case BoundKind.Parameter: 30case BoundKind.FieldAccess: 33case BoundKind.Call: 36case BoundKind.PropertyAccess: 39case BoundKind.IndexerAccess: 42case BoundKind.ImplicitIndexerAccess: 45case BoundKind.InlineArrayAccess: 63case BoundKind.ObjectInitializerMember: 83return node is { Kind: BoundKind.Literal, ConstantValueOpt: { Discriminator: ConstantValueTypeDiscriminator.Null } }; 88return node.Kind == BoundKind.DefaultLiteral; 93return node.Kind == BoundKind.UnconvertedObjectCreationExpression; 109if (node.Kind == BoundKind.DefaultExpression || node.Kind == BoundKind.DefaultLiteral) 137Debug.Assert(expr.Kind is BoundKind.MethodGroup or BoundKind.UnboundLambda); 172case BoundKind.MethodGroup: 186case BoundKind.BadExpression: 194case BoundKind.DelegateCreationExpression: 203case BoundKind.Call: 217case BoundKind.IndexerAccess: 244case BoundKind.Conversion:
BoundTree\BoundMethodGroup.cs (1)
61if (this.ReceiverOpt == null || this.ReceiverOpt.Kind == BoundKind.TypeExpression)
BoundTree\BoundNode.cs (7)
17private readonly BoundKind _kind; 73protected BoundNode(BoundKind kind, SyntaxNode syntax) 76kind == BoundKind.SequencePoint || 77kind == BoundKind.SequencePointExpression || 78kind == (BoundKind)byte.MaxValue || // used in SpillSequenceSpiller 85protected BoundNode(BoundKind kind, SyntaxNode syntax, bool hasErrors) 377public BoundKind Kind
BoundTree\BoundNodeExtensions.cs (5)
42if (statement!.Kind == BoundKind.ExpressionStatement) 45if (expression.Kind == BoundKind.Sequence && ((BoundSequence)expression).SideEffects.IsDefaultOrEmpty) 51return expression.Kind == BoundKind.Call && ((BoundCall)expression).IsConstructorInitializer(); 64(receiverOpt.Kind == BoundKind.ThisReference || receiverOpt.Kind == BoundKind.BaseReference);
BoundTree\BoundStatementExtensions.cs (6)
18case BoundKind.LabelStatement: 19case BoundKind.LabeledStatement: 20case BoundKind.SwitchSection: 34case BoundKind.LabelStatement: 38case BoundKind.LabeledStatement: 42case BoundKind.SwitchSection:
BoundTree\BoundTreeRewriter.cs (4)
113if (child.Kind != BoundKind.BinaryOperator) 128if (child.Kind != BoundKind.BinaryOperator) 202if (child.Kind != BoundKind.BinaryPattern) 217if (child.Kind != BoundKind.BinaryPattern)
BoundTree\BoundTreeVisitors.cs (48)
33case BoundKind.TypeExpression: 35case BoundKind.NamespaceExpression: 37case BoundKind.UnaryOperator: 39case BoundKind.IncrementOperator: 41case BoundKind.BinaryOperator: 43case BoundKind.CompoundAssignmentOperator: 45case BoundKind.AssignmentOperator: 47case BoundKind.NullCoalescingOperator: 49case BoundKind.ConditionalOperator: 51case BoundKind.ArrayAccess: 53case BoundKind.TypeOfOperator: 55case BoundKind.DefaultLiteral: 57case BoundKind.DefaultExpression: 59case BoundKind.IsOperator: 61case BoundKind.AsOperator: 63case BoundKind.Conversion: 65case BoundKind.SequencePointExpression: 67case BoundKind.SequencePoint: 69case BoundKind.SequencePointWithSpan: 71case BoundKind.Block: 73case BoundKind.LocalDeclaration: 75case BoundKind.MultipleLocalDeclarations: 77case BoundKind.Sequence: 79case BoundKind.NoOpStatement: 81case BoundKind.ReturnStatement: 83case BoundKind.ThrowStatement: 85case BoundKind.ExpressionStatement: 87case BoundKind.BreakStatement: 89case BoundKind.ContinueStatement: 91case BoundKind.IfStatement: 93case BoundKind.ForEachStatement: 95case BoundKind.TryStatement: 97case BoundKind.Literal: 99case BoundKind.ThisReference: 101case BoundKind.Local: 103case BoundKind.Parameter: 105case BoundKind.LabelStatement: 107case BoundKind.GotoStatement: 109case BoundKind.LabeledStatement: 111case BoundKind.StatementList: 113case BoundKind.ConditionalGoto: 115case BoundKind.Call: 117case BoundKind.ObjectCreationExpression: 119case BoundKind.DelegateCreationExpression: 121case BoundKind.FieldAccess: 123case BoundKind.PropertyAccess: 125case BoundKind.Lambda: 127case BoundKind.NameOfOperator:
BoundTree\BoundTreeWalker.cs (2)
121while (current.Kind == BoundKind.BinaryOperator) 159while (current.Kind == BoundKind.BinaryPattern)
BoundTree\Constructors.cs (3)
71case BoundKind.FieldAccess: 74case BoundKind.Local: 206Debug.Assert(method is ErrorMethodSymbol || arguments[i].Kind == BoundKind.ArgListOperator);
BoundTree\Expression.cs (2)
170(this.Kind == BoundKind.StatementList || this.Kind == BoundKind.Scope) ? StaticCast<BoundNode?>.From(this.Statements) : ImmutableArray<BoundNode?>.Empty;
CodeGen\CodeGenerator_HasHome.cs (17)
53case BoundKind.ArrayAccess: 63case BoundKind.PointerIndirectionOperator: 64case BoundKind.RefValueOperator: 67case BoundKind.ThisReference: 82case BoundKind.ThrowExpression: 86case BoundKind.Parameter: 90case BoundKind.Local: 97case BoundKind.Call: 102case BoundKind.Dup: 108case BoundKind.FieldAccess: 111case BoundKind.Sequence: 114case BoundKind.AssignmentOperator: 124case BoundKind.ComplexConditionalReceiver: 137goto case BoundKind.ConditionalReceiver; 139case BoundKind.ConditionalReceiver: 144case BoundKind.ConditionalOperator: 257fieldAccess.ReceiverOpt.Kind == BoundKind.ThisReference;
CodeGen\EmitAddress.cs (25)
28case BoundKind.RefValueOperator: 32case BoundKind.Local: 35case BoundKind.Dup: 39case BoundKind.ConditionalReceiver: 45case BoundKind.ComplexConditionalReceiver: 49case BoundKind.Parameter: 52case BoundKind.FieldAccess: 55case BoundKind.ArrayAccess: 64case BoundKind.ThisReference: 85case BoundKind.PreviousSubmissionReference: 89case BoundKind.BaseReference: 93case BoundKind.PassByCopy: 96case BoundKind.Sequence: 99case BoundKind.PointerIndirectionOperator: 106case BoundKind.PseudoVariable: 110case BoundKind.Call: 121case BoundKind.FunctionPointerInvocation: 133case BoundKind.DefaultExpression: 143case BoundKind.ConditionalOperator: 152case BoundKind.AssignmentOperator: 164case BoundKind.ThrowExpression: 355case BoundKind.Local: 364case BoundKind.Sequence: 367case BoundKind.FieldAccess: 522if (receiver.Kind != BoundKind.ConditionalReceiver)
CodeGen\EmitArrayInitializer.cs (4)
348if (inits[0].Kind == BoundKind.ArrayInitialization) 370Debug.Assert(inits.All((init) => init.Kind != BoundKind.ArrayInitialization) || 371inits.All((init) => init.Kind == BoundKind.ArrayInitialization), 374return inits.Length != 0 && inits[0].Kind == BoundKind.ArrayInitialization;
CodeGen\EmitExpression.cs (145)
98case BoundKind.AssignmentOperator: 102case BoundKind.Call: 106case BoundKind.ObjectCreationExpression: 110case BoundKind.DelegateCreationExpression: 114case BoundKind.ArrayCreation: 118case BoundKind.ConvertedStackAllocExpression: 122case BoundKind.ReadOnlySpanFromArray: 126case BoundKind.Conversion: 130case BoundKind.Local: 134case BoundKind.Dup: 138case BoundKind.PassByCopy: 142case BoundKind.Parameter: 149case BoundKind.FieldAccess: 153case BoundKind.ArrayAccess: 157case BoundKind.RefArrayAccess: 161case BoundKind.ArrayLength: 165case BoundKind.ThisReference: 172case BoundKind.PreviousSubmissionReference: 176case BoundKind.BaseReference: 189case BoundKind.Sequence: 193case BoundKind.SequencePointExpression: 197case BoundKind.UnaryOperator: 201case BoundKind.BinaryOperator: 205case BoundKind.NullCoalescingOperator: 209case BoundKind.IsOperator: 213case BoundKind.AsOperator: 217case BoundKind.DefaultExpression: 221case BoundKind.TypeOfOperator: 228case BoundKind.SizeOfOperator: 235case BoundKind.ModuleVersionId: 240case BoundKind.ModuleVersionIdString: 245case BoundKind.ThrowIfModuleCancellationRequested: 250case BoundKind.ModuleCancellationTokenExpression: 255case BoundKind.InstrumentationPayloadRoot: 260case BoundKind.MethodDefIndex: 265case BoundKind.MaximumMethodDefIndex: 270case BoundKind.SourceDocumentIndex: 275case BoundKind.LocalId: 280case BoundKind.ParameterId: 285case BoundKind.MethodInfo: 292case BoundKind.FieldInfo: 299case BoundKind.ConditionalOperator: 303case BoundKind.AddressOfOperator: 307case BoundKind.PointerIndirectionOperator: 311case BoundKind.ArgList: 315case BoundKind.ArgListOperator: 320case BoundKind.RefTypeOperator: 324case BoundKind.MakeRefOperator: 328case BoundKind.RefValueOperator: 332case BoundKind.LoweredConditionalAccess: 336case BoundKind.ConditionalReceiver: 340case BoundKind.ComplexConditionalReceiver: 344case BoundKind.PseudoVariable: 348case BoundKind.ThrowExpression: 352case BoundKind.FunctionPointerInvocation: 356case BoundKind.FunctionPointerLoad: 362Debug.Assert(expression.Kind != BoundKind.BadExpression); 444(receiver.Kind == BoundKind.Local && IsStackLocal(((BoundLocal)receiver).LocalSymbol)) || 859Debug.Assert(sequence.Value.Kind != BoundKind.TypeExpression || !used); 860if (sequence.Value.Kind != BoundKind.TypeExpression) 1002Debug.Assert(arguments[i].Kind == BoundKind.ArgListOperator); 1231else if (receiver.Kind == BoundKind.Conversion) 1242else if (receiver.Kind == BoundKind.FieldAccess) 1273if (receiver.Kind == BoundKind.Conversion && ((BoundConversion)receiver).ConversionKind == ConversionKind.Unboxing) 1286case BoundKind.Parameter: 1290case BoundKind.Local: 1294case BoundKind.Sequence: 1297case BoundKind.FieldAccess: 1516Debug.Assert(receiver.Kind != BoundKind.BaseReference, "base should always use call"); 1527case BoundKind.ArrayCreation: 1530case BoundKind.ObjectCreationExpression: 1535case BoundKind.Conversion: 1555case BoundKind.ThisReference: 1562case BoundKind.FieldAccess: 1566case BoundKind.Local: 1570case BoundKind.DelegateCreationExpression: 1573case BoundKind.Sequence: 1577case BoundKind.AssignmentOperator: 1581case BoundKind.TypeOfOperator: 1584case BoundKind.ConditionalReceiver: 1600case BoundKind.ThisReference: 1603case BoundKind.Sequence: 1646Debug.Assert(receiver.Kind == BoundKind.ThisReference); 2132case BoundKind.TypeExpression: 2133case BoundKind.Parameter: 2134case BoundKind.Local: 2135case BoundKind.ThisReference: 2137case BoundKind.FieldAccess: 2148case BoundKind.PassByCopy: 2151case BoundKind.BinaryOperator: 2164case BoundKind.Conversion: 2213case BoundKind.Local: 2216case BoundKind.Parameter: 2219case BoundKind.Call: 2222case BoundKind.FunctionPointerInvocation: 2225case BoundKind.Dup: 2228case BoundKind.Sequence: 2620if (objCreation.Arguments.Length > 0 && objCreation.Arguments[0].Kind == BoundKind.ConvertedStackAllocExpression) 2654if (left.Kind == BoundKind.ArrayAccess && left.Type.TypeKind == TypeKind.TypeParameter && !left.Type.IsValueType) 2659if (left.Kind == BoundKind.FieldAccess) 2756case BoundKind.Parameter: 2759case BoundKind.Local: 2775case BoundKind.RefValueOperator: 2779case BoundKind.FieldAccess: 2797case BoundKind.Parameter: 2809case BoundKind.Local: 2861case BoundKind.ArrayAccess: 2870case BoundKind.ThisReference: 2881case BoundKind.Dup: 2892case BoundKind.ConditionalOperator: 2904case BoundKind.PointerIndirectionOperator: 2914case BoundKind.Sequence: 2927case BoundKind.Call: 2938case BoundKind.FunctionPointerInvocation: 2949case BoundKind.PropertyAccess: 2950case BoundKind.IndexerAccess: 2952case BoundKind.PreviousSubmissionReference: 2956case BoundKind.PseudoVariable: 2961case BoundKind.ModuleVersionId: 2962case BoundKind.InstrumentationPayloadRoot: 2965case BoundKind.AssignmentOperator: 3004Debug.Assert(lhs.Kind != BoundKind.Parameter || exprTempsAfter <= exprTempsBefore); 3006if (lhs.Kind == BoundKind.Local && ((BoundLocal)lhs).LocalSymbol.SynthesizedKind.IsLongLived()) 3064case BoundKind.FieldAccess: 3068case BoundKind.Local: 3095case BoundKind.ArrayAccess: 3101case BoundKind.ThisReference: 3105case BoundKind.Parameter: 3109case BoundKind.Dup: 3114case BoundKind.ConditionalOperator: 3119case BoundKind.RefValueOperator: 3120case BoundKind.PointerIndirectionOperator: 3121case BoundKind.PseudoVariable: 3125case BoundKind.Sequence: 3132case BoundKind.Call: 3137case BoundKind.FunctionPointerInvocation: 3142case BoundKind.ModuleVersionId: 3146case BoundKind.InstrumentationPayloadRoot: 3150case BoundKind.AssignmentOperator: 3159case BoundKind.PreviousSubmissionReference: 3918case BoundKind.Conversion: 3932case BoundKind.AssignmentOperator: 3936case BoundKind.Sequence: 3940case BoundKind.Local: 3949case BoundKind.Dup:
CodeGen\EmitOperators.cs (3)
94if (child.Kind != BoundKind.BinaryOperator || child.ConstantValueOpt != null) 118if (child.Kind != BoundKind.BinaryOperator || child.ConstantValueOpt != null) 507if (condition.Kind == BoundKind.BinaryOperator)
CodeGen\EmitStatement.cs (31)
31case BoundKind.Block: 35case BoundKind.Scope: 39case BoundKind.SequencePoint: 43case BoundKind.SequencePointWithSpan: 47case BoundKind.SavePreviousSequencePoint: 51case BoundKind.RestorePreviousSequencePoint: 55case BoundKind.StepThroughSequencePoint: 59case BoundKind.ExpressionStatement: 63case BoundKind.StatementList: 67case BoundKind.ReturnStatement: 71case BoundKind.GotoStatement: 75case BoundKind.LabelStatement: 79case BoundKind.ConditionalGoto: 83case BoundKind.ThrowStatement: 87case BoundKind.TryStatement: 91case BoundKind.SwitchDispatch: 95case BoundKind.StateMachineScope: 99case BoundKind.NoOpStatement: 418case BoundKind.BinaryOperator: 526case BoundKind.LoweredConditionalAccess: 536(receiver.Kind == BoundKind.Local && IsStackLocal(((BoundLocal)receiver).LocalSymbol)) || 575case BoundKind.UnaryOperator: 585case BoundKind.IsOperator: 602case BoundKind.Sequence: 1135while (exceptionSource.Kind == BoundKind.Sequence) 1145case BoundKind.Local: 1155case BoundKind.FieldAccess: 1264if (expression.Kind == BoundKind.Sequence) 1272if (expression.Kind == BoundKind.SequencePointExpression) 1281case BoundKind.Local: 1290case BoundKind.Parameter:
CodeGen\Optimizer.cs (34)
451Debug.Assert(expr.Kind != BoundKind.Label); 762if (value != null && value.Kind == BoundKind.Local && ((BoundLocal)value).LocalSymbol == local) 770if (lastSideeffect.Kind == BoundKind.AssignmentOperator) 774assignment.Right.Kind == BoundKind.Sequence) 950bool mayPushReceiver = (right.Kind == BoundKind.ObjectCreationExpression && 996assignmentLocal.Type.IsPointerOrFunctionPointer() && right.Kind == BoundKind.Conversion && 1031(lhs.Kind is BoundKind.Local or BoundKind.Parameter or BoundKind.FieldAccess && lhs.GetRefKind() != RefKind.None), 1036case BoundKind.ThisReference: 1040case BoundKind.Parameter: 1048case BoundKind.Local: 1056case BoundKind.Call: 1060case BoundKind.FunctionPointerInvocation: 1064case BoundKind.ConditionalOperator: 1068case BoundKind.AssignmentOperator: 1072case BoundKind.Sequence: 1077case BoundKind.RefValueOperator: 1078case BoundKind.PointerIndirectionOperator: 1079case BoundKind.PseudoVariable: 1082case BoundKind.ModuleVersionId: 1083case BoundKind.InstrumentationPayloadRoot: 1085goto case BoundKind.FieldAccess; 1087case BoundKind.FieldAccess: 1088case BoundKind.ArrayAccess: 1100if (lhs.Kind == BoundKind.FieldAccess) 1425if (boundExpression.Kind == BoundKind.Local) 1477if (child.Kind != BoundKind.BinaryOperator || child.ConstantValueOpt != null) 1493if (child.Kind != BoundKind.BinaryOperator || child.ConstantValueOpt != null) 1697if (exceptionSourceOpt.Kind == BoundKind.Local) 1936top.Item1.Kind == BoundKind.Local && 2071if (child.Kind != BoundKind.BinaryOperator || child.ConstantValueOpt != null) 2087if (child.Kind != BoundKind.BinaryOperator || child.ConstantValueOpt != null) 2299if (exceptionSource.Kind == BoundKind.Local)
Compilation\CSharpSemanticModel.cs (58)
1924else if (highestBoundExpr.Kind == BoundKind.TypeOrValueExpression) 1930else if (highestBoundExpr.Kind == BoundKind.UnaryOperator) 2085var highestBoundExprKind = highestBoundExpr?.Kind ?? BoundKind.NoOpStatement; 2090if (highestBoundExprKind == BoundKind.Lambda) // the enclosing conversion is explicit 2106if (tupleLiteralConversion.Operand.Kind == BoundKind.ConvertedTupleLiteral) 2120else if (highestBoundExprKind == BoundKind.FixedLocalCollectionInitializer) 2191if (highestBoundExprKind != BoundKind.Conversion) 2195else if (((BoundConversion)highestBoundExpr).Operand.Kind != BoundKind.Conversion) 2213else if (boundNodeForSyntacticParent?.Kind == BoundKind.DelegateCreationExpression) 2220case BoundKind.MethodGroup: 2225case BoundKind.Lambda: 2231case BoundKind.UnboundLambda: 2300if (boundExpr != null && boundExpr.Kind != BoundKind.TypeExpression) 3357case BoundKind.MethodGroup: 3361case BoundKind.PropertyGroup: 3365case BoundKind.BadExpression: 3388case BoundKind.DelegateCreationExpression: 3391case BoundKind.TypeExpression: 3399boundNodeForSyntacticParent.Kind == BoundKind.BadExpression && 3421case BoundKind.TypeOrValueExpression: 3430case BoundKind.Call: 3455case BoundKind.FunctionPointerInvocation: 3463case BoundKind.UnconvertedAddressOfOperator: 3477case BoundKind.IndexerAccess: 3491case BoundKind.ImplicitIndexerAccess: 3495case BoundKind.EventAssignmentOperator: 3512case BoundKind.EventAccess when boundNodeForSyntacticParent is BoundEventAssignmentOperator { ResultKind: LookupResultKind.Viable } parentOperator && 3523case BoundKind.Conversion: 3546case BoundKind.BinaryOperator: 3550case BoundKind.UnaryOperator: 3554case BoundKind.UserDefinedConditionalLogicalOperator: 3560case BoundKind.CompoundAssignmentOperator: 3564case BoundKind.IncrementOperator: 3568case BoundKind.AwaitExpression: 3573case BoundKind.ConditionalOperator: 3579case BoundKind.Attribute: 3614case BoundKind.QueryClause: 3625case BoundKind.DynamicInvocation: 3633case BoundKind.DynamicCollectionElementInitializer: 3641case BoundKind.DynamicIndexerAccess: 3649case BoundKind.DynamicMemberAccess: 3654case BoundKind.DynamicObjectCreationExpression: 3661case BoundKind.ObjectCreationExpression: 3678case BoundKind.ThisReference: 3679case BoundKind.BaseReference: 3690case BoundKind.FromEndIndexExpression: 3700case BoundKind.RangeExpression: 3982case BoundKind.Attribute: 3996case BoundKind.BadExpression: 4261case BoundKind.Call: 4282case BoundKind.DelegateCreationExpression: 4292case BoundKind.Conversion: 4324case BoundKind.DynamicInvocation: 4330case BoundKind.BadExpression: 4341case BoundKind.NameOfOperator: 4410case BoundKind.IndexerAccess: 4431case BoundKind.BadExpression:
Compilation\MemberSemanticModel.cs (12)
1200Debug.Assert(highestBoundNode.Kind != BoundKind.UnboundLambda); 1744case BoundKind.UnboundLambda: 1746goto case BoundKind.Lambda; 1747case BoundKind.Lambda: 1751case BoundKind.QueryClause: 1773case BoundKind.QueryClause: 1777case BoundKind.Call: 1789while (receiver?.Kind == BoundKind.MethodGroup) 1806case BoundKind.Conversion: 1809case BoundKind.UnboundLambda: 1813case BoundKind.Lambda: 1856if (expr.Kind == BoundKind.QueryClause)
Compilation\MemberSemanticModel.NodeMapBuilder.cs (5)
93if (existing[i].Kind == BoundKind.TypeExpression && nodesToAdd[i].Kind == BoundKind.TypeOrValueExpression) 101else if (existing[i].Kind == BoundKind.TypeOrValueExpression && nodesToAdd[i].Kind == BoundKind.TypeExpression) 169if (node.Kind == BoundKind.UnboundLambda)
Compiler\MethodBodySynthesizer.Lowered.cs (1)
333if (body.Kind != BoundKind.Block) body = F.Block(body);
Compiler\MethodCompiler.cs (5)
598(init.Kind == BoundKind.FieldEqualsValue) && !((BoundFieldEqualsValue)init).Field.IsMetadataConstant)); 1292if (processedInitializers.LoweredInitializers.Kind == BoundKind.StatementList) 1850case BoundKind.ConstructorMethodBody: 1880case BoundKind.NonConstructorMethodBody: 1886case BoundKind.Block:
FlowAnalysis\AbstractFlowPass.cs (22)
556case BoundKind.Parameter: 560case BoundKind.Local: 564case BoundKind.ThisReference: 565case BoundKind.BaseReference: 568case BoundKind.PropertyAccess: 585case BoundKind.FieldAccess: 592case BoundKind.EventAccess: 599case BoundKind.TupleLiteral: 600case BoundKind.ConvertedTupleLiteral: 604case BoundKind.InlineArrayAccess: 849case BoundKind.LabeledStatement: 855case BoundKind.LabelStatement: 861case BoundKind.SwitchSection: 1864if (pend.Branch.Kind != BoundKind.YieldReturnStatement) 2124if (expr.Kind != BoundKind.PropertyAccess) 2157var refKind = node.Left.Kind == BoundKind.BadExpression 2238receiverOpt.Kind != BoundKind.TypeExpression && 2419var childKind = child.Kind; 2421if (childKind == BoundKind.BinaryOperator) 2434else if (childKind == BoundKind.UserDefinedConditionalLogicalOperator) 2459case BoundKind.BinaryOperator: 2464case BoundKind.UserDefinedConditionalLogicalOperator:
FlowAnalysis\ControlFlowPass.cs (12)
216case BoundKind.GotoStatement: 223case BoundKind.BreakStatement: 224case BoundKind.ContinueStatement: 231case BoundKind.ReturnStatement: 244case BoundKind.NoOpStatement: 245case BoundKind.Block: 246case BoundKind.ThrowStatement: 247case BoundKind.LabeledStatement: 248case BoundKind.LocalFunctionStatement: 251case BoundKind.StatementList: 306case BoundKind.YieldBreakStatement: 307case BoundKind.YieldReturnStatement:
FlowAnalysis\DataFlowsOutWalker.cs (14)
120case BoundKind.ListPattern: 121case BoundKind.RecursivePattern: 122case BoundKind.DeclarationPattern: 127case BoundKind.FieldAccess: 139case BoundKind.LocalDeclaration: 144case BoundKind.ThisReference: 149case BoundKind.Local: 154case BoundKind.Parameter: 159case BoundKind.CatchBlock: 165case BoundKind.RangeVariable: 170case BoundKind.EventAccess: 185case BoundKind.LocalFunctionStatement: 241case BoundKind.Parameter: return ((BoundParameter)node).ParameterSymbol; 242case BoundKind.ThisReference: return this.MethodThisParameter;
FlowAnalysis\DefiniteAssignment.cs (86)
241if (node.Kind == BoundKind.Attribute) 427BoundKind kind = pendingBranch.Kind; 430case BoundKind.AwaitExpression: 432case BoundKind.UsingStatement: 435case BoundKind.ForEachStatement: 438case BoundKind.UsingLocalDeclarations: 785Debug.Assert(fieldOrEventAccess.Kind == BoundKind.FieldAccess || fieldOrEventAccess.Kind == BoundKind.EventAccess); 791case BoundKind.FieldAccess: 807case BoundKind.EventAccess: 824case BoundKind.ThisReference: 828case BoundKind.Local: 832case BoundKind.Parameter: 836case BoundKind.InlineArrayAccess: 921if (value is { ConstantValueOpt: not null, Kind: not BoundKind.InterpolatedString }) return false; 925case BoundKind.Conversion: 939case BoundKind.DefaultLiteral: 940case BoundKind.DefaultExpression: 942case BoundKind.ObjectCreationExpression: 945case BoundKind.TupleLiteral: 946case BoundKind.ConvertedTupleLiteral: 947case BoundKind.Utf8String: 963case BoundKind.FieldAccess: 978if (n.Kind == BoundKind.Local) 990case BoundKind.EventAccess: 1011case BoundKind.ThisReference: 1015case BoundKind.Local: 1019case BoundKind.Parameter: 1023case BoundKind.RangeVariable: 1027case BoundKind.InlineArrayAccess: 1072case BoundKind.FieldAccess: 1088case BoundKind.EventAccess: 1100case BoundKind.PropertyAccess: 1124receiver.Kind != BoundKind.TypeExpression && 1141receiverOpt.Kind != BoundKind.TypeExpression && 1384case BoundKind.ThisReference: 1397case BoundKind.Local: 1403case BoundKind.FieldAccess: 1415case BoundKind.EventAccess: 1427case BoundKind.InlineArrayAccess: 1433case BoundKind.PropertyAccess: 1455case BoundKind.Parameter: 1462case BoundKind.RangeVariable: 1487case BoundKind.FieldAccess: 1496case BoundKind.Local: 1500case BoundKind.RangeVariable: 1502case BoundKind.Parameter: 1504case BoundKind.ThisReference: 1506case BoundKind.BaseReference: 1539case BoundKind.ListPattern: 1540case BoundKind.RecursivePattern: 1541case BoundKind.DeclarationPattern: 1557case BoundKind.LocalDeclaration: 1568case BoundKind.Local: 1586case BoundKind.InlineArrayAccess: 1616case BoundKind.Parameter: 1633case BoundKind.ObjectInitializerMember: 1645case BoundKind.ThisReference: 1646case BoundKind.FieldAccess: 1647case BoundKind.EventAccess: 1648case BoundKind.PropertyAccess: 1657case BoundKind.RangeVariable: 1661case BoundKind.BadExpression: 1672case BoundKind.TupleLiteral: 1673case BoundKind.ConvertedTupleLiteral: 1993case BoundKind.DeclarationPattern: 2000case BoundKind.DiscardPattern: 2001case BoundKind.TypePattern: 2003case BoundKind.SlicePattern: 2012case BoundKind.ConstantPattern: 2018case BoundKind.RecursivePattern: 2052case BoundKind.ITuplePattern: 2061case BoundKind.ListPattern: 2072case BoundKind.RelationalPattern: 2078case BoundKind.NegatedPattern: 2084case BoundKind.BinaryPattern: 2193if (stmt.Kind != BoundKind.LocalFunctionStatement) 2449if (pending.Branch.Kind == BoundKind.ReturnStatement) 2523if (initializer.Kind == BoundKind.AddressOfOperator) 2596case BoundKind.Local: 2599case BoundKind.Parameter: 2602case BoundKind.FieldAccess: 2610case BoundKind.EventAccess: 2618case BoundKind.ThisReference: 2619case BoundKind.BaseReference: 2623case BoundKind.InlineArrayAccess:
FlowAnalysis\ExitPointsWalker.cs (9)
127case BoundKind.GotoStatement: 130case BoundKind.BreakStatement: 133case BoundKind.ContinueStatement: 136case BoundKind.YieldBreakStatement: 137case BoundKind.ReturnStatement: 140case BoundKind.YieldReturnStatement: 141case BoundKind.AwaitExpression: 142case BoundKind.UsingStatement: 143case BoundKind.ForEachStatement when ((BoundForEachStatement)pending.Branch).AwaitOpt != null:
FlowAnalysis\LocalDataFlowPass.cs (9)
215case BoundKind.ThisReference: 216case BoundKind.BaseReference: 218case BoundKind.Local: 220case BoundKind.Parameter: 222case BoundKind.RangeVariable: 224case BoundKind.FieldAccess: 225case BoundKind.EventAccess: 226case BoundKind.PropertyAccess: 233case BoundKind.AssignmentOperator:
FlowAnalysis\NullableWalker.cs (74)
269private static readonly ImmutableArray<BoundKind> s_skippedExpressions = ImmutableArray.Create(BoundKind.ArrayInitialization, 270BoundKind.ObjectInitializerExpression, 271BoundKind.CollectionInitializerExpression, 272BoundKind.DynamicCollectionElementInitializer); 431private bool IsAnalyzingAttribute => methodMainNode.Kind == BoundKind.Attribute; 540Debug.Assert(expression != null || placeholder.Kind == BoundKind.InterpolatedStringArgumentPlaceholder); 561case BoundKind.DeconstructValuePlaceholder: 562case BoundKind.InterpolatedStringHandlerPlaceholder: 563case BoundKind.InterpolatedStringArgumentPlaceholder: 564case BoundKind.ObjectOrCollectionValuePlaceholder: 565case BoundKind.AwaitableValuePlaceholder: 568case BoundKind.ImplicitIndexerValuePlaceholder: 2007case BoundKind.FieldAccess: 2023case BoundKind.EventAccess: 2036case BoundKind.PropertyAccess: 2054receiver.Kind != BoundKind.TypeExpression && 2082case BoundKind.ThisReference: 2083case BoundKind.BaseReference: 2089case BoundKind.Conversion: 2132case BoundKind.DefaultLiteral: 2133case BoundKind.DefaultExpression: 2134case BoundKind.ObjectCreationExpression: 2135case BoundKind.DynamicObjectCreationExpression: 2136case BoundKind.AnonymousObjectCreationExpression: 2137case BoundKind.NewT: 2138case BoundKind.TupleLiteral: 2139case BoundKind.ConvertedTupleLiteral: 2141case BoundKind.ConditionalAccess: 2143case BoundKind.ConditionalReceiver: 2551case BoundKind.Conversion: 2558case BoundKind.DefaultLiteral: 2559case BoundKind.DefaultExpression: 3016if (!expr.IsSuppressed && RemoveConversion(expr, includeExplicitConversions: false).expression.Kind != BoundKind.ThrowExpression) 4022Debug.Assert(node.Kind is BoundKind.ObjectCreationExpression or BoundKind.DynamicObjectCreationExpression or BoundKind.NewT or BoundKind.NoPiaObjectCreationExpression); 4114case BoundKind.AssignmentOperator: 4129case BoundKind.CollectionElementInitializer: 4159case BoundKind.ObjectInitializerMember: 4413Debug.Assert(node.ImplicitReceiverOpt.Kind == BoundKind.ObjectOrCollectionValuePlaceholder); 4828if (child.Kind == BoundKind.ArrayInitialization) 5394case BoundKind.Conversion: 5398case BoundKind.AsOperator: 5401case BoundKind.ConditionalAccess: 5588while (possiblyConversion.Kind == BoundKind.Conversion) 7349return (argument.Kind == BoundKind.Lambda); 7949/// other than <see cref="BoundKind.ExpressionWithNullability"/> which is an expression 7956case BoundKind.DefaultLiteral: 7957case BoundKind.DefaultExpression: 7958case BoundKind.Literal: 7960case BoundKind.ExpressionWithNullability: 7962case BoundKind.MethodGroup: 7963case BoundKind.UnboundLambda: 7964case BoundKind.UnconvertedObjectCreationExpression: 7965case BoundKind.ConvertedTupleLiteral: 7966case BoundKind.UnconvertedCollectionExpression: 8006if (argument.Kind == BoundKind.Lambda) 8015if (argument.Kind == BoundKind.CollectionExpression) 8107if (expr.Kind != BoundKind.Conversion) 8192case BoundKind.InterpolatedString: 9029if (operandType.Type?.IsTupleType == true || conversionOperand.Kind == BoundKind.TupleLiteral) 10006if (left.Kind == BoundKind.EventAccess && ((BoundEventAccess)left).EventSymbol.IsWindowsRuntimeEvent) 10423case BoundKind.TupleLiteral: 10424case BoundKind.ConvertedTupleLiteral: 10441case BoundKind.TupleLiteral: 10442case BoundKind.ConvertedTupleLiteral: 10444case BoundKind.Conversion: 10638if (initializer.Kind == BoundKind.AddressOfOperator) 10644if (node.Expression.Kind == BoundKind.AddressOfOperator) 10896if (node.Expression.Kind != BoundKind.Conversion) 11424case BoundKind.BinaryOperator: 11427case BoundKind.UserDefinedConditionalLogicalOperator:
FlowAnalysis\NullableWalker.SnapshotManager.cs (1)
106if (node.Kind == BoundKind.TypeExpression || node.WasCompilerGenerated)
FlowAnalysis\ReadWriteWalker.cs (14)
142if (!IsInside && node.Span.Contains(RegionSpan) && (expr.Kind == BoundKind.FieldAccess)) 185case BoundKind.Local: 191case BoundKind.ThisReference: 197case BoundKind.BaseReference: 203case BoundKind.Parameter: 209case BoundKind.RangeVariable: 215case BoundKind.FieldAccess: 221case BoundKind.InlineArrayAccess: 235case BoundKind.RangeVariable: 239case BoundKind.QueryClause: 250case BoundKind.FieldAccess: 260case BoundKind.InlineArrayAccess: 301case BoundKind.Parameter: 303case BoundKind.PropertyAccess:
FlowAnalysis\RegionAnalysisContext.cs (2)
51case BoundKind.NamespaceExpression: 52case BoundKind.TypeExpression:
Generated\BoundNodes.xml.Generated.cs (565)
278protected BoundInitializer(BoundKind kind, SyntaxNode syntax, bool hasErrors) 283protected BoundInitializer(BoundKind kind, SyntaxNode syntax) 292protected BoundEqualsValue(BoundKind kind, SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, BoundExpression value, bool hasErrors = false) 310: base(BoundKind.FieldEqualsValue, syntax, locals, value, hasErrors || value.HasErrors()) 340: base(BoundKind.PropertyEqualsValue, syntax, locals, value, hasErrors || value.HasErrors()) 370: base(BoundKind.ParameterEqualsValue, syntax, locals, value, hasErrors || value.HasErrors()) 400: base(BoundKind.GlobalStatementInitializer, syntax, hasErrors || statement.HasErrors()) 427protected BoundExpression(BoundKind kind, SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 433protected BoundExpression(BoundKind kind, SyntaxNode syntax, TypeSymbol? type) 444protected BoundValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 449protected BoundValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type) 458protected BoundEarlyValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 463protected BoundEarlyValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type) 473: base(BoundKind.ValuePlaceholder, syntax, type, hasErrors) 478: base(BoundKind.ValuePlaceholder, syntax, type) 501: base(BoundKind.CapturedReceiverPlaceholder, syntax, type, hasErrors || receiver.HasErrors()) 531: base(BoundKind.DeconstructValuePlaceholder, syntax, type, hasErrors) 541: base(BoundKind.DeconstructValuePlaceholder, syntax, type) 572: base(BoundKind.TupleOperandPlaceholder, syntax, type, hasErrors) 580: base(BoundKind.TupleOperandPlaceholder, syntax, type) 607: base(BoundKind.AwaitableValuePlaceholder, syntax, type, hasErrors) 612: base(BoundKind.AwaitableValuePlaceholder, syntax, type) 636: base(BoundKind.DisposableValuePlaceholder, syntax, type, hasErrors) 644: base(BoundKind.DisposableValuePlaceholder, syntax, type) 671: base(BoundKind.ObjectOrCollectionValuePlaceholder, syntax, type, hasErrors) 680: base(BoundKind.ObjectOrCollectionValuePlaceholder, syntax, type) 709: base(BoundKind.ImplicitIndexerValuePlaceholder, syntax, type, hasErrors) 717: base(BoundKind.ImplicitIndexerValuePlaceholder, syntax, type) 744: base(BoundKind.ImplicitIndexerReceiverPlaceholder, syntax, type, hasErrors) 753: base(BoundKind.ImplicitIndexerReceiverPlaceholder, syntax, type) 782: base(BoundKind.ListPatternReceiverPlaceholder, syntax, type, hasErrors) 790: base(BoundKind.ListPatternReceiverPlaceholder, syntax, type) 817: base(BoundKind.ListPatternIndexPlaceholder, syntax, type, hasErrors) 825: base(BoundKind.ListPatternIndexPlaceholder, syntax, type) 852: base(BoundKind.SlicePatternReceiverPlaceholder, syntax, type, hasErrors) 860: base(BoundKind.SlicePatternReceiverPlaceholder, syntax, type) 887: base(BoundKind.SlicePatternRangePlaceholder, syntax, type, hasErrors) 895: base(BoundKind.SlicePatternRangePlaceholder, syntax, type) 922: base(BoundKind.Dup, syntax, type, hasErrors) 928: base(BoundKind.Dup, syntax, type) 953: base(BoundKind.PassByCopy, syntax, type, hasErrors || expression.HasErrors()) 981: base(BoundKind.BadExpression, syntax, type, hasErrors || childBoundNodes.HasErrors()) 1014: base(BoundKind.BadStatement, syntax, hasErrors || childBoundNodes.HasErrors()) 1042: base(BoundKind.ExtractedFinallyBlock, syntax, hasErrors || finallyBlock.HasErrors()) 1070: base(BoundKind.TypeExpression, syntax, type, hasErrors || boundContainingTypeOpt.HasErrors() || boundDimensionsOpt.HasErrors()) 1105: base(BoundKind.TypeOrValueExpression, syntax, type, hasErrors) 1114: base(BoundKind.TypeOrValueExpression, syntax, type) 1143: base(BoundKind.NamespaceExpression, syntax, null, hasErrors) 1153: base(BoundKind.NamespaceExpression, syntax, null) 1184: base(BoundKind.UnaryOperator, syntax, type, hasErrors || operand.HasErrors()) 1226: base(BoundKind.IncrementOperator, syntax, type, hasErrors || operand.HasErrors() || operandPlaceholder.HasErrors() || operandConversion.HasErrors() || resultPlaceholder.HasErrors() || resultConversion.HasErrors()) 1274: base(BoundKind.AddressOfOperator, syntax, type, hasErrors || operand.HasErrors()) 1306: base(BoundKind.UnconvertedAddressOfOperator, syntax, null, hasErrors || operand.HasErrors()) 1335: base(BoundKind.FunctionPointerLoad, syntax, type, hasErrors) 1346: base(BoundKind.FunctionPointerLoad, syntax, type) 1378: base(BoundKind.PointerIndirectionOperator, syntax, type, hasErrors || operand.HasErrors()) 1410: base(BoundKind.PointerElementAccess, syntax, type, hasErrors || expression.HasErrors() || index.HasErrors()) 1447: base(BoundKind.FunctionPointerInvocation, syntax, type, hasErrors || invokedExpression.HasErrors() || arguments.HasErrors()) 1484: base(BoundKind.RefTypeOperator, syntax, type, hasErrors || operand.HasErrors()) 1516: base(BoundKind.MakeRefOperator, syntax, type, hasErrors || operand.HasErrors()) 1546: base(BoundKind.RefValueOperator, syntax, type, hasErrors || operand.HasErrors()) 1578: base(BoundKind.FromEndIndexExpression, syntax, type, hasErrors || operand.HasErrors()) 1610: base(BoundKind.RangeExpression, syntax, type, hasErrors || leftOperandOpt.HasErrors() || rightOperandOpt.HasErrors()) 1642protected BoundBinaryOperatorBase(BoundKind kind, SyntaxNode syntax, BoundExpression left, BoundExpression right, TypeSymbol type, bool hasErrors = false) 1662: base(BoundKind.BinaryOperator, syntax, left, right, type, hasErrors || left.HasErrors() || right.HasErrors()) 1696: base(BoundKind.TupleBinaryOperator, syntax, type, hasErrors || left.HasErrors() || right.HasErrors()) 1734: base(BoundKind.UserDefinedConditionalLogicalOperator, syntax, left, right, type, hasErrors || left.HasErrors() || right.HasErrors()) 1779: base(BoundKind.CompoundAssignmentOperator, syntax, type, hasErrors || left.HasErrors() || right.HasErrors() || leftPlaceholder.HasErrors() || leftConversion.HasErrors() || finalPlaceholder.HasErrors() || finalConversion.HasErrors()) 1826: base(BoundKind.AssignmentOperator, syntax, type, hasErrors || left.HasErrors() || right.HasErrors()) 1860: base(BoundKind.DeconstructionAssignmentOperator, syntax, type, hasErrors || left.HasErrors() || right.HasErrors()) 1895: base(BoundKind.NullCoalescingOperator, syntax, type, hasErrors || leftOperand.HasErrors() || rightOperand.HasErrors() || leftPlaceholder.HasErrors() || leftConversion.HasErrors()) 1936: base(BoundKind.NullCoalescingAssignmentOperator, syntax, type, hasErrors || leftOperand.HasErrors() || rightOperand.HasErrors()) 1967: base(BoundKind.UnconvertedConditionalOperator, syntax, null, hasErrors || condition.HasErrors() || consequence.HasErrors() || alternative.HasErrors()) 2006: base(BoundKind.ConditionalOperator, syntax, type, hasErrors || condition.HasErrors() || consequence.HasErrors() || alternative.HasErrors()) 2050: base(BoundKind.ArrayAccess, syntax, type, hasErrors || expression.HasErrors() || indices.HasErrors()) 2083: base(BoundKind.RefArrayAccess, syntax, null, hasErrors || arrayAccess.HasErrors()) 2112: base(BoundKind.ArrayLength, syntax, type, hasErrors || expression.HasErrors()) 2142: base(BoundKind.AwaitableInfo, syntax, hasErrors || awaitableInstancePlaceholder.HasErrors() || getAwaiter.HasErrors()) 2175: base(BoundKind.AwaitExpression, syntax, type, hasErrors || expression.HasErrors() || awaitableInfo.HasErrors()) 2209protected BoundTypeOf(BoundKind kind, SyntaxNode syntax, MethodSymbol? getTypeFromHandle, TypeSymbol type, bool hasErrors) 2218protected BoundTypeOf(BoundKind kind, SyntaxNode syntax, MethodSymbol? getTypeFromHandle, TypeSymbol type) 2234: base(BoundKind.TypeOfOperator, syntax, getTypeFromHandle, type, hasErrors || sourceType.HasErrors()) 2263: base(BoundKind.BlockInstrumentation, syntax, hasErrors || prologue.HasErrors() || epilogue.HasErrors()) 2295: base(BoundKind.MethodDefIndex, syntax, type, hasErrors) 2305: base(BoundKind.MethodDefIndex, syntax, type) 2335: base(BoundKind.LocalId, syntax, type, hasErrors) 2346: base(BoundKind.LocalId, syntax, type) 2378: base(BoundKind.ParameterId, syntax, type, hasErrors) 2389: base(BoundKind.ParameterId, syntax, type) 2421: base(BoundKind.StateMachineInstanceId, syntax, type, hasErrors) 2429: base(BoundKind.StateMachineInstanceId, syntax, type) 2456: base(BoundKind.MaximumMethodDefIndex, syntax, type, hasErrors) 2464: base(BoundKind.MaximumMethodDefIndex, syntax, type) 2491: base(BoundKind.InstrumentationPayloadRoot, syntax, type, hasErrors) 2500: base(BoundKind.InstrumentationPayloadRoot, syntax, type) 2529: base(BoundKind.ThrowIfModuleCancellationRequested, syntax, type, hasErrors) 2537: base(BoundKind.ThrowIfModuleCancellationRequested, syntax, type) 2564: base(BoundKind.ModuleCancellationTokenExpression, syntax, type, hasErrors) 2572: base(BoundKind.ModuleCancellationTokenExpression, syntax, type) 2599: base(BoundKind.ModuleVersionId, syntax, type, hasErrors) 2607: base(BoundKind.ModuleVersionId, syntax, type) 2634: base(BoundKind.ModuleVersionIdString, syntax, type, hasErrors) 2642: base(BoundKind.ModuleVersionIdString, syntax, type) 2669: base(BoundKind.SourceDocumentIndex, syntax, type, hasErrors) 2679: base(BoundKind.SourceDocumentIndex, syntax, type) 2709: base(BoundKind.MethodInfo, syntax, type, hasErrors) 2720: base(BoundKind.MethodInfo, syntax, type) 2752: base(BoundKind.FieldInfo, syntax, type, hasErrors) 2763: base(BoundKind.FieldInfo, syntax, type) 2795: base(BoundKind.DefaultLiteral, syntax, null, hasErrors) 2800: base(BoundKind.DefaultLiteral, syntax, null) 2818: base(BoundKind.DefaultExpression, syntax, type, hasErrors || targetType.HasErrors()) 2849: base(BoundKind.IsOperator, syntax, type, hasErrors || operand.HasErrors() || targetType.HasErrors()) 2884: base(BoundKind.AsOperator, syntax, type, hasErrors || operand.HasErrors() || targetType.HasErrors() || operandPlaceholder.HasErrors() || operandConversion.HasErrors()) 2921: base(BoundKind.SizeOfOperator, syntax, type, hasErrors || sourceType.HasErrors()) 2953: base(BoundKind.Conversion, syntax, type, hasErrors || operand.HasErrors()) 2997: base(BoundKind.ReadOnlySpanFromArray, syntax, type, hasErrors || operand.HasErrors()) 3030: base(BoundKind.ArgList, syntax, type, hasErrors) 3038: base(BoundKind.ArgList, syntax, type) 3065: base(BoundKind.ArgListOperator, syntax, type, hasErrors || arguments.HasErrors()) 3096: base(BoundKind.FixedLocalCollectionInitializer, syntax, type, hasErrors || elementPointerPlaceholder.HasErrors() || elementPointerConversion.HasErrors() || expression.HasErrors()) 3134protected BoundStatement(BoundKind kind, SyntaxNode syntax, bool hasErrors) 3139protected BoundStatement(BoundKind kind, SyntaxNode syntax) 3149: base(BoundKind.SequencePoint, syntax, hasErrors || statementOpt.HasErrors()) 3174: base(BoundKind.SequencePointWithSpan, syntax, hasErrors || statementOpt.HasErrors()) 3201: base(BoundKind.SavePreviousSequencePoint, syntax, hasErrors) 3210: base(BoundKind.SavePreviousSequencePoint, syntax) 3238: base(BoundKind.RestorePreviousSequencePoint, syntax, hasErrors) 3247: base(BoundKind.RestorePreviousSequencePoint, syntax) 3275: base(BoundKind.StepThroughSequencePoint, syntax, hasErrors) 3281: base(BoundKind.StepThroughSequencePoint, syntax) 3306: base(BoundKind.Block, syntax, statements, hasErrors || instrumentation.HasErrors() || statements.HasErrors()) 3342: base(BoundKind.Scope, syntax, statements, hasErrors || statements.HasErrors()) 3371: base(BoundKind.StateMachineScope, syntax, hasErrors || statement.HasErrors()) 3402: base(BoundKind.LocalDeclaration, syntax, hasErrors || declaredTypeOpt.HasErrors() || initializerOpt.HasErrors() || argumentsOpt.HasErrors()) 3437protected BoundMultipleLocalDeclarationsBase(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundLocalDeclaration> localDeclarations, bool hasErrors = false) 3452: base(BoundKind.MultipleLocalDeclarations, syntax, localDeclarations, hasErrors || localDeclarations.HasErrors()) 3478: base(BoundKind.UsingLocalDeclarations, syntax, localDeclarations, hasErrors || awaitOpt.HasErrors() || localDeclarations.HasErrors()) 3508: base(BoundKind.LocalFunctionStatement, syntax, hasErrors || blockBody.HasErrors() || expressionBody.HasErrors()) 3540: base(BoundKind.NoOpStatement, syntax, hasErrors) 3546: base(BoundKind.NoOpStatement, syntax) 3571: base(BoundKind.ReturnStatement, syntax, hasErrors || expressionOpt.HasErrors()) 3600: base(BoundKind.YieldReturnStatement, syntax, hasErrors || expression.HasErrors()) 3628: base(BoundKind.YieldBreakStatement, syntax, hasErrors) 3633: base(BoundKind.YieldBreakStatement, syntax) 3645: base(BoundKind.ThrowStatement, syntax, hasErrors || expressionOpt.HasErrors()) 3670: base(BoundKind.ExpressionStatement, syntax, hasErrors || expression.HasErrors()) 3698: base(BoundKind.BreakStatement, syntax, hasErrors) 3707: base(BoundKind.BreakStatement, syntax) 3735: base(BoundKind.ContinueStatement, syntax, hasErrors) 3744: base(BoundKind.ContinueStatement, syntax) 3772: base(BoundKind.SwitchStatement, syntax, hasErrors || expression.HasErrors() || switchSections.HasErrors() || reachabilityDecisionDag.HasErrors() || defaultLabel.HasErrors()) 3817: base(BoundKind.SwitchDispatch, syntax, hasErrors || expression.HasErrors()) 3853: base(BoundKind.IfStatement, syntax, hasErrors || condition.HasErrors() || consequence.HasErrors() || alternativeOpt.HasErrors()) 3885protected BoundLoopStatement(BoundKind kind, SyntaxNode syntax, GeneratedLabelSymbol breakLabel, GeneratedLabelSymbol continueLabel, bool hasErrors) 3896protected BoundLoopStatement(BoundKind kind, SyntaxNode syntax, GeneratedLabelSymbol breakLabel, GeneratedLabelSymbol continueLabel) 3913protected BoundConditionalLoopStatement(BoundKind kind, SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, BoundExpression condition, BoundStatement body, GeneratedLabelSymbol breakLabel, GeneratedLabelSymbol continueLabel, bool hasErrors = false) 3936: base(BoundKind.DoStatement, syntax, locals, condition, body, breakLabel, continueLabel, hasErrors || condition.HasErrors() || body.HasErrors()) 3966: base(BoundKind.WhileStatement, syntax, locals, condition, body, breakLabel, continueLabel, hasErrors || condition.HasErrors() || body.HasErrors()) 3996: base(BoundKind.ForStatement, syntax, breakLabel, continueLabel, hasErrors || initializer.HasErrors() || condition.HasErrors() || increment.HasErrors() || body.HasErrors()) 4038: base(BoundKind.ForEachStatement, syntax, breakLabel, continueLabel, hasErrors || elementPlaceholder.HasErrors() || elementConversion.HasErrors() || iterationVariableType.HasErrors() || iterationErrorExpressionOpt.HasErrors() || expression.HasErrors() || deconstructionOpt.HasErrors() || awaitOpt.HasErrors() || body.HasErrors()) 4089: base(BoundKind.ForEachDeconstructStep, syntax, hasErrors || deconstructionAssignment.HasErrors() || targetPlaceholder.HasErrors()) 4120: base(BoundKind.UsingStatement, syntax, hasErrors || declarationsOpt.HasErrors() || expressionOpt.HasErrors() || body.HasErrors() || awaitOpt.HasErrors()) 4159: base(BoundKind.FixedStatement, syntax, hasErrors || declarations.HasErrors() || body.HasErrors()) 4193: base(BoundKind.LockStatement, syntax, hasErrors || argument.HasErrors() || body.HasErrors()) 4224: base(BoundKind.TryStatement, syntax, hasErrors || tryBlock.HasErrors() || catchBlocks.HasErrors() || finallyBlockOpt.HasErrors()) 4261: base(BoundKind.CatchBlock, syntax, hasErrors || exceptionSourceOpt.HasErrors() || exceptionFilterPrologueOpt.HasErrors() || exceptionFilterOpt.HasErrors() || body.HasErrors()) 4302: base(BoundKind.Literal, syntax, type, hasErrors) 4308: base(BoundKind.Literal, syntax, type) 4333: base(BoundKind.Utf8String, syntax, type, hasErrors) 4343: base(BoundKind.Utf8String, syntax, type) 4373: base(BoundKind.ThisReference, syntax, type, hasErrors) 4381: base(BoundKind.ThisReference, syntax, type) 4408: base(BoundKind.PreviousSubmissionReference, syntax, type, hasErrors) 4416: base(BoundKind.PreviousSubmissionReference, syntax, type) 4443: base(BoundKind.HostObjectMemberReference, syntax, type, hasErrors) 4451: base(BoundKind.HostObjectMemberReference, syntax, type) 4478: base(BoundKind.BaseReference, syntax, type, hasErrors) 4483: base(BoundKind.BaseReference, syntax, type) 4507: base(BoundKind.Local, syntax, type, hasErrors) 4520: base(BoundKind.Local, syntax, type) 4556: base(BoundKind.PseudoVariable, syntax, type, hasErrors) 4568: base(BoundKind.PseudoVariable, syntax, type) 4601: base(BoundKind.RangeVariable, syntax, type, hasErrors || value.HasErrors()) 4634: base(BoundKind.Parameter, syntax, type, hasErrors) 4644: base(BoundKind.Parameter, syntax, type) 4674: base(BoundKind.LabelStatement, syntax, hasErrors) 4683: base(BoundKind.LabelStatement, syntax) 4711: base(BoundKind.GotoStatement, syntax, hasErrors || caseExpressionOpt.HasErrors() || labelExpressionOpt.HasErrors()) 4743: base(BoundKind.LabeledStatement, syntax, hasErrors || body.HasErrors()) 4774: base(BoundKind.Label, syntax, type, hasErrors) 4783: base(BoundKind.Label, syntax, type) 4810protected BoundStatementList(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundStatement> statements, bool hasErrors = false) 4820: base(BoundKind.StatementList, syntax, hasErrors || statements.HasErrors()) 4848: base(BoundKind.ConditionalGoto, syntax, hasErrors || condition.HasErrors()) 4880protected BoundSwitchExpression(BoundKind kind, SyntaxNode syntax, BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol? type, bool hasErrors = false) 4905: base(BoundKind.SwitchExpressionArm, syntax, hasErrors || pattern.HasErrors() || whenClause.HasErrors() || value.HasErrors()) 4944: base(BoundKind.UnconvertedSwitchExpression, syntax, expression, switchArms, reachabilityDecisionDag, defaultLabel, reportedNotExhaustive, type, hasErrors || expression.HasErrors() || switchArms.HasErrors() || reachabilityDecisionDag.HasErrors()) 4972: base(BoundKind.ConvertedSwitchExpression, syntax, expression, switchArms, reachabilityDecisionDag, defaultLabel, reportedNotExhaustive, type, hasErrors || expression.HasErrors() || switchArms.HasErrors() || reachabilityDecisionDag.HasErrors()) 5006: base(BoundKind.DecisionDag, syntax, hasErrors || rootNode.HasErrors()) 5033protected BoundDecisionDagNode(BoundKind kind, SyntaxNode syntax, bool hasErrors) 5038protected BoundDecisionDagNode(BoundKind kind, SyntaxNode syntax) 5048: base(BoundKind.EvaluationDecisionDagNode, syntax, hasErrors || evaluation.HasErrors() || next.HasErrors()) 5079: base(BoundKind.TestDecisionDagNode, syntax, hasErrors || test.HasErrors() || whenTrue.HasErrors() || whenFalse.HasErrors()) 5113: base(BoundKind.WhenDecisionDagNode, syntax, hasErrors || whenExpression.HasErrors() || whenTrue.HasErrors() || whenFalse.HasErrors()) 5148: base(BoundKind.LeafDecisionDagNode, syntax, hasErrors) 5157: base(BoundKind.LeafDecisionDagNode, syntax) 5184protected BoundDagTest(BoundKind kind, SyntaxNode syntax, BoundDagTemp input, bool hasErrors = false) 5199: base(BoundKind.DagTemp, syntax, hasErrors || source.HasErrors()) 5231: base(BoundKind.DagTypeTest, syntax, input, hasErrors || input.HasErrors()) 5260: base(BoundKind.DagNonNullTest, syntax, input, hasErrors || input.HasErrors()) 5288: base(BoundKind.DagExplicitNullTest, syntax, input, hasErrors || input.HasErrors()) 5314: base(BoundKind.DagValueTest, syntax, input, hasErrors || input.HasErrors()) 5343: base(BoundKind.DagRelationalTest, syntax, input, hasErrors || input.HasErrors()) 5373protected BoundDagEvaluation(BoundKind kind, SyntaxNode syntax, BoundDagTemp input, bool hasErrors = false) 5386: base(BoundKind.DagDeconstructEvaluation, syntax, input, hasErrors || input.HasErrors()) 5415: base(BoundKind.DagTypeEvaluation, syntax, input, hasErrors || input.HasErrors()) 5444: base(BoundKind.DagFieldEvaluation, syntax, input, hasErrors || input.HasErrors()) 5473: base(BoundKind.DagPropertyEvaluation, syntax, input, hasErrors || input.HasErrors()) 5504: base(BoundKind.DagIndexEvaluation, syntax, input, hasErrors || input.HasErrors()) 5535: base(BoundKind.DagIndexerEvaluation, syntax, input, hasErrors || lengthTemp.HasErrors() || indexerAccess.HasErrors() || receiverPlaceholder.HasErrors() || argumentPlaceholder.HasErrors() || input.HasErrors()) 5582: base(BoundKind.DagSliceEvaluation, syntax, input, hasErrors || lengthTemp.HasErrors() || indexerAccess.HasErrors() || receiverPlaceholder.HasErrors() || argumentPlaceholder.HasErrors() || input.HasErrors()) 5631: base(BoundKind.DagAssignmentEvaluation, syntax, input, hasErrors || target.HasErrors() || input.HasErrors()) 5660: base(BoundKind.SwitchSection, syntax, statements, hasErrors || switchLabels.HasErrors() || statements.HasErrors()) 5692: base(BoundKind.SwitchLabel, syntax, hasErrors || pattern.HasErrors() || whenClause.HasErrors()) 5724protected BoundMethodOrPropertyGroup(BoundKind kind, SyntaxNode syntax, BoundExpression? receiverOpt, LookupResultKind resultKind, bool hasErrors = false) 5739: base(BoundKind.SequencePointExpression, syntax, type, hasErrors || expression.HasErrors()) 5767: base(BoundKind.Sequence, syntax, type, hasErrors || sideEffects.HasErrors() || value.HasErrors()) 5803: base(BoundKind.SpillSequence, syntax, type, hasErrors || sideEffects.HasErrors() || value.HasErrors()) 5839: base(BoundKind.DynamicMemberAccess, syntax, type, hasErrors || receiver.HasErrors()) 5877protected BoundDynamicInvocableBase(BoundKind kind, SyntaxNode syntax, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol? type, bool hasErrors = false) 5895: base(BoundKind.DynamicInvocation, syntax, expression, arguments, type, hasErrors || expression.HasErrors() || arguments.HasErrors()) 5931: base(BoundKind.ConditionalAccess, syntax, type, hasErrors || receiver.HasErrors() || accessExpression.HasErrors()) 5964: base(BoundKind.LoweredConditionalAccess, syntax, type, hasErrors || receiver.HasErrors() || whenNotNull.HasErrors() || whenNullOpt.HasErrors()) 6005: base(BoundKind.ConditionalReceiver, syntax, type, hasErrors) 6014: base(BoundKind.ConditionalReceiver, syntax, type) 6043: base(BoundKind.ComplexConditionalReceiver, syntax, type, hasErrors || valueTypeReceiver.HasErrors() || referenceTypeReceiver.HasErrors()) 6076: base(BoundKind.MethodGroup, syntax, receiverOpt, resultKind, hasErrors || receiverOpt.HasErrors()) 6117: base(BoundKind.PropertyGroup, syntax, receiverOpt, resultKind, hasErrors || receiverOpt.HasErrors()) 6145: base(BoundKind.Call, syntax, type, hasErrors || receiverOpt.HasErrors() || arguments.HasErrors()) 6200: base(BoundKind.EventAssignmentOperator, syntax, type, hasErrors || receiverOpt.HasErrors() || argument.HasErrors()) 6239: base(BoundKind.Attribute, syntax, type, hasErrors || constructorArguments.HasErrors() || namedArguments.HasErrors()) 6284: base(BoundKind.UnconvertedObjectCreationExpression, syntax, null, hasErrors || arguments.HasErrors()) 6321protected BoundObjectCreationExpressionBase(BoundKind kind, SyntaxNode syntax, TypeSymbol type, bool hasErrors) 6329protected BoundObjectCreationExpressionBase(BoundKind kind, SyntaxNode syntax, TypeSymbol type) 6343: base(BoundKind.ObjectCreationExpression, syntax, type, hasErrors || arguments.HasErrors() || initializerExpressionOpt.HasErrors()) 6393protected BoundCollectionExpressionBase(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundNode> elements, TypeSymbol? type, bool hasErrors = false) 6408: base(BoundKind.UnconvertedCollectionExpression, syntax, elements, null, hasErrors || elements.HasErrors()) 6435: base(BoundKind.CollectionExpression, syntax, elements, type, hasErrors || placeholder.HasErrors() || collectionCreation.HasErrors() || collectionBuilderInvocationPlaceholder.HasErrors() || collectionBuilderInvocationConversion.HasErrors() || unconvertedCollectionExpression.HasErrors() || elements.HasErrors()) 6480: base(BoundKind.CollectionExpressionSpreadExpressionPlaceholder, syntax, type, hasErrors) 6485: base(BoundKind.CollectionExpressionSpreadExpressionPlaceholder, syntax, type) 6508: base(BoundKind.CollectionExpressionSpreadElement, syntax, hasErrors || expression.HasErrors() || expressionPlaceholder.HasErrors() || conversion.HasErrors() || lengthOrCount.HasErrors() || elementPlaceholder.HasErrors() || iteratorBody.HasErrors()) 6547protected BoundTupleExpression(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type, bool hasErrors = false) 6566: base(BoundKind.TupleLiteral, syntax, arguments, argumentNamesOpt, inferredNamesOpt, type, hasErrors || arguments.HasErrors()) 6593: base(BoundKind.ConvertedTupleLiteral, syntax, arguments, argumentNamesOpt, inferredNamesOpt, type, hasErrors || sourceTuple.HasErrors() || arguments.HasErrors()) 6623: base(BoundKind.DynamicObjectCreationExpression, syntax, type, hasErrors || arguments.HasErrors() || initializerExpressionOpt.HasErrors()) 6666: base(BoundKind.NoPiaObjectCreationExpression, syntax, type, hasErrors || initializerExpressionOpt.HasErrors()) 6697protected BoundObjectInitializerExpressionBase(BoundKind kind, SyntaxNode syntax, BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type, bool hasErrors = false) 6717: base(BoundKind.ObjectInitializerExpression, syntax, placeholder, initializers, type, hasErrors || placeholder.HasErrors() || initializers.HasErrors()) 6745: base(BoundKind.ObjectInitializerMember, syntax, type, hasErrors || arguments.HasErrors()) 6794: base(BoundKind.DynamicObjectInitializerMember, syntax, type, hasErrors) 6806: base(BoundKind.DynamicObjectInitializerMember, syntax, type) 6839: base(BoundKind.CollectionInitializerExpression, syntax, placeholder, initializers, type, hasErrors || placeholder.HasErrors() || initializers.HasErrors()) 6867: base(BoundKind.CollectionElementInitializer, syntax, type, hasErrors || arguments.HasErrors() || implicitReceiverOpt.HasErrors()) 6912: base(BoundKind.DynamicCollectionElementInitializer, syntax, expression, arguments, type, hasErrors || expression.HasErrors() || arguments.HasErrors()) 6944: base(BoundKind.ImplicitReceiver, syntax, type, hasErrors) 6952: base(BoundKind.ImplicitReceiver, syntax, type) 6979: base(BoundKind.AnonymousObjectCreationExpression, syntax, type, hasErrors || arguments.HasErrors() || declarations.HasErrors()) 7015: base(BoundKind.AnonymousPropertyDeclaration, syntax, type, hasErrors) 7025: base(BoundKind.AnonymousPropertyDeclaration, syntax, type) 7055: base(BoundKind.NewT, syntax, type, hasErrors || initializerExpressionOpt.HasErrors()) 7085: base(BoundKind.DelegateCreationExpression, syntax, type, hasErrors || argument.HasErrors()) 7121: base(BoundKind.ArrayCreation, syntax, type, hasErrors || bounds.HasErrors() || initializerOpt.HasErrors()) 7153: base(BoundKind.ArrayInitialization, syntax, null, hasErrors || initializers.HasErrors()) 7183protected BoundStackAllocArrayCreationBase(BoundKind kind, SyntaxNode syntax, TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol? type, bool hasErrors = false) 7203: base(BoundKind.StackAllocArrayCreation, syntax, elementType, count, initializerOpt, type, hasErrors || count.HasErrors() || initializerOpt.HasErrors()) 7230: base(BoundKind.ConvertedStackAllocExpression, syntax, elementType, count, initializerOpt, type, hasErrors || count.HasErrors() || initializerOpt.HasErrors()) 7259: base(BoundKind.FieldAccess, syntax, type, hasErrors || receiverOpt.HasErrors()) 7299: base(BoundKind.HoistedFieldAccess, syntax, type, hasErrors) 7309: base(BoundKind.HoistedFieldAccess, syntax, type) 7339: base(BoundKind.PropertyAccess, syntax, type, hasErrors || receiverOpt.HasErrors()) 7377: base(BoundKind.EventAccess, syntax, type, hasErrors || receiverOpt.HasErrors()) 7413: base(BoundKind.IndexerAccess, syntax, type, hasErrors || receiverOpt.HasErrors() || arguments.HasErrors()) 7464: base(BoundKind.ImplicitIndexerAccess, syntax, type, hasErrors || receiver.HasErrors() || argument.HasErrors() || lengthOrCountAccess.HasErrors() || receiverPlaceholder.HasErrors() || indexerOrSliceAccess.HasErrors() || argumentPlaceholders.HasErrors()) 7513: base(BoundKind.InlineArrayAccess, syntax, type, hasErrors || expression.HasErrors() || argument.HasErrors()) 7554: base(BoundKind.DynamicIndexerAccess, syntax, type, hasErrors || receiver.HasErrors() || arguments.HasErrors()) 7594: base(BoundKind.Lambda, syntax, type, hasErrors || unboundLambda.HasErrors() || body.HasErrors()) 7634: base(BoundKind.UnboundLambda, syntax, null, hasErrors) 7645: base(BoundKind.UnboundLambda, syntax, null) 7678: base(BoundKind.QueryClause, syntax, type, hasErrors || value.HasErrors() || operation.HasErrors() || cast.HasErrors() || unoptimizedForm.HasErrors()) 7719: base(BoundKind.TypeOrInstanceInitializers, syntax, statements, hasErrors || statements.HasErrors()) 7745: base(BoundKind.NameOfOperator, syntax, type, hasErrors || argument.HasErrors()) 7777protected BoundInterpolatedStringBase(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type, bool hasErrors = false) 7794: base(BoundKind.UnconvertedInterpolatedString, syntax, parts, constantValueOpt, type, hasErrors || parts.HasErrors()) 7820: base(BoundKind.InterpolatedString, syntax, parts, constantValueOpt, type, hasErrors || parts.HasErrors()) 7848: base(BoundKind.InterpolatedStringHandlerPlaceholder, syntax, type, hasErrors) 7853: base(BoundKind.InterpolatedStringHandlerPlaceholder, syntax, type) 7876: base(BoundKind.InterpolatedStringArgumentPlaceholder, syntax, type, hasErrors) 7885: base(BoundKind.InterpolatedStringArgumentPlaceholder, syntax, type) 7914: base(BoundKind.StringInsert, syntax, null, hasErrors || value.HasErrors() || alignment.HasErrors() || format.HasErrors()) 7949: base(BoundKind.IsPatternExpression, syntax, type, hasErrors || expression.HasErrors() || pattern.HasErrors() || reachabilityDecisionDag.HasErrors()) 7990protected BoundPattern(BoundKind kind, SyntaxNode syntax, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors) 8001protected BoundPattern(BoundKind kind, SyntaxNode syntax, TypeSymbol inputType, TypeSymbol narrowedType) 8019: base(BoundKind.ConstantPattern, syntax, inputType, narrowedType, hasErrors || value.HasErrors()) 8056: base(BoundKind.DiscardPattern, syntax, inputType, narrowedType, hasErrors) 8069: base(BoundKind.DiscardPattern, syntax, inputType, narrowedType) 8095protected BoundObjectPattern(BoundKind kind, SyntaxNode syntax, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8113: base(BoundKind.DeclarationPattern, syntax, variable, variableAccess, inputType, narrowedType, hasErrors || declaredType.HasErrors() || variableAccess.HasErrors()) 8149: base(BoundKind.RecursivePattern, syntax, variable, variableAccess, inputType, narrowedType, hasErrors || declaredType.HasErrors() || deconstruction.HasErrors() || properties.HasErrors() || variableAccess.HasErrors()) 8190: base(BoundKind.ListPattern, syntax, variable, variableAccess, inputType, narrowedType, hasErrors || subpatterns.HasErrors() || lengthAccess.HasErrors() || indexerAccess.HasErrors() || receiverPlaceholder.HasErrors() || argumentPlaceholder.HasErrors() || variableAccess.HasErrors()) 8234: base(BoundKind.SlicePattern, syntax, inputType, narrowedType, hasErrors || pattern.HasErrors() || indexerAccess.HasErrors() || receiverPlaceholder.HasErrors() || argumentPlaceholder.HasErrors()) 8273: base(BoundKind.ITuplePattern, syntax, inputType, narrowedType, hasErrors || subpatterns.HasErrors()) 8312protected BoundSubpattern(BoundKind kind, SyntaxNode syntax, BoundPattern pattern, bool hasErrors = false) 8327: base(BoundKind.PositionalSubpattern, syntax, pattern, hasErrors || pattern.HasErrors()) 8355: base(BoundKind.PropertySubpattern, syntax, pattern, hasErrors || member.HasErrors() || pattern.HasErrors()) 8385: base(BoundKind.PropertySubpatternMember, syntax, hasErrors || receiver.HasErrors()) 8417: base(BoundKind.TypePattern, syntax, inputType, narrowedType, hasErrors || declaredType.HasErrors()) 8453: base(BoundKind.BinaryPattern, syntax, inputType, narrowedType, hasErrors || left.HasErrors() || right.HasErrors()) 8492: base(BoundKind.NegatedPattern, syntax, inputType, narrowedType, hasErrors || negated.HasErrors()) 8526: base(BoundKind.RelationalPattern, syntax, inputType, narrowedType, hasErrors || value.HasErrors()) 8565: base(BoundKind.DiscardExpression, syntax, type, hasErrors) 8572: base(BoundKind.DiscardExpression, syntax, type) 8600: base(BoundKind.ThrowExpression, syntax, type, hasErrors || expression.HasErrors()) 8627protected VariablePendingInference(BoundKind kind, SyntaxNode syntax, Symbol variableSymbol, BoundExpression? receiverOpt, bool hasErrors = false) 8645: base(BoundKind.OutVariablePendingInference, syntax, variableSymbol, receiverOpt, hasErrors || receiverOpt.HasErrors()) 8671: base(BoundKind.DeconstructionVariablePendingInference, syntax, variableSymbol, receiverOpt, hasErrors || receiverOpt.HasErrors()) 8697: base(BoundKind.OutDeconstructVarPendingInference, syntax, null, hasErrors) 8704: base(BoundKind.OutDeconstructVarPendingInference, syntax, null) 8731protected BoundMethodBodyBase(BoundKind kind, SyntaxNode syntax, BoundBlock? blockBody, BoundBlock? expressionBody, bool hasErrors = false) 8745: base(BoundKind.NonConstructorMethodBody, syntax, blockBody, expressionBody, hasErrors || blockBody.HasErrors() || expressionBody.HasErrors()) 8768: base(BoundKind.ConstructorMethodBody, syntax, blockBody, expressionBody, hasErrors || initializer.HasErrors() || blockBody.HasErrors() || expressionBody.HasErrors()) 8798: base(BoundKind.ExpressionWithNullability, syntax, type, hasErrors || expression.HasErrors()) 8829: base(BoundKind.WithExpression, syntax, type, hasErrors || receiver.HasErrors() || initializerExpression.HasErrors()) 8869case BoundKind.FieldEqualsValue: 8871case BoundKind.PropertyEqualsValue: 8873case BoundKind.ParameterEqualsValue: 8875case BoundKind.GlobalStatementInitializer: 8877case BoundKind.ValuePlaceholder: 8879case BoundKind.CapturedReceiverPlaceholder: 8881case BoundKind.DeconstructValuePlaceholder: 8883case BoundKind.TupleOperandPlaceholder: 8885case BoundKind.AwaitableValuePlaceholder: 8887case BoundKind.DisposableValuePlaceholder: 8889case BoundKind.ObjectOrCollectionValuePlaceholder: 8891case BoundKind.ImplicitIndexerValuePlaceholder: 8893case BoundKind.ImplicitIndexerReceiverPlaceholder: 8895case BoundKind.ListPatternReceiverPlaceholder: 8897case BoundKind.ListPatternIndexPlaceholder: 8899case BoundKind.SlicePatternReceiverPlaceholder: 8901case BoundKind.SlicePatternRangePlaceholder: 8903case BoundKind.Dup: 8905case BoundKind.PassByCopy: 8907case BoundKind.BadExpression: 8909case BoundKind.BadStatement: 8911case BoundKind.ExtractedFinallyBlock: 8913case BoundKind.TypeExpression: 8915case BoundKind.TypeOrValueExpression: 8917case BoundKind.NamespaceExpression: 8919case BoundKind.UnaryOperator: 8921case BoundKind.IncrementOperator: 8923case BoundKind.AddressOfOperator: 8925case BoundKind.UnconvertedAddressOfOperator: 8927case BoundKind.FunctionPointerLoad: 8929case BoundKind.PointerIndirectionOperator: 8931case BoundKind.PointerElementAccess: 8933case BoundKind.FunctionPointerInvocation: 8935case BoundKind.RefTypeOperator: 8937case BoundKind.MakeRefOperator: 8939case BoundKind.RefValueOperator: 8941case BoundKind.FromEndIndexExpression: 8943case BoundKind.RangeExpression: 8945case BoundKind.BinaryOperator: 8947case BoundKind.TupleBinaryOperator: 8949case BoundKind.UserDefinedConditionalLogicalOperator: 8951case BoundKind.CompoundAssignmentOperator: 8953case BoundKind.AssignmentOperator: 8955case BoundKind.DeconstructionAssignmentOperator: 8957case BoundKind.NullCoalescingOperator: 8959case BoundKind.NullCoalescingAssignmentOperator: 8961case BoundKind.UnconvertedConditionalOperator: 8963case BoundKind.ConditionalOperator: 8965case BoundKind.ArrayAccess: 8967case BoundKind.RefArrayAccess: 8969case BoundKind.ArrayLength: 8971case BoundKind.AwaitableInfo: 8973case BoundKind.AwaitExpression: 8975case BoundKind.TypeOfOperator: 8977case BoundKind.BlockInstrumentation: 8979case BoundKind.MethodDefIndex: 8981case BoundKind.LocalId: 8983case BoundKind.ParameterId: 8985case BoundKind.StateMachineInstanceId: 8987case BoundKind.MaximumMethodDefIndex: 8989case BoundKind.InstrumentationPayloadRoot: 8991case BoundKind.ThrowIfModuleCancellationRequested: 8993case BoundKind.ModuleCancellationTokenExpression: 8995case BoundKind.ModuleVersionId: 8997case BoundKind.ModuleVersionIdString: 8999case BoundKind.SourceDocumentIndex: 9001case BoundKind.MethodInfo: 9003case BoundKind.FieldInfo: 9005case BoundKind.DefaultLiteral: 9007case BoundKind.DefaultExpression: 9009case BoundKind.IsOperator: 9011case BoundKind.AsOperator: 9013case BoundKind.SizeOfOperator: 9015case BoundKind.Conversion: 9017case BoundKind.ReadOnlySpanFromArray: 9019case BoundKind.ArgList: 9021case BoundKind.ArgListOperator: 9023case BoundKind.FixedLocalCollectionInitializer: 9025case BoundKind.SequencePoint: 9027case BoundKind.SequencePointWithSpan: 9029case BoundKind.SavePreviousSequencePoint: 9031case BoundKind.RestorePreviousSequencePoint: 9033case BoundKind.StepThroughSequencePoint: 9035case BoundKind.Block: 9037case BoundKind.Scope: 9039case BoundKind.StateMachineScope: 9041case BoundKind.LocalDeclaration: 9043case BoundKind.MultipleLocalDeclarations: 9045case BoundKind.UsingLocalDeclarations: 9047case BoundKind.LocalFunctionStatement: 9049case BoundKind.NoOpStatement: 9051case BoundKind.ReturnStatement: 9053case BoundKind.YieldReturnStatement: 9055case BoundKind.YieldBreakStatement: 9057case BoundKind.ThrowStatement: 9059case BoundKind.ExpressionStatement: 9061case BoundKind.BreakStatement: 9063case BoundKind.ContinueStatement: 9065case BoundKind.SwitchStatement: 9067case BoundKind.SwitchDispatch: 9069case BoundKind.IfStatement: 9071case BoundKind.DoStatement: 9073case BoundKind.WhileStatement: 9075case BoundKind.ForStatement: 9077case BoundKind.ForEachStatement: 9079case BoundKind.ForEachDeconstructStep: 9081case BoundKind.UsingStatement: 9083case BoundKind.FixedStatement: 9085case BoundKind.LockStatement: 9087case BoundKind.TryStatement: 9089case BoundKind.CatchBlock: 9091case BoundKind.Literal: 9093case BoundKind.Utf8String: 9095case BoundKind.ThisReference: 9097case BoundKind.PreviousSubmissionReference: 9099case BoundKind.HostObjectMemberReference: 9101case BoundKind.BaseReference: 9103case BoundKind.Local: 9105case BoundKind.PseudoVariable: 9107case BoundKind.RangeVariable: 9109case BoundKind.Parameter: 9111case BoundKind.LabelStatement: 9113case BoundKind.GotoStatement: 9115case BoundKind.LabeledStatement: 9117case BoundKind.Label: 9119case BoundKind.StatementList: 9121case BoundKind.ConditionalGoto: 9123case BoundKind.SwitchExpressionArm: 9125case BoundKind.UnconvertedSwitchExpression: 9127case BoundKind.ConvertedSwitchExpression: 9129case BoundKind.DecisionDag: 9131case BoundKind.EvaluationDecisionDagNode: 9133case BoundKind.TestDecisionDagNode: 9135case BoundKind.WhenDecisionDagNode: 9137case BoundKind.LeafDecisionDagNode: 9139case BoundKind.DagTemp: 9141case BoundKind.DagTypeTest: 9143case BoundKind.DagNonNullTest: 9145case BoundKind.DagExplicitNullTest: 9147case BoundKind.DagValueTest: 9149case BoundKind.DagRelationalTest: 9151case BoundKind.DagDeconstructEvaluation: 9153case BoundKind.DagTypeEvaluation: 9155case BoundKind.DagFieldEvaluation: 9157case BoundKind.DagPropertyEvaluation: 9159case BoundKind.DagIndexEvaluation: 9161case BoundKind.DagIndexerEvaluation: 9163case BoundKind.DagSliceEvaluation: 9165case BoundKind.DagAssignmentEvaluation: 9167case BoundKind.SwitchSection: 9169case BoundKind.SwitchLabel: 9171case BoundKind.SequencePointExpression: 9173case BoundKind.Sequence: 9175case BoundKind.SpillSequence: 9177case BoundKind.DynamicMemberAccess: 9179case BoundKind.DynamicInvocation: 9181case BoundKind.ConditionalAccess: 9183case BoundKind.LoweredConditionalAccess: 9185case BoundKind.ConditionalReceiver: 9187case BoundKind.ComplexConditionalReceiver: 9189case BoundKind.MethodGroup: 9191case BoundKind.PropertyGroup: 9193case BoundKind.Call: 9195case BoundKind.EventAssignmentOperator: 9197case BoundKind.Attribute: 9199case BoundKind.UnconvertedObjectCreationExpression: 9201case BoundKind.ObjectCreationExpression: 9203case BoundKind.UnconvertedCollectionExpression: 9205case BoundKind.CollectionExpression: 9207case BoundKind.CollectionExpressionSpreadExpressionPlaceholder: 9209case BoundKind.CollectionExpressionSpreadElement: 9211case BoundKind.TupleLiteral: 9213case BoundKind.ConvertedTupleLiteral: 9215case BoundKind.DynamicObjectCreationExpression: 9217case BoundKind.NoPiaObjectCreationExpression: 9219case BoundKind.ObjectInitializerExpression: 9221case BoundKind.ObjectInitializerMember: 9223case BoundKind.DynamicObjectInitializerMember: 9225case BoundKind.CollectionInitializerExpression: 9227case BoundKind.CollectionElementInitializer: 9229case BoundKind.DynamicCollectionElementInitializer: 9231case BoundKind.ImplicitReceiver: 9233case BoundKind.AnonymousObjectCreationExpression: 9235case BoundKind.AnonymousPropertyDeclaration: 9237case BoundKind.NewT: 9239case BoundKind.DelegateCreationExpression: 9241case BoundKind.ArrayCreation: 9243case BoundKind.ArrayInitialization: 9245case BoundKind.StackAllocArrayCreation: 9247case BoundKind.ConvertedStackAllocExpression: 9249case BoundKind.FieldAccess: 9251case BoundKind.HoistedFieldAccess: 9253case BoundKind.PropertyAccess: 9255case BoundKind.EventAccess: 9257case BoundKind.IndexerAccess: 9259case BoundKind.ImplicitIndexerAccess: 9261case BoundKind.InlineArrayAccess: 9263case BoundKind.DynamicIndexerAccess: 9265case BoundKind.Lambda: 9267case BoundKind.UnboundLambda: 9269case BoundKind.QueryClause: 9271case BoundKind.TypeOrInstanceInitializers: 9273case BoundKind.NameOfOperator: 9275case BoundKind.UnconvertedInterpolatedString: 9277case BoundKind.InterpolatedString: 9279case BoundKind.InterpolatedStringHandlerPlaceholder: 9281case BoundKind.InterpolatedStringArgumentPlaceholder: 9283case BoundKind.StringInsert: 9285case BoundKind.IsPatternExpression: 9287case BoundKind.ConstantPattern: 9289case BoundKind.DiscardPattern: 9291case BoundKind.DeclarationPattern: 9293case BoundKind.RecursivePattern: 9295case BoundKind.ListPattern: 9297case BoundKind.SlicePattern: 9299case BoundKind.ITuplePattern: 9301case BoundKind.PositionalSubpattern: 9303case BoundKind.PropertySubpattern: 9305case BoundKind.PropertySubpatternMember: 9307case BoundKind.TypePattern: 9309case BoundKind.BinaryPattern: 9311case BoundKind.NegatedPattern: 9313case BoundKind.RelationalPattern: 9315case BoundKind.DiscardExpression: 9317case BoundKind.ThrowExpression: 9319case BoundKind.OutVariablePendingInference: 9321case BoundKind.DeconstructionVariablePendingInference: 9323case BoundKind.OutDeconstructVarPendingInference: 9325case BoundKind.NonConstructorMethodBody: 9327case BoundKind.ConstructorMethodBody: 9329case BoundKind.ExpressionWithNullability: 9331case BoundKind.WithExpression:
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (3)
310if (node.Expression.Kind == BoundKind.AwaitExpression) 314else if (node.Expression.Kind == BoundKind.AssignmentOperator) 317if (expression.Right.Kind == BoundKind.AwaitExpression)
Lowering\ClosureConversion\ClosureConversion.Analysis.cs (6)
110case BoundKind.SequencePoint: 114case BoundKind.SequencePointWithSpan: 118case BoundKind.Block: 119case BoundKind.StatementList: 120case BoundKind.FieldEqualsValue: 123case BoundKind.GlobalStatementInitializer:
Lowering\ClosureConversion\ClosureConversion.cs (3)
1104if (visited.Kind != BoundKind.Call) 1333if (node.Argument.Kind == BoundKind.Lambda) 1380receiver.Kind == BoundKind.TypeExpression &&
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (41)
140case BoundKind.ReturnStatement: 148case BoundKind.ExpressionStatement: 150case BoundKind.SequencePoint: 153case BoundKind.SequencePointWithSpan: 183case BoundKind.ArrayAccess: 185case BoundKind.ArrayCreation: 187case BoundKind.ArrayLength: 189case BoundKind.AsOperator: 191case BoundKind.BaseReference: 193case BoundKind.BinaryOperator: 196case BoundKind.UserDefinedConditionalLogicalOperator: 199case BoundKind.Call: 201case BoundKind.ConditionalOperator: 203case BoundKind.Conversion: 205case BoundKind.PassByCopy: 207case BoundKind.DelegateCreationExpression: 209case BoundKind.FieldAccess: 216case BoundKind.IsOperator: 218case BoundKind.Lambda: 220case BoundKind.NewT: 222case BoundKind.NullCoalescingOperator: 224case BoundKind.ObjectCreationExpression: 226case BoundKind.Parameter: 228case BoundKind.PointerIndirectionOperator: 230case BoundKind.PointerElementAccess: 232case BoundKind.PropertyAccess: 234case BoundKind.SizeOfOperator: 236case BoundKind.UnaryOperator: 239case BoundKind.DefaultExpression: 240case BoundKind.HostObjectMemberReference: 241case BoundKind.Literal: 242case BoundKind.Local: 243case BoundKind.MethodInfo: 244case BoundKind.PreviousSubmissionReference: 245case BoundKind.ThisReference: 246case BoundKind.TypeOfOperator: 533if (operand.Kind == BoundKind.Conversion) 787if (node.Argument.Kind == BoundKind.MethodGroup) 789throw ExceptionUtilities.UnexpectedValue(BoundKind.MethodGroup); 945case BoundKind.ObjectInitializerExpression: 996case BoundKind.CollectionInitializerExpression:
Lowering\DiagnosticsPass_ExpressionTrees.cs (8)
253if (_inExpressionLambda && node.Left.Kind != BoundKind.ObjectInitializerMember && node.Left.Kind != BoundKind.DynamicObjectInitializerMember) 277bool hasBaseReceiver = node.ReceiverOpt != null && node.ReceiverOpt.Kind == BoundKind.BaseReference; 291bool hasBaseReceiver = node.ReceiverOpt != null && node.ReceiverOpt.Kind == BoundKind.BaseReference; 665if (current.Left.Kind == BoundKind.BinaryOperator) 753if (operand.Kind == BoundKind.FieldAccess) 853if (node.Argument.Kind != BoundKind.MethodGroup) 937if (node.Expression.Kind == BoundKind.MethodGroup)
Lowering\DiagnosticsPass_Warnings.cs (25)
33case BoundKind.FieldAccess: 36case BoundKind.Local: 43case BoundKind.DiscardExpression: 97if (receiverOpt != null && receiverOpt.Kind == BoundKind.FieldAccess) 141while (receiver.Kind == BoundKind.Conversion) 148return receiver.Kind != BoundKind.ThisReference && receiver.Kind != BoundKind.BaseReference; 203case BoundKind.Local: 207case BoundKind.FieldAccess: 212case BoundKind.EventAccess: 217case BoundKind.Parameter: 221case BoundKind.RangeVariable: 225case BoundKind.ThisReference: 226case BoundKind.PreviousSubmissionReference: 227case BoundKind.HostObjectMemberReference: 317if (node.Left.ConstantValueOpt != null && node.Right.ConstantValueOpt == null && node.Right.Kind == BoundKind.Conversion) 322if (node.Right.ConstantValueOpt != null && node.Left.ConstantValueOpt == null && node.Left.Kind == BoundKind.Conversion) 347return node.Kind == BoundKind.Conversion && ((BoundConversion)node).ExplicitCastInCode; 353if (node.Kind != BoundKind.Conversion) return false; 577if (operand.Kind == BoundKind.Conversion) 606if (expr.Kind != BoundKind.Conversion) 865if (node.Kind == BoundKind.Conversion) 889while (right.Kind == BoundKind.Conversion) 904if (right.Kind != BoundKind.ConvertedTupleLiteral && right.Kind != BoundKind.TupleLiteral)
Lowering\Extensions.cs (4)
51if (expr.Kind == BoundKind.ObjectCreationExpression) 56else if (expr.Kind == BoundKind.Conversion) 97if (expr.Kind == BoundKind.ObjectCreationExpression) 103if (expr.Kind == BoundKind.Conversion)
Lowering\InitializerRewriter.cs (4)
46(initializer.Kind == BoundKind.GlobalStatementInitializer) && 84return (statement.Kind == BoundKind.ExpressionStatement) && ((ExpressionStatementSyntax)statement.Syntax).SemicolonToken.IsMissing ? 123case BoundKind.FieldEqualsValue: 125case BoundKind.GlobalStatementInitializer:
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (8)
529case BoundKind.IfStatement: 532case BoundKind.WhileStatement: 535case BoundKind.ForEachStatement: 538case BoundKind.DoStatement: 541case BoundKind.UsingStatement: 547case BoundKind.FixedStatement: 550case BoundKind.LockStatement: 553case BoundKind.SwitchStatement:
Lowering\Instrumentation\DebugInfoInjector.cs (1)
123if (rewritten.Kind == BoundKind.Block)
Lowering\Instrumentation\Instrumenter.cs (1)
307Debug.Assert(original.Kind == BoundKind.SwitchStatement);
Lowering\LocalRewriter\LocalRewriter.cs (42)
286node.Kind is not (BoundKind.ImplicitReceiver or BoundKind.ObjectOrCollectionValuePlaceholder or BoundKind.ValuePlaceholder)) 309return node.Kind == BoundKind.DeconstructionAssignmentOperator && !((BoundDeconstructionAssignmentOperator)node).IsUsed; 709if (initializer.Kind == BoundKind.Block) 881case BoundKind.Block: 886if (initializer.Kind == BoundKind.ExpressionStatement) 888goto case BoundKind.ExpressionStatement; 893case BoundKind.ExpressionStatement: 894return ((BoundExpressionStatement)initializer).Expression.Kind == BoundKind.AssignmentOperator; 911if (statement.Kind != BoundKind.ExpressionStatement) 922Debug.Assert(assignment.Left.Kind == BoundKind.FieldAccess); 1020case BoundKind.Parameter: 1021case BoundKind.Local: 1022case BoundKind.ArrayAccess: 1023case BoundKind.ThisReference: 1024case BoundKind.PointerIndirectionOperator: 1025case BoundKind.PointerElementAccess: 1026case BoundKind.RefValueOperator: 1027case BoundKind.PseudoVariable: 1028case BoundKind.DiscardExpression: 1031case BoundKind.DeconstructValuePlaceholder: 1036case BoundKind.InterpolatedStringArgumentPlaceholder: 1043case BoundKind.InterpolatedStringHandlerPlaceholder: 1048case BoundKind.CollectionExpressionSpreadExpressionPlaceholder: 1052case BoundKind.EventAccess: 1066case BoundKind.FieldAccess: 1077case BoundKind.Sequence: 1080case BoundKind.AssignmentOperator: 1083case BoundKind.ConditionalOperator: 1086case BoundKind.Call: 1089case BoundKind.PropertyAccess: 1092case BoundKind.IndexerAccess: 1095case BoundKind.ImplicitIndexerAccess: 1098case BoundKind.ImplicitIndexerReceiverPlaceholder: 1102case BoundKind.InlineArrayAccess: 1105case BoundKind.ImplicitIndexerValuePlaceholder: 1110case BoundKind.ListPatternReceiverPlaceholder: 1111case BoundKind.SlicePatternReceiverPlaceholder: 1112case BoundKind.SlicePatternRangePlaceholder: 1113case BoundKind.ListPatternIndexPlaceholder: 1116case BoundKind.Conversion:
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (4)
388ImmutableArray<BoundDecisionDagNode> nodesToLower = sortedNodes.WhereAsArray(n => n.Kind != BoundKind.WhenDecisionDagNode && n.Kind != BoundKind.LeafDecisionDagNode); 972if (!sortedNodes.Any(static n => n.Kind == BoundKind.WhenDecisionDagNode)) return; 1184Debug.Assert(left.Kind == BoundKind.Local && left == binding.VariableAccess);
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (4)
519if ((loweredInput.Kind == BoundKind.Local || loweredInput.Kind == BoundKind.Parameter) 644if (canShareInputs && (expr.Kind == BoundKind.Parameter || expr.Kind == BoundKind.Local) && _tempAllocator.TrySetTemp(temp, expr))
Lowering\LocalRewriter\LocalRewriter_AssignmentOperator.cs (19)
29case BoundKind.PropertyAccess: 33case BoundKind.IndexerAccess: 37case BoundKind.ImplicitIndexerAccess: 43case BoundKind.EventAccess: 54case BoundKind.DynamicMemberAccess: 62case BoundKind.DynamicIndexerAccess: 96case BoundKind.DynamicIndexerAccess: 107case BoundKind.DynamicMemberAccess: 116case BoundKind.EventAccess: 175case BoundKind.DynamicIndexerAccess: 176case BoundKind.DynamicMemberAccess: 179case BoundKind.PropertyAccess: 198case BoundKind.IndexerAccess: 218case BoundKind.Local: 219case BoundKind.Parameter: 220case BoundKind.FieldAccess: 230case BoundKind.DiscardExpression: 235case BoundKind.Sequence: 241if (sequence.Value.Kind == BoundKind.IndexerAccess)
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (13)
284if (loweredRight.Kind == BoundKind.Local || loweredRight.Kind == BoundKind.Parameter) 296if (loweredRight.Kind == BoundKind.Local || loweredRight.Kind == BoundKind.Parameter) 483if (loweredLeft.Kind == BoundKind.ArrayLength && loweredRight.IsDefaultValue()) 498if (loweredRight.Kind == BoundKind.ArrayLength && loweredLeft.IsDefaultValue()) 513if (loweredLeft.Kind == BoundKind.ArrayLength && loweredRight.IsDefaultValue()) 517else if (loweredRight.Kind == BoundKind.ArrayLength && loweredLeft.IsDefaultValue()) 652if (constantLeft == null && loweredLeft.Kind != BoundKind.Local && loweredLeft.Kind != BoundKind.Parameter) 713if (expression.Kind == BoundKind.Conversion) 1608if (nonNullRight != null && nonNullRight.ConstantValueOpt != null && left.Kind == BoundKind.Sequence) 1611if (seq.Value.Kind == BoundKind.ConditionalOperator)
Lowering\LocalRewriter\LocalRewriter_Block.cs (2)
111case BoundKind.LabeledStatement: 114case BoundKind.UsingLocalDeclarations:
Lowering\LocalRewriter\LocalRewriter_Call.cs (10)
35case BoundKind.MethodGroup: 43Debug.Assert(methodGroup.ReceiverOpt == null || methodGroup.ReceiverOpt.Kind != BoundKind.TypeOrValueExpression); 70case BoundKind.DynamicMemberAccess: 554case BoundKind.Parameter: 556goto case BoundKind.Local; 558case BoundKind.Local: 562case BoundKind.PassByCopy: 564case BoundKind.Conversion: 1537if (argument.Kind == BoundKind.Local) 1626if (argument.Kind == BoundKind.Local)
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (40)
41if (node.Left.Kind == BoundKind.DynamicMemberAccess && 189Debug.Assert(receiverOpt.Kind != BoundKind.TypeExpression); 480Debug.Assert(receiver.Kind != BoundKind.TypeExpression); 592case BoundKind.PropertyAccess: 607case BoundKind.IndexerAccess: 619case BoundKind.ImplicitIndexerAccess: 632case BoundKind.FieldAccess: 649case BoundKind.ArrayAccess: 677case BoundKind.InlineArrayAccess: 681case BoundKind.DynamicMemberAccess: 684case BoundKind.DynamicIndexerAccess: 687case BoundKind.Local: 688case BoundKind.Parameter: 689case BoundKind.ThisReference: // a special kind of parameter 690case BoundKind.PseudoVariable: 698case BoundKind.Call: 702case BoundKind.FunctionPointerInvocation: 706case BoundKind.ConditionalOperator: 710case BoundKind.AssignmentOperator: 714case BoundKind.PointerElementAccess: 715case BoundKind.PointerIndirectionOperator: 716case BoundKind.RefValueOperator: 719case BoundKind.EventAccess: 842case BoundKind.ThisReference: 845case BoundKind.BaseReference: 848case BoundKind.Literal: 852case BoundKind.Parameter: 857case BoundKind.Local: 860case BoundKind.TypeExpression: 884case BoundKind.Parameter: 886goto case BoundKind.Local; 887case BoundKind.Local: 888case BoundKind.Lambda: 889case BoundKind.ThisReference: 890case BoundKind.BaseReference: 891case BoundKind.Literal: 894case BoundKind.Conversion: 899case BoundKind.PassByCopy: 902case BoundKind.ObjectCreationExpression: 914case BoundKind.Call:
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (4)
245case BoundKind.Sequence: 249case BoundKind.Conversion: 1305if (operand.Kind == BoundKind.Sequence) 1308if (seq.Value.Kind == BoundKind.ConditionalOperator)
Lowering\LocalRewriter\LocalRewriter_DeconstructionAssignmentOperator.cs (13)
62if (right.Kind == BoundKind.ConditionalOperator) 114Debug.Assert(right is not ({ Kind: BoundKind.TupleLiteral } or BoundConversion { Operand.Kind: BoundKind.TupleLiteral })); 117right is { Kind: BoundKind.ConvertedTupleLiteral } or BoundConversion { Operand.Kind: BoundKind.ConvertedTupleLiteral } 252if (leftTarget.Kind != BoundKind.DiscardExpression) 304if (right.Kind == BoundKind.Conversion) 328private static bool IsTupleExpression(BoundKind kind) 330return kind == BoundKind.TupleLiteral || kind == BoundKind.ConvertedTupleLiteral; 451case BoundKind.DiscardExpression: 455case BoundKind.TupleLiteral: 456case BoundKind.ConvertedTupleLiteral:
Lowering\LocalRewriter\LocalRewriter_DelegateCreationExpression.cs (1)
28if (node.Argument.Kind == BoundKind.MethodGroup)
Lowering\LocalRewriter\LocalRewriter_ExpressionStatement.cs (6)
50case BoundKind.AwaitExpression: 53case BoundKind.AssignmentOperator: 57case BoundKind.CompoundAssignmentOperator: 60case BoundKind.Call: 71case BoundKind.DynamicInvocation: 75case BoundKind.ConditionalAccess:
Lowering\LocalRewriter\LocalRewriter_Field.cs (1)
66if (rewrittenReceiver?.Kind == BoundKind.DefaultExpression)
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (1)
245Debug.Assert(initializerExpr.Kind == BoundKind.AddressOfOperator);
Lowering\LocalRewriter\LocalRewriter_ForStatement.cs (6)
51Debug.Assert(original.Kind is BoundKind.ForStatement or BoundKind.ForEachStatement or BoundKind.CollectionExpressionSpreadElement); 148case BoundKind.ForEachStatement: 151case BoundKind.ForStatement: 154case BoundKind.CollectionExpressionSpreadElement:
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (8)
497if (node.LengthOrCountAccess.Kind is not BoundKind.Local || receiver.Kind is not (BoundKind.Local or BoundKind.Parameter)) 539if (makeOffsetInput.ConstantValueOpt is null && lengthAccess.Kind is not BoundKind.ArrayLength) 799if (node.LengthOrCountAccess.Kind is not BoundKind.Local || receiver.Kind is not (BoundKind.Local or BoundKind.Parameter)) 950if ((rewriteFlags & captureLength) != 0 && lengthAccess.Kind is not BoundKind.Local)
Lowering\LocalRewriter\LocalRewriter_IsOperator.cs (2)
33if (rewrittenOperand.Kind == BoundKind.MethodGroup) 37if (receiver != null && receiver.Kind != BoundKind.ThisReference)
Lowering\LocalRewriter\LocalRewriter_IsPatternOperator.cs (2)
244while (node.Kind != BoundKind.LeafDecisionDagNode && node.Kind != BoundKind.WhenDecisionDagNode)
Lowering\LocalRewriter\LocalRewriter_NullCoalescingAssignmentOperator.cs (2)
90Debug.Assert(!_inExpressionLambda && lhsRead.Kind != BoundKind.PropertyAccess); 94if (lhsRead.Kind == BoundKind.Call)
Lowering\LocalRewriter\LocalRewriter_NullCoalescingOperator.cs (2)
192if (expression.Kind != BoundKind.Call) 221while (expression.Kind == BoundKind.Conversion)
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (11)
72case BoundKind.ObjectInitializerExpression: 75case BoundKind.CollectionInitializerExpression: 98if (initializer.Kind == BoundKind.CollectionElementInitializer) 105Debug.Assert(initializer.Kind == BoundKind.DynamicCollectionElementInitializer); 281bool isRhsNestedInitializer = right.Kind is BoundKind.ObjectInitializerExpression or BoundKind.CollectionInitializerExpression; 294case BoundKind.ObjectInitializerMember: 375case BoundKind.DynamicObjectInitializerMember: 401case BoundKind.ArrayAccess: 447case BoundKind.PointerElementAccess: 480case BoundKind.ImplicitIndexerAccess:
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (1)
615if (expr.Kind == BoundKind.Conversion)
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (1)
191if (length == 1 && result is not ({ Kind: BoundKind.InterpolatedString } or { ConstantValueOpt.IsString: true }))
Lowering\LocalRewriter\LocalRewriter_TryStatement.cs (4)
52case BoundKind.NoOpStatement: 54case BoundKind.Block: 63case BoundKind.SequencePoint: 68case BoundKind.SequencePointWithSpan:
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (10)
45if (node.Operand.Kind == BoundKind.BinaryOperator) 321if (loweredOperand.Kind == BoundKind.Sequence) 324if (seq.Value.Kind == BoundKind.ConditionalOperator) 488case BoundKind.Local: 491case BoundKind.Parameter: 495case BoundKind.FieldAccess: 864case BoundKind.PropertyAccess: 868case BoundKind.DynamicMemberAccess: 872case BoundKind.IndexerAccess: 876case BoundKind.DynamicIndexerAccess:
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (1)
40BoundBlock tryBlock = rewrittenBody.Kind == BoundKind.Block
Lowering\LocalRewriter\LocalRewriter_WhileStatement.cs (6)
49Debug.Assert(loop.Kind is BoundKind.WhileStatement or BoundKind.ForEachStatement or BoundKind.CollectionExpressionSpreadElement); 74case BoundKind.WhileStatement: 78case BoundKind.ForEachStatement: 82case BoundKind.CollectionExpressionSpreadElement:
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (2)
225if (loweredReceiver.Kind == BoundKind.TypeExpression) 672int discardCount = loweredArguments.Count(a => a.Kind == BoundKind.DiscardExpression);
Lowering\MethodToClassRewriter.cs (6)
484if (originalLeft.Kind != BoundKind.Local) 498Debug.Assert(originalRight.Kind != BoundKind.ConvertedStackAllocExpression); 520if (rewrittenLeft.Kind != BoundKind.Local && originalRight.Kind == BoundKind.ConvertedStackAllocExpression) 727return originalReceiver is { Kind: BoundKind.BaseReference } && 728rewrittenReceiver is { Kind: not BoundKind.BaseReference };
Lowering\SpillSequenceSpiller.cs (22)
19private const BoundKind SpillSequenceBuilderKind = (BoundKind)byte.MaxValue; 316case BoundKind.ArrayInitialization: 323case BoundKind.ArgListOperator: 336case BoundKind.Sequence: 349case BoundKind.AssignmentOperator: 352assignment is not { Left.Kind: BoundKind.Local, Right.Kind: BoundKind.ArrayAccess }) // Optimize for some known to be safe scenarios. 378case BoundKind.ThisReference: 379case BoundKind.BaseReference: 387case BoundKind.Parameter: 395case BoundKind.Local: 404case BoundKind.FieldAccess: 422case BoundKind.Literal: 423case BoundKind.TypeExpression: 426case BoundKind.ConditionalReceiver: 431case BoundKind.Call: 479case BoundKind.ObjectCreationExpression: 874case BoundKind.Local: 875case BoundKind.Parameter: 879case BoundKind.FieldAccess: 888case BoundKind.ArrayAccess:
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (1)
295if (node.ReceiverOpt != null && node.ReceiverOpt.Kind == BoundKind.ThisReference)
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (11)
413if (statement.Kind == BoundKind.Block) 417if (rewrittenStatements.Length == 1 && rewrittenStatements[0].Kind == BoundKind.StateMachineScope) 585case BoundKind.ArrayAccess: 599case BoundKind.FieldAccess: 618if (receiver.Kind != BoundKind.ThisReference && !isFieldOfStruct) 626case BoundKind.ThisReference: 627case BoundKind.BaseReference: 628case BoundKind.DefaultExpression: 631case BoundKind.Call: 649case BoundKind.ConditionalOperator: 829if (node.Left.Kind != BoundKind.Local)
Lowering\SyntheticBoundNodeFactory.cs (3)
572if (body.Kind != BoundKind.Block) 1728var discardsPresent = arguments.Any(static a => a.Kind == BoundKind.DiscardExpression); 1733(arg, t) => arg.Kind == BoundKind.DiscardExpression ? t.factory.MakeTempForDiscard((BoundDiscardExpression)arg, t.builder) : arg,
Operations\CSharpOperationFactory.cs (172)
37case BoundKind.DeconstructValuePlaceholder: 39case BoundKind.DeconstructionAssignmentOperator: 41case BoundKind.Call: 43case BoundKind.Local: 45case BoundKind.FieldAccess: 47case BoundKind.PropertyAccess: 49case BoundKind.IndexerAccess: 51case BoundKind.EventAccess: 53case BoundKind.EventAssignmentOperator: 55case BoundKind.Parameter: 57case BoundKind.Literal: 59case BoundKind.Utf8String: 61case BoundKind.DynamicInvocation: 63case BoundKind.DynamicIndexerAccess: 65case BoundKind.ObjectCreationExpression: 67case BoundKind.WithExpression: 69case BoundKind.DynamicObjectCreationExpression: 71case BoundKind.ObjectInitializerExpression: 73case BoundKind.CollectionInitializerExpression: 75case BoundKind.ObjectInitializerMember: 77case BoundKind.CollectionElementInitializer: 79case BoundKind.DynamicObjectInitializerMember: 81case BoundKind.DynamicMemberAccess: 83case BoundKind.DynamicCollectionElementInitializer: 85case BoundKind.UnboundLambda: 87case BoundKind.Lambda: 89case BoundKind.Conversion: 91case BoundKind.AsOperator: 93case BoundKind.IsOperator: 95case BoundKind.SizeOfOperator: 97case BoundKind.TypeOfOperator: 99case BoundKind.ArrayCreation: 101case BoundKind.ArrayInitialization: 103case BoundKind.CollectionExpression: 105case BoundKind.DefaultLiteral: 107case BoundKind.DefaultExpression: 109case BoundKind.BaseReference: 111case BoundKind.ThisReference: 113case BoundKind.AssignmentOperator: 115case BoundKind.CompoundAssignmentOperator: 117case BoundKind.IncrementOperator: 119case BoundKind.BadExpression: 121case BoundKind.NewT: 123case BoundKind.NoPiaObjectCreationExpression: 125case BoundKind.UnaryOperator: 127case BoundKind.BinaryOperator: 128case BoundKind.UserDefinedConditionalLogicalOperator: 130case BoundKind.TupleBinaryOperator: 132case BoundKind.ConditionalOperator: 134case BoundKind.NullCoalescingOperator: 136case BoundKind.AwaitExpression: 138case BoundKind.ArrayAccess: 140case BoundKind.ImplicitIndexerAccess: 142case BoundKind.InlineArrayAccess: 144case BoundKind.NameOfOperator: 146case BoundKind.ThrowExpression: 148case BoundKind.AddressOfOperator: 150case BoundKind.ImplicitReceiver: 152case BoundKind.ConditionalAccess: 154case BoundKind.ConditionalReceiver: 156case BoundKind.FieldEqualsValue: 158case BoundKind.PropertyEqualsValue: 160case BoundKind.ParameterEqualsValue: 162case BoundKind.Block: 164case BoundKind.ContinueStatement: 166case BoundKind.BreakStatement: 168case BoundKind.YieldBreakStatement: 170case BoundKind.GotoStatement: 172case BoundKind.NoOpStatement: 174case BoundKind.IfStatement: 176case BoundKind.WhileStatement: 178case BoundKind.DoStatement: 180case BoundKind.ForStatement: 182case BoundKind.ForEachStatement: 184case BoundKind.TryStatement: 186case BoundKind.CatchBlock: 188case BoundKind.FixedStatement: 190case BoundKind.UsingStatement: 192case BoundKind.ThrowStatement: 194case BoundKind.ReturnStatement: 196case BoundKind.YieldReturnStatement: 198case BoundKind.LockStatement: 200case BoundKind.BadStatement: 202case BoundKind.LocalDeclaration: 204case BoundKind.MultipleLocalDeclarations: 205case BoundKind.UsingLocalDeclarations: 207case BoundKind.LabelStatement: 209case BoundKind.LabeledStatement: 211case BoundKind.ExpressionStatement: 213case BoundKind.TupleLiteral: 214case BoundKind.ConvertedTupleLiteral: 216case BoundKind.InterpolatedString: 218case BoundKind.StringInsert: 220case BoundKind.LocalFunctionStatement: 222case BoundKind.AnonymousObjectCreationExpression: 224case BoundKind.ConstantPattern: 226case BoundKind.DeclarationPattern: 228case BoundKind.RecursivePattern: 230case BoundKind.ITuplePattern: 232case BoundKind.DiscardPattern: 234case BoundKind.BinaryPattern: 236case BoundKind.NegatedPattern: 238case BoundKind.RelationalPattern: 240case BoundKind.TypePattern: 242case BoundKind.SlicePattern: 244case BoundKind.ListPattern: 246case BoundKind.SwitchStatement: 248case BoundKind.SwitchLabel: 250case BoundKind.IsPatternExpression: 252case BoundKind.QueryClause: 254case BoundKind.DelegateCreationExpression: 256case BoundKind.RangeVariable: 258case BoundKind.ConstructorMethodBody: 260case BoundKind.NonConstructorMethodBody: 262case BoundKind.DiscardExpression: 264case BoundKind.NullCoalescingAssignmentOperator: 266case BoundKind.FromEndIndexExpression: 268case BoundKind.RangeExpression: 270case BoundKind.SwitchSection: 272case BoundKind.ConvertedSwitchExpression: 274case BoundKind.SwitchExpressionArm: 276case BoundKind.ObjectOrCollectionValuePlaceholder: 278case BoundKind.FunctionPointerInvocation: 280case BoundKind.UnconvertedAddressOfOperator: 282case BoundKind.InterpolatedStringArgumentPlaceholder: 284case BoundKind.InterpolatedStringHandlerPlaceholder: 286case BoundKind.Attribute: 289case BoundKind.ArgList: 290case BoundKind.ArgListOperator: 291case BoundKind.ConvertedStackAllocExpression: 292case BoundKind.FixedLocalCollectionInitializer: 293case BoundKind.GlobalStatementInitializer: 294case BoundKind.HostObjectMemberReference: 295case BoundKind.MakeRefOperator: 296case BoundKind.MethodGroup: 297case BoundKind.NamespaceExpression: 298case BoundKind.PointerElementAccess: 299case BoundKind.PointerIndirectionOperator: 300case BoundKind.PreviousSubmissionReference: 301case BoundKind.RefTypeOperator: 302case BoundKind.RefValueOperator: 303case BoundKind.Sequence: 304case BoundKind.StackAllocArrayCreation: 305case BoundKind.TypeExpression: 306case BoundKind.TypeOrValueExpression: 314case BoundKind.FixedLocalCollectionInitializer: 326case BoundKind.UnconvertedInterpolatedString: 327case BoundKind.UnconvertedConditionalOperator: 328case BoundKind.UnconvertedSwitchExpression: 329case BoundKind.AnonymousPropertyDeclaration: 400case BoundKind.LocalDeclaration: 404case BoundKind.MultipleLocalDeclarations: 405case BoundKind.UsingLocalDeclarations: 524case BoundKind.LocalDeclaration: 530case BoundKind.MultipleLocalDeclarations: 531case BoundKind.UsingLocalDeclarations: 958if (receiver?.Kind == BoundKind.TypeExpression) 1070Debug.Assert(boundOperand.Kind == BoundKind.BadExpression || 1072ExpressionOpt?.Kind == BoundKind.BadExpression); 1082if (boundOperand.Kind == BoundKind.ConvertedTupleLiteral && TypeSymbol.Equals(boundOperand.Type, boundConversion.Type, TypeCompareKind.ConsiderEverything2)) 1096if (boundConversion.ExplicitCastInCode && conversion.IsIdentity && boundOperand.Kind == BoundKind.Conversion) 1102nestedOperand.Kind == BoundKind.ConvertedTupleLiteral && 1118if ((boundOperand.Kind == BoundKind.Lambda || 1119boundOperand.Kind == BoundKind.UnboundLambda || 1120boundOperand.Kind == BoundKind.MethodGroup) && 1327boundAssignmentOperator.Right?.Kind == BoundKind.ObjectInitializerExpression || 1328boundAssignmentOperator.Right?.Kind == BoundKind.CollectionInitializerExpression; 1643if (boundIndexerAccess.LengthOrCountAccess.Kind == BoundKind.ArrayLength) 2280if (part.Kind == BoundKind.StringInsert) 2539if (variable == null && boundDeclarationPattern.VariableAccess?.Kind == BoundKind.DiscardExpression) 2753Debug.Assert(boundSwitchLabel.Pattern.Kind == BoundKind.DiscardPattern); 2757boundSwitchLabel.Pattern.Kind == BoundKind.ConstantPattern &&
Operations\CSharpOperationFactory_Methods.cs (14)
25if (statement.Kind == BoundKind.StatementList) 100if (instance == null || instance.Kind == BoundKind.TypeExpression) 106if (symbol != null && symbol.IsStatic && instance.WasCompilerGenerated && instance.Kind == BoundKind.ThisReference) 163if (boundDelegateCreationExpression.Argument.Kind == BoundKind.MethodGroup && 198case BoundKind.ObjectInitializerMember: 209case BoundKind.IndexerAccess: 217case BoundKind.ObjectCreationExpression: 225case BoundKind.Attribute: 232case BoundKind.Call: 241case BoundKind.CollectionElementInitializer: 250case BoundKind.FunctionPointerInvocation: 393|| (receiverOpt.Kind != BoundKind.ThisReference 394&& receiverOpt.Kind != BoundKind.BaseReference 395&& receiverOpt.Kind != BoundKind.ObjectOrCollectionValuePlaceholder)))
Symbols\ConstantValueUtils.cs (1)
97while (unconvertedBoundValue.Kind == BoundKind.Conversion)
Symbols\FunctionTypeSymbol.cs (2)
68Debug.Assert(expression.Kind is BoundKind.MethodGroup or BoundKind.UnboundLambda);
Symbols\Source\ParameterHelpers.cs (4)
886case BoundKind.DefaultLiteral: 887case BoundKind.DefaultExpression: 889case BoundKind.ObjectCreationExpression: 891case BoundKind.Conversion:
Symbols\Source\SourceComplexParameterSymbol.cs (1)
400if (convertedExpression.ConstantValueOpt == null && convertedExpression.Kind == BoundKind.Conversion &&