2362 references to BoundKind
Microsoft.CodeAnalysis.CSharp (2362)
Binder\Binder.cs (1)
873RoslynDebug.Assert(statement.Kind != BoundKind.StatementList);
Binder\Binder.ValueChecks.cs (243)
508case BoundKind.PropertyGroup: 518case BoundKind.Local: 522case BoundKind.OutVariablePendingInference: 523case BoundKind.OutDeconstructVarPendingInference: 527case BoundKind.DiscardExpression: 531case BoundKind.PropertyAccess: 553case BoundKind.IndexerAccess: 557case BoundKind.ImplicitIndexerAccess: 575case BoundKind.UnconvertedObjectCreationExpression: 582case BoundKind.UnconvertedCollectionExpression: 589case BoundKind.PointerIndirectionOperator: 597case BoundKind.PointerElementAccess: 612if (expr.Kind == BoundKind.MethodGroup && valueKind != BindValueKind.RValueOrMethodGroup) 637if ((object)otherSymbol != null && receiver?.Kind == BoundKind.TypeOrValueExpression) 676case BoundKind.TypeOrValueExpression: 677case BoundKind.QueryClause when ((BoundQueryClause)expression).Value.Kind == BoundKind.TypeOrValueExpression: 709case BoundKind.PropertyAccess: 710case BoundKind.IndexerAccess: 711case BoundKind.ImplicitIndexerAccess when ((BoundImplicitIndexerAccess)expr).IndexerOrSliceAccess.Kind == BoundKind.IndexerAccess: 714case BoundKind.EventAccess: 734case BoundKind.NamespaceExpression: 739case BoundKind.TypeExpression: 744case BoundKind.Lambda: 745case BoundKind.UnboundLambda: 750case BoundKind.UnconvertedAddressOfOperator: 755case BoundKind.MethodGroup when valueKind == BindValueKind.AddressOf: 760case BoundKind.MethodGroup: 766case BoundKind.RangeVariable: 782case BoundKind.Conversion: 793case BoundKind.ArrayAccess: 797case BoundKind.PointerIndirectionOperator: 799case BoundKind.RefValueOperator: 801case BoundKind.DynamicMemberAccess: 802case BoundKind.DynamicIndexerAccess: 803case BoundKind.DynamicObjectInitializerMember: 815case BoundKind.PointerElementAccess: 832case BoundKind.Parameter: 836case BoundKind.Local: 840case BoundKind.ThisReference: 868case BoundKind.ImplicitReceiver: 869case BoundKind.ObjectOrCollectionValuePlaceholder: 873case BoundKind.Call: 877case BoundKind.FunctionPointerInvocation: 885case BoundKind.ImplicitIndexerAccess: 899case BoundKind.InlineArrayAccess: 921case BoundKind.ImplicitIndexerReceiverPlaceholder: 924case BoundKind.DeconstructValuePlaceholder: 927case BoundKind.ConditionalOperator: 947case BoundKind.FieldAccess: 953case BoundKind.AssignmentOperator: 964case BoundKind.ValuePlaceholder: 1016case BoundKind.NamespaceExpression: 1019case BoundKind.TypeExpression: 1631return Flags.Includes(BinderFlags.ObjectInitializerMember) && receiver.Kind == BoundKind.ObjectOrCollectionValuePlaceholder || 1795ReportDiagnosticsIfObsolete(diagnostics, setMethod, node, receiver?.Kind == BoundKind.BaseReference); 1845ReportDiagnosticsIfObsolete(diagnostics, getMethod, node, receiver?.Kind == BoundKind.BaseReference); 1928if (receiverOpt?.Kind == BoundKind.BaseReference && member.IsAbstract) 2341if (argument.Kind == BoundKind.ArgListOperator) 3368case BoundKind.ArrayAccess: 3369case BoundKind.PointerIndirectionOperator: 3370case BoundKind.PointerElementAccess: 3374case BoundKind.RefValueOperator: 3380case BoundKind.DiscardExpression: 3384case BoundKind.DynamicMemberAccess: 3385case BoundKind.DynamicIndexerAccess: 3391case BoundKind.Parameter: 3394case BoundKind.Local: 3397case BoundKind.CapturedReceiverPlaceholder: 3401case BoundKind.ThisReference: 3406case BoundKind.ConditionalOperator: 3419case BoundKind.FieldAccess: 3422case BoundKind.EventAccess: 3441case BoundKind.Call: 3463case BoundKind.FunctionPointerInvocation: 3485case BoundKind.IndexerAccess: 3502case BoundKind.ImplicitIndexerAccess: 3550case BoundKind.InlineArrayAccess: 3578case BoundKind.PropertyAccess: 3593case BoundKind.AssignmentOperator: 3604case BoundKind.Conversion: 3611case BoundKind.UnaryOperator: 3618case BoundKind.BinaryOperator: 3625case BoundKind.UserDefinedConditionalLogicalOperator: 3631case BoundKind.CompoundAssignmentOperator: 3683case BoundKind.ArrayAccess: 3684case BoundKind.PointerIndirectionOperator: 3685case BoundKind.PointerElementAccess: 3689case BoundKind.RefValueOperator: 3700case BoundKind.DiscardExpression: 3704case BoundKind.DynamicMemberAccess: 3705case BoundKind.DynamicIndexerAccess: 3711case BoundKind.Parameter: 3715case BoundKind.Local: 3719case BoundKind.CapturedReceiverPlaceholder: 3727case BoundKind.ThisReference: 3732case BoundKind.ConditionalOperator: 3744case BoundKind.FieldAccess: 3748case BoundKind.EventAccess: 3758case BoundKind.Call: 3784case BoundKind.IndexerAccess: 3810case BoundKind.ImplicitIndexerAccess: 3871case BoundKind.InlineArrayAccess: 3903case BoundKind.FunctionPointerInvocation: 3927case BoundKind.PropertyAccess: 3952case BoundKind.AssignmentOperator: 3969case BoundKind.Conversion: 3981case BoundKind.UnaryOperator: 3988case BoundKind.BinaryOperator: 3995case BoundKind.UserDefinedConditionalLogicalOperator: 4001case BoundKind.CompoundAssignmentOperator: 4008case BoundKind.ThrowExpression: 4071case BoundKind.ThisReference: 4075case BoundKind.DefaultLiteral: 4076case BoundKind.DefaultExpression: 4077case BoundKind.Utf8String: 4081case BoundKind.Parameter: 4084case BoundKind.FromEndIndexExpression: 4089case BoundKind.TupleLiteral: 4090case BoundKind.ConvertedTupleLiteral: 4094case BoundKind.MakeRefOperator: 4095case BoundKind.RefValueOperator: 4101case BoundKind.DiscardExpression: 4104case BoundKind.DeconstructValuePlaceholder: 4105case BoundKind.InterpolatedStringArgumentPlaceholder: 4106case BoundKind.AwaitableValuePlaceholder: 4109case BoundKind.Local: 4112case BoundKind.CapturedReceiverPlaceholder: 4117case BoundKind.StackAllocArrayCreation: 4118case BoundKind.ConvertedStackAllocExpression: 4121case BoundKind.ConditionalOperator: 4137case BoundKind.NullCoalescingOperator: 4143case BoundKind.FieldAccess: 4156case BoundKind.Call: 4172case BoundKind.FunctionPointerInvocation: 4187case BoundKind.IndexerAccess: 4204case BoundKind.ImplicitIndexerAccess: 4245case BoundKind.InlineArrayAccess: 4265case BoundKind.PropertyAccess: 4280case BoundKind.ObjectCreationExpression: 4305case BoundKind.NewT: 4320case BoundKind.WithExpression: 4326case BoundKind.UnaryOperator: 4344case BoundKind.Conversion: 4397case BoundKind.AssignmentOperator: 4404case BoundKind.NullCoalescingAssignmentOperator: 4407case BoundKind.IncrementOperator: 4410case BoundKind.CompoundAssignmentOperator: 4430case BoundKind.BinaryOperator: 4450case BoundKind.RangeExpression: 4456case BoundKind.UserDefinedConditionalLogicalOperator: 4470case BoundKind.QueryClause: 4473case BoundKind.RangeVariable: 4476case BoundKind.ObjectInitializerExpression: 4480case BoundKind.CollectionInitializerExpression: 4484case BoundKind.CollectionElementInitializer: 4488case BoundKind.ObjectInitializerMember: 4494case BoundKind.ImplicitReceiver: 4495case BoundKind.ObjectOrCollectionValuePlaceholder: 4500case BoundKind.InterpolatedStringHandlerPlaceholder: 4505case BoundKind.DisposableValuePlaceholder: 4510case BoundKind.PointerElementAccess: 4511case BoundKind.PointerIndirectionOperator: 4515case BoundKind.AsOperator: 4516case BoundKind.AwaitExpression: 4517case BoundKind.ConditionalAccess: 4518case BoundKind.ConditionalReceiver: 4519case BoundKind.ArrayAccess: 4523case BoundKind.ConvertedSwitchExpression: 4524case BoundKind.UnconvertedSwitchExpression: 4619if (expr.Kind == BoundKind.AssignmentOperator) 4763case BoundKind.ThisReference: 4768case BoundKind.DefaultLiteral: 4769case BoundKind.DefaultExpression: 4770case BoundKind.Utf8String: 4774case BoundKind.Parameter: 4777case BoundKind.TupleLiteral: 4778case BoundKind.ConvertedTupleLiteral: 4782case BoundKind.MakeRefOperator: 4783case BoundKind.RefValueOperator: 4787case BoundKind.DiscardExpression: 4791case BoundKind.DeconstructValuePlaceholder: 4792case BoundKind.AwaitableValuePlaceholder: 4793case BoundKind.InterpolatedStringArgumentPlaceholder: 4801case BoundKind.Local: 4810case BoundKind.CapturedReceiverPlaceholder: 4815case BoundKind.StackAllocArrayCreation: 4816case BoundKind.ConvertedStackAllocExpression: 4824case BoundKind.UnconvertedConditionalOperator: 4832case BoundKind.ConditionalOperator: 4848case BoundKind.NullCoalescingOperator: 4853case BoundKind.FieldAccess: 4866case BoundKind.Call: 4887case BoundKind.FunctionPointerInvocation: 4906case BoundKind.IndexerAccess: 4927case BoundKind.ImplicitIndexerAccess: 4978case BoundKind.InlineArrayAccess: 5002case BoundKind.PropertyAccess: 5021case BoundKind.ObjectCreationExpression: 5057case BoundKind.NewT: 5078case BoundKind.WithExpression: 5089case BoundKind.UnaryOperator: 5111case BoundKind.FromEndIndexExpression: 5115case BoundKind.Conversion: 5179case BoundKind.AssignmentOperator: 5183case BoundKind.NullCoalescingAssignmentOperator: 5187case BoundKind.IncrementOperator: 5191case BoundKind.CompoundAssignmentOperator: 5215case BoundKind.BinaryOperator: 5244case BoundKind.RangeExpression: 5254case BoundKind.UserDefinedConditionalLogicalOperator: 5272case BoundKind.QueryClause: 5276case BoundKind.RangeVariable: 5280case BoundKind.ObjectInitializerExpression: 5286case BoundKind.CollectionInitializerExpression: 5292case BoundKind.CollectionElementInitializer: 5296case BoundKind.PointerElementAccess: 5300case BoundKind.PointerIndirectionOperator: 5304case BoundKind.AsOperator: 5305case BoundKind.AwaitExpression: 5306case BoundKind.ConditionalAccess: 5307case BoundKind.ConditionalReceiver: 5308case BoundKind.ArrayAccess: 5312case BoundKind.UnconvertedSwitchExpression: 5313case BoundKind.ConvertedSwitchExpression: 5727case BoundKind.ArrayAccess: 5737case BoundKind.PointerIndirectionOperator: 5738case BoundKind.RefValueOperator: 5741case BoundKind.ThisReference: 5756case BoundKind.ThrowExpression: 5760case BoundKind.Parameter: 5764case BoundKind.Local: 5771case BoundKind.Call: 5776case BoundKind.Dup: 5782case BoundKind.FieldAccess: 5785case BoundKind.Sequence: 5788case BoundKind.AssignmentOperator: 5798case BoundKind.ComplexConditionalReceiver: 5811goto case BoundKind.ConditionalReceiver; 5813case BoundKind.ConditionalReceiver: 5818case BoundKind.ConditionalOperator: 5931fieldAccess.ReceiverOpt.Kind == BoundKind.ThisReference;
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)) 2724if (operand.Kind == BoundKind.UnboundLambda) 2773case BoundKind.MethodGroup: 2783case BoundKind.TupleLiteral: 2807case BoundKind.StackAllocArrayCreation: 2813case BoundKind.UnconvertedConditionalOperator when operand.Type is null: 2814case BoundKind.UnconvertedSwitchExpression when operand.Type is null: 2819case BoundKind.UnconvertedCollectionExpression: 2824case BoundKind.UnconvertedAddressOfOperator: 3070case BoundKind.PropertyAccess: 3071case BoundKind.IndexerAccess: 3526else if (argument.Kind == BoundKind.OutVariablePendingInference) 3530else if (argument.Kind == BoundKind.OutDeconstructVarPendingInference) 3534else if (argument.Kind == BoundKind.DiscardExpression && !argument.HasExpressionType()) 3570(BoundKind.OutVariablePendingInference or BoundKind.OutDeconstructVarPendingInference or BoundKind.DiscardExpression or BoundKind.ArgListOperator)); 5376else if (argument.Kind == BoundKind.MethodGroup) 5813if (boundMember.Kind == BoundKind.PropertyGroup) 5855BoundKind boundMemberKind = boundMember.Kind; 5867case BoundKind.FieldAccess: 5884case BoundKind.EventAccess: 5887case BoundKind.PropertyAccess: 5891case BoundKind.IndexerAccess: 5925case BoundKind.ImplicitIndexerAccess: 5936case BoundKind.DynamicObjectInitializerMember: 5939case BoundKind.DynamicIndexerAccess: 5949case BoundKind.ArrayAccess: 5950case BoundKind.PointerElementAccess: 6444if (addMethodInvocation.Kind == BoundKind.DynamicInvocation) 6455else if (addMethodInvocation.Kind == BoundKind.Call) 6484Debug.Assert(addMethodInvocation.Kind == BoundKind.BadExpression); 6963case BoundKind.ObjectCreationExpression: 6969case BoundKind.BadExpression: 7448if (boundValue.Kind == BoundKind.Conversion) 7640if (boundLeft.Kind == BoundKind.UnboundLambda) 7687case BoundKind.NamespaceExpression: 7697case BoundKind.TypeExpression: 7707case BoundKind.TypeOrValueExpression: 7717if (boundLeft.Kind == BoundKind.Literal && ((BoundLiteral)boundLeft).ConstantValueOpt == ConstantValue.Null) 7890case BoundKind.MethodGroup: 7912case BoundKind.PropertyGroup: 7945bool leftIsBaseReference = boundLeft.Kind == BoundKind.BaseReference; 8036if (boundLeft.HasAnyErrors && boundLeft.Kind != BoundKind.TypeOrValueExpression) 8058else if (boundLeft.Kind == BoundKind.TypeExpression || 8059boundLeft.Kind == BoundKind.BaseReference || 8275ReportDiagnosticsIfObsolete(diagnostics, symbol, node, hasBaseReceiver: left.Kind == BoundKind.BaseReference); 8678ReportDiagnosticsIfObsolete(diagnostics, propertySymbol, node, hasBaseReceiver: receiver?.Kind == BoundKind.BaseReference); 8783case BoundKind.PreviousSubmissionReference: 8786case BoundKind.TypeExpression: 8788case BoundKind.QueryClause: 8979if (receiver.Kind == BoundKind.PropertyGroup) 9394if (index.Kind == BoundKind.OutVariablePendingInference) 9398else if (index.Kind == BoundKind.DiscardExpression && !index.HasExpressionType()) 9586LookupOptions lookupOptions = expr.Kind == BoundKind.BaseReference ? LookupOptions.UseBaseReferenceAccessibility : LookupOptions.Default; 9700BoundKind receiverKind = receiver.Kind; 9701if (receiverKind == BoundKind.BaseReference) 9706else if (receiverKind == BoundKind.TypeOrValueExpression) 9842ReportDiagnosticsIfObsolete(diagnostics, property, syntax, hasBaseReceiver: receiver != null && receiver.Kind == BoundKind.BaseReference); 9852if (!gotError && receiver != null && receiver.Kind == BoundKind.ThisReference && receiver.WasCompilerGenerated) 10957if (access.Kind == BoundKind.MethodGroup) 11116if (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): 1946if (left.Kind == BoundKind.Conversion && right.Kind == BoundKind.Conversion) 2446case BoundKind.NamespaceExpression: 2447case BoundKind.TypeExpression: 2568BoundKind exprKind = expr.Kind; 2571case BoundKind.FieldAccess: 2572case BoundKind.EventAccess: 2576if (exprKind == BoundKind.FieldAccess) 2618case BoundKind.InlineArrayAccess: 2630case BoundKind.RangeVariable: 2638case BoundKind.Parameter: 2661case BoundKind.ThisReference: 2662case BoundKind.BaseReference: 2667case BoundKind.Local: 2677case BoundKind.PointerIndirectionOperator: //Covers ->, since the receiver will be one of these. 2678case BoundKind.ConvertedStackAllocExpression: 2682case BoundKind.PointerElementAccess: 2697case BoundKind.PropertyAccess: // Never fixed 2698case BoundKind.IndexerAccess: // Never fixed 3159case BoundKind.UnboundLambda: 3160case BoundKind.Lambda: 3161case BoundKind.MethodGroup: // New in Roslyn - see DevDiv #864740. 3289operand.Kind == BoundKind.MethodGroup || 3707case BoundKind.UnboundLambda: 3708case BoundKind.Lambda: 3709case BoundKind.MethodGroup: // New in Roslyn - see DevDiv #864740. 3718case BoundKind.TupleLiteral: 3719case BoundKind.ConvertedTupleLiteral: 4018if (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; 1494if (op1.Kind != BoundKind.DynamicIndexerAccess && 1495op1.Kind != BoundKind.DynamicMemberAccess && 1496op1.Kind != BoundKind.DynamicObjectInitializerMember) 1511if ((op1.Kind == BoundKind.EventAccess) && 1568else if (op1.Kind is BoundKind.Local or BoundKind.Parameter) 1580Debug.Assert(op1.Kind != BoundKind.Parameter); // If the assert fails, add a corresponding test. 1634case BoundKind.PropertyAccess: 1641case BoundKind.IndexerAccess: 1648case BoundKind.ImplicitIndexerAccess: 1772(propertyIsStatic || receiver?.Kind == BoundKind.ThisReference); 1807else if (receiver.Kind == BoundKind.BaseReference) 1933if (expression.HasAnyErrors && expression.Kind != BoundKind.UnboundLambda) 2319case BoundKind.BadExpression: 2323case BoundKind.UnboundLambda: 2328case BoundKind.TupleLiteral: 2352case BoundKind.MethodGroup: 2357case BoundKind.UnconvertedAddressOfOperator: 2362case BoundKind.Literal: 2379case BoundKind.StackAllocArrayCreation: 2385case BoundKind.UnconvertedSwitchExpression: 2398case BoundKind.UnconvertedCollectionExpression: 2403case BoundKind.AddressOfOperator when targetType.IsFunctionPointer(): 2408case BoundKind.UnconvertedConditionalOperator: 2437Debug.Assert(operand.HasAnyErrors && operand.Kind != BoundKind.UnboundLambda, "Missing a case in implicit conversion error reporting"); 2680if (expr.Kind == BoundKind.AssignmentOperator) 2683if (assignment.Right.Kind == BoundKind.Literal && assignment.Right.ConstantValueOpt.Discriminator == ConstantValueTypeDiscriminator.Boolean) 3157if (!argument.HasAnyErrors || argument.Kind == BoundKind.UnboundLambda) 3431if (expression.Kind == BoundKind.DelegateCreationExpression || expression.Kind == BoundKind.NameOfOperator) 3459if ((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)
2152if (argumentKind == BoundKind.ArgListOperator) 2294if (argumentKind == BoundKind.ArgListOperator) 2454if (arguments[i].Kind == BoundKind.ArgListOperator) 2605if (arguments[i].Kind != BoundKind.ArgListOperator) 2892var nodeKind = node.Kind; 2893if (nodeKind == BoundKind.OutVariablePendingInference || 2894nodeKind == BoundKind.OutDeconstructVarPendingInference || 2895(nodeKind == BoundKind.DiscardExpression && !node.HasExpressionType())) 3215if (node.Kind == BoundKind.TupleLiteral) 3231if (node.Kind == BoundKind.UnboundLambda && 3271if (lambda.Body.Statements[0].Kind == BoundKind.ReturnStatement) 3526if (node?.Kind == BoundKind.MethodGroup) 4406if (argument.Kind == BoundKind.ArgListOperator) 4575if (argument.Kind == BoundKind.OutVariablePendingInference || 4576argument.Kind == BoundKind.OutDeconstructVarPendingInference || 4577(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\EmitAddress.cs (25)
30case BoundKind.RefValueOperator: 34case BoundKind.Local: 37case BoundKind.Dup: 41case BoundKind.ConditionalReceiver: 47case BoundKind.ComplexConditionalReceiver: 51case BoundKind.Parameter: 54case BoundKind.FieldAccess: 57case BoundKind.ArrayAccess: 66case BoundKind.ThisReference: 87case BoundKind.PreviousSubmissionReference: 91case BoundKind.BaseReference: 95case BoundKind.PassByCopy: 98case BoundKind.Sequence: 101case BoundKind.PointerIndirectionOperator: 108case BoundKind.PseudoVariable: 112case BoundKind.Call: 123case BoundKind.FunctionPointerInvocation: 135case BoundKind.DefaultExpression: 145case BoundKind.ConditionalOperator: 154case BoundKind.AssignmentOperator: 166case BoundKind.ThrowExpression: 357case BoundKind.Local: 366case BoundKind.Sequence: 369case BoundKind.FieldAccess: 524if (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: 4317case BoundKind.DynamicInvocation: 4323case BoundKind.BadExpression: 4334case BoundKind.NameOfOperator: 4403case BoundKind.IndexerAccess: 4424case 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; 539Debug.Assert(expression != null || placeholder.Kind == BoundKind.InterpolatedStringArgumentPlaceholder); 560case BoundKind.DeconstructValuePlaceholder: 561case BoundKind.InterpolatedStringHandlerPlaceholder: 562case BoundKind.InterpolatedStringArgumentPlaceholder: 563case BoundKind.ObjectOrCollectionValuePlaceholder: 564case BoundKind.AwaitableValuePlaceholder: 567case BoundKind.ImplicitIndexerValuePlaceholder: 1946case BoundKind.FieldAccess: 1962case BoundKind.EventAccess: 1975case BoundKind.PropertyAccess: 1993receiver.Kind != BoundKind.TypeExpression && 2021case BoundKind.ThisReference: 2022case BoundKind.BaseReference: 2028case BoundKind.Conversion: 2071case BoundKind.DefaultLiteral: 2072case BoundKind.DefaultExpression: 2073case BoundKind.ObjectCreationExpression: 2074case BoundKind.DynamicObjectCreationExpression: 2075case BoundKind.AnonymousObjectCreationExpression: 2076case BoundKind.NewT: 2077case BoundKind.TupleLiteral: 2078case BoundKind.ConvertedTupleLiteral: 2080case BoundKind.ConditionalAccess: 2082case BoundKind.ConditionalReceiver: 2490case BoundKind.Conversion: 2497case BoundKind.DefaultLiteral: 2498case BoundKind.DefaultExpression: 2955if (!expr.IsSuppressed && RemoveConversion(expr, includeExplicitConversions: false).expression.Kind != BoundKind.ThrowExpression) 3961Debug.Assert(node.Kind is BoundKind.ObjectCreationExpression or BoundKind.DynamicObjectCreationExpression or BoundKind.NewT or BoundKind.NoPiaObjectCreationExpression); 4053case BoundKind.AssignmentOperator: 4068case BoundKind.CollectionElementInitializer: 4098case BoundKind.ObjectInitializerMember: 4352Debug.Assert(node.ImplicitReceiverOpt.Kind == BoundKind.ObjectOrCollectionValuePlaceholder); 4767if (child.Kind == BoundKind.ArrayInitialization) 5333case BoundKind.Conversion: 5337case BoundKind.AsOperator: 5340case BoundKind.ConditionalAccess: 5527while (possiblyConversion.Kind == BoundKind.Conversion) 7291return (argument.Kind == BoundKind.Lambda); 7891/// other than <see cref="BoundKind.ExpressionWithNullability"/> which is an expression 7898case BoundKind.DefaultLiteral: 7899case BoundKind.DefaultExpression: 7900case BoundKind.Literal: 7902case BoundKind.ExpressionWithNullability: 7904case BoundKind.MethodGroup: 7905case BoundKind.UnboundLambda: 7906case BoundKind.UnconvertedObjectCreationExpression: 7907case BoundKind.ConvertedTupleLiteral: 7908case BoundKind.UnconvertedCollectionExpression: 7948if (argument.Kind == BoundKind.Lambda) 7957if (argument.Kind == BoundKind.CollectionExpression) 8049if (expr.Kind != BoundKind.Conversion) 8134case BoundKind.InterpolatedString: 8971if (operandType.Type?.IsTupleType == true || conversionOperand.Kind == BoundKind.TupleLiteral) 9948if (left.Kind == BoundKind.EventAccess && ((BoundEventAccess)left).EventSymbol.IsWindowsRuntimeEvent) 10365case BoundKind.TupleLiteral: 10366case BoundKind.ConvertedTupleLiteral: 10383case BoundKind.TupleLiteral: 10384case BoundKind.ConvertedTupleLiteral: 10386case BoundKind.Conversion: 10580if (initializer.Kind == BoundKind.AddressOfOperator) 10586if (node.Expression.Kind == BoundKind.AddressOfOperator) 10838if (node.Expression.Kind != BoundKind.Conversion) 11366case BoundKind.BinaryOperator: 11369case 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)
277protected BoundInitializer(BoundKind kind, SyntaxNode syntax, bool hasErrors) 282protected BoundInitializer(BoundKind kind, SyntaxNode syntax) 291protected BoundEqualsValue(BoundKind kind, SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, BoundExpression value, bool hasErrors = false) 309: base(BoundKind.FieldEqualsValue, syntax, locals, value, hasErrors || value.HasErrors()) 339: base(BoundKind.PropertyEqualsValue, syntax, locals, value, hasErrors || value.HasErrors()) 369: base(BoundKind.ParameterEqualsValue, syntax, locals, value, hasErrors || value.HasErrors()) 399: base(BoundKind.GlobalStatementInitializer, syntax, hasErrors || statement.HasErrors()) 426protected BoundExpression(BoundKind kind, SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 432protected BoundExpression(BoundKind kind, SyntaxNode syntax, TypeSymbol? type) 443protected BoundValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 448protected BoundValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type) 457protected BoundEarlyValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 462protected BoundEarlyValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type) 472: base(BoundKind.ValuePlaceholder, syntax, type, hasErrors) 477: base(BoundKind.ValuePlaceholder, syntax, type) 500: base(BoundKind.CapturedReceiverPlaceholder, syntax, type, hasErrors || receiver.HasErrors()) 530: base(BoundKind.DeconstructValuePlaceholder, syntax, type, hasErrors) 540: base(BoundKind.DeconstructValuePlaceholder, syntax, type) 571: base(BoundKind.TupleOperandPlaceholder, syntax, type, hasErrors) 579: base(BoundKind.TupleOperandPlaceholder, syntax, type) 606: base(BoundKind.AwaitableValuePlaceholder, syntax, type, hasErrors) 611: base(BoundKind.AwaitableValuePlaceholder, syntax, type) 635: base(BoundKind.DisposableValuePlaceholder, syntax, type, hasErrors) 643: base(BoundKind.DisposableValuePlaceholder, syntax, type) 670: base(BoundKind.ObjectOrCollectionValuePlaceholder, syntax, type, hasErrors) 679: base(BoundKind.ObjectOrCollectionValuePlaceholder, syntax, type) 708: base(BoundKind.ImplicitIndexerValuePlaceholder, syntax, type, hasErrors) 716: base(BoundKind.ImplicitIndexerValuePlaceholder, syntax, type) 743: base(BoundKind.ImplicitIndexerReceiverPlaceholder, syntax, type, hasErrors) 752: base(BoundKind.ImplicitIndexerReceiverPlaceholder, syntax, type) 781: base(BoundKind.ListPatternReceiverPlaceholder, syntax, type, hasErrors) 789: base(BoundKind.ListPatternReceiverPlaceholder, syntax, type) 816: base(BoundKind.ListPatternIndexPlaceholder, syntax, type, hasErrors) 824: base(BoundKind.ListPatternIndexPlaceholder, syntax, type) 851: base(BoundKind.SlicePatternReceiverPlaceholder, syntax, type, hasErrors) 859: base(BoundKind.SlicePatternReceiverPlaceholder, syntax, type) 886: base(BoundKind.SlicePatternRangePlaceholder, syntax, type, hasErrors) 894: base(BoundKind.SlicePatternRangePlaceholder, syntax, type) 921: base(BoundKind.Dup, syntax, type, hasErrors) 927: base(BoundKind.Dup, syntax, type) 952: base(BoundKind.PassByCopy, syntax, type, hasErrors || expression.HasErrors()) 980: base(BoundKind.BadExpression, syntax, type, hasErrors || childBoundNodes.HasErrors()) 1013: base(BoundKind.BadStatement, syntax, hasErrors || childBoundNodes.HasErrors()) 1041: base(BoundKind.ExtractedFinallyBlock, syntax, hasErrors || finallyBlock.HasErrors()) 1069: base(BoundKind.TypeExpression, syntax, type, hasErrors || boundContainingTypeOpt.HasErrors() || boundDimensionsOpt.HasErrors()) 1104: base(BoundKind.TypeOrValueExpression, syntax, type, hasErrors) 1113: base(BoundKind.TypeOrValueExpression, syntax, type) 1142: base(BoundKind.NamespaceExpression, syntax, null, hasErrors) 1152: base(BoundKind.NamespaceExpression, syntax, null) 1183: base(BoundKind.UnaryOperator, syntax, type, hasErrors || operand.HasErrors()) 1225: base(BoundKind.IncrementOperator, syntax, type, hasErrors || operand.HasErrors() || operandPlaceholder.HasErrors() || operandConversion.HasErrors() || resultPlaceholder.HasErrors() || resultConversion.HasErrors()) 1273: base(BoundKind.AddressOfOperator, syntax, type, hasErrors || operand.HasErrors()) 1305: base(BoundKind.UnconvertedAddressOfOperator, syntax, null, hasErrors || operand.HasErrors()) 1334: base(BoundKind.FunctionPointerLoad, syntax, type, hasErrors) 1345: base(BoundKind.FunctionPointerLoad, syntax, type) 1377: base(BoundKind.PointerIndirectionOperator, syntax, type, hasErrors || operand.HasErrors()) 1409: base(BoundKind.PointerElementAccess, syntax, type, hasErrors || expression.HasErrors() || index.HasErrors()) 1446: base(BoundKind.FunctionPointerInvocation, syntax, type, hasErrors || invokedExpression.HasErrors() || arguments.HasErrors()) 1483: base(BoundKind.RefTypeOperator, syntax, type, hasErrors || operand.HasErrors()) 1515: base(BoundKind.MakeRefOperator, syntax, type, hasErrors || operand.HasErrors()) 1545: base(BoundKind.RefValueOperator, syntax, type, hasErrors || operand.HasErrors()) 1577: base(BoundKind.FromEndIndexExpression, syntax, type, hasErrors || operand.HasErrors()) 1609: base(BoundKind.RangeExpression, syntax, type, hasErrors || leftOperandOpt.HasErrors() || rightOperandOpt.HasErrors()) 1641protected BoundBinaryOperatorBase(BoundKind kind, SyntaxNode syntax, BoundExpression left, BoundExpression right, TypeSymbol type, bool hasErrors = false) 1661: base(BoundKind.BinaryOperator, syntax, left, right, type, hasErrors || left.HasErrors() || right.HasErrors()) 1695: base(BoundKind.TupleBinaryOperator, syntax, type, hasErrors || left.HasErrors() || right.HasErrors()) 1733: base(BoundKind.UserDefinedConditionalLogicalOperator, syntax, left, right, type, hasErrors || left.HasErrors() || right.HasErrors()) 1778: base(BoundKind.CompoundAssignmentOperator, syntax, type, hasErrors || left.HasErrors() || right.HasErrors() || leftPlaceholder.HasErrors() || leftConversion.HasErrors() || finalPlaceholder.HasErrors() || finalConversion.HasErrors()) 1825: base(BoundKind.AssignmentOperator, syntax, type, hasErrors || left.HasErrors() || right.HasErrors()) 1859: base(BoundKind.DeconstructionAssignmentOperator, syntax, type, hasErrors || left.HasErrors() || right.HasErrors()) 1894: base(BoundKind.NullCoalescingOperator, syntax, type, hasErrors || leftOperand.HasErrors() || rightOperand.HasErrors() || leftPlaceholder.HasErrors() || leftConversion.HasErrors()) 1935: base(BoundKind.NullCoalescingAssignmentOperator, syntax, type, hasErrors || leftOperand.HasErrors() || rightOperand.HasErrors()) 1966: base(BoundKind.UnconvertedConditionalOperator, syntax, null, hasErrors || condition.HasErrors() || consequence.HasErrors() || alternative.HasErrors()) 2005: base(BoundKind.ConditionalOperator, syntax, type, hasErrors || condition.HasErrors() || consequence.HasErrors() || alternative.HasErrors()) 2049: base(BoundKind.ArrayAccess, syntax, type, hasErrors || expression.HasErrors() || indices.HasErrors()) 2082: base(BoundKind.RefArrayAccess, syntax, null, hasErrors || arrayAccess.HasErrors()) 2111: base(BoundKind.ArrayLength, syntax, type, hasErrors || expression.HasErrors()) 2141: base(BoundKind.AwaitableInfo, syntax, hasErrors || awaitableInstancePlaceholder.HasErrors() || getAwaiter.HasErrors()) 2174: base(BoundKind.AwaitExpression, syntax, type, hasErrors || expression.HasErrors() || awaitableInfo.HasErrors()) 2208protected BoundTypeOf(BoundKind kind, SyntaxNode syntax, MethodSymbol? getTypeFromHandle, TypeSymbol type, bool hasErrors) 2217protected BoundTypeOf(BoundKind kind, SyntaxNode syntax, MethodSymbol? getTypeFromHandle, TypeSymbol type) 2233: base(BoundKind.TypeOfOperator, syntax, getTypeFromHandle, type, hasErrors || sourceType.HasErrors()) 2262: base(BoundKind.BlockInstrumentation, syntax, hasErrors || prologue.HasErrors() || epilogue.HasErrors()) 2294: base(BoundKind.MethodDefIndex, syntax, type, hasErrors) 2304: base(BoundKind.MethodDefIndex, syntax, type) 2334: base(BoundKind.LocalId, syntax, type, hasErrors) 2345: base(BoundKind.LocalId, syntax, type) 2377: base(BoundKind.ParameterId, syntax, type, hasErrors) 2388: base(BoundKind.ParameterId, syntax, type) 2420: base(BoundKind.StateMachineInstanceId, syntax, type, hasErrors) 2428: base(BoundKind.StateMachineInstanceId, syntax, type) 2455: base(BoundKind.MaximumMethodDefIndex, syntax, type, hasErrors) 2463: base(BoundKind.MaximumMethodDefIndex, syntax, type) 2490: base(BoundKind.InstrumentationPayloadRoot, syntax, type, hasErrors) 2499: base(BoundKind.InstrumentationPayloadRoot, syntax, type) 2528: base(BoundKind.ThrowIfModuleCancellationRequested, syntax, type, hasErrors) 2536: base(BoundKind.ThrowIfModuleCancellationRequested, syntax, type) 2563: base(BoundKind.ModuleCancellationTokenExpression, syntax, type, hasErrors) 2571: base(BoundKind.ModuleCancellationTokenExpression, syntax, type) 2598: base(BoundKind.ModuleVersionId, syntax, type, hasErrors) 2606: base(BoundKind.ModuleVersionId, syntax, type) 2633: base(BoundKind.ModuleVersionIdString, syntax, type, hasErrors) 2641: base(BoundKind.ModuleVersionIdString, syntax, type) 2668: base(BoundKind.SourceDocumentIndex, syntax, type, hasErrors) 2678: base(BoundKind.SourceDocumentIndex, syntax, type) 2708: base(BoundKind.MethodInfo, syntax, type, hasErrors) 2719: base(BoundKind.MethodInfo, syntax, type) 2751: base(BoundKind.FieldInfo, syntax, type, hasErrors) 2762: base(BoundKind.FieldInfo, syntax, type) 2794: base(BoundKind.DefaultLiteral, syntax, null, hasErrors) 2799: base(BoundKind.DefaultLiteral, syntax, null) 2817: base(BoundKind.DefaultExpression, syntax, type, hasErrors || targetType.HasErrors()) 2848: base(BoundKind.IsOperator, syntax, type, hasErrors || operand.HasErrors() || targetType.HasErrors()) 2883: base(BoundKind.AsOperator, syntax, type, hasErrors || operand.HasErrors() || targetType.HasErrors() || operandPlaceholder.HasErrors() || operandConversion.HasErrors()) 2920: base(BoundKind.SizeOfOperator, syntax, type, hasErrors || sourceType.HasErrors()) 2952: base(BoundKind.Conversion, syntax, type, hasErrors || operand.HasErrors()) 2996: base(BoundKind.ReadOnlySpanFromArray, syntax, type, hasErrors || operand.HasErrors()) 3029: base(BoundKind.ArgList, syntax, type, hasErrors) 3037: base(BoundKind.ArgList, syntax, type) 3064: base(BoundKind.ArgListOperator, syntax, type, hasErrors || arguments.HasErrors()) 3095: base(BoundKind.FixedLocalCollectionInitializer, syntax, type, hasErrors || elementPointerPlaceholder.HasErrors() || elementPointerConversion.HasErrors() || expression.HasErrors()) 3133protected BoundStatement(BoundKind kind, SyntaxNode syntax, bool hasErrors) 3138protected BoundStatement(BoundKind kind, SyntaxNode syntax) 3148: base(BoundKind.SequencePoint, syntax, hasErrors || statementOpt.HasErrors()) 3173: base(BoundKind.SequencePointWithSpan, syntax, hasErrors || statementOpt.HasErrors()) 3200: base(BoundKind.SavePreviousSequencePoint, syntax, hasErrors) 3209: base(BoundKind.SavePreviousSequencePoint, syntax) 3237: base(BoundKind.RestorePreviousSequencePoint, syntax, hasErrors) 3246: base(BoundKind.RestorePreviousSequencePoint, syntax) 3274: base(BoundKind.StepThroughSequencePoint, syntax, hasErrors) 3280: base(BoundKind.StepThroughSequencePoint, syntax) 3305: base(BoundKind.Block, syntax, statements, hasErrors || instrumentation.HasErrors() || statements.HasErrors()) 3341: base(BoundKind.Scope, syntax, statements, hasErrors || statements.HasErrors()) 3370: base(BoundKind.StateMachineScope, syntax, hasErrors || statement.HasErrors()) 3401: base(BoundKind.LocalDeclaration, syntax, hasErrors || declaredTypeOpt.HasErrors() || initializerOpt.HasErrors() || argumentsOpt.HasErrors()) 3436protected BoundMultipleLocalDeclarationsBase(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundLocalDeclaration> localDeclarations, bool hasErrors = false) 3451: base(BoundKind.MultipleLocalDeclarations, syntax, localDeclarations, hasErrors || localDeclarations.HasErrors()) 3477: base(BoundKind.UsingLocalDeclarations, syntax, localDeclarations, hasErrors || awaitOpt.HasErrors() || localDeclarations.HasErrors()) 3507: base(BoundKind.LocalFunctionStatement, syntax, hasErrors || blockBody.HasErrors() || expressionBody.HasErrors()) 3539: base(BoundKind.NoOpStatement, syntax, hasErrors) 3545: base(BoundKind.NoOpStatement, syntax) 3570: base(BoundKind.ReturnStatement, syntax, hasErrors || expressionOpt.HasErrors()) 3599: base(BoundKind.YieldReturnStatement, syntax, hasErrors || expression.HasErrors()) 3627: base(BoundKind.YieldBreakStatement, syntax, hasErrors) 3632: base(BoundKind.YieldBreakStatement, syntax) 3644: base(BoundKind.ThrowStatement, syntax, hasErrors || expressionOpt.HasErrors()) 3669: base(BoundKind.ExpressionStatement, syntax, hasErrors || expression.HasErrors()) 3697: base(BoundKind.BreakStatement, syntax, hasErrors) 3706: base(BoundKind.BreakStatement, syntax) 3734: base(BoundKind.ContinueStatement, syntax, hasErrors) 3743: base(BoundKind.ContinueStatement, syntax) 3771: base(BoundKind.SwitchStatement, syntax, hasErrors || expression.HasErrors() || switchSections.HasErrors() || reachabilityDecisionDag.HasErrors() || defaultLabel.HasErrors()) 3816: base(BoundKind.SwitchDispatch, syntax, hasErrors || expression.HasErrors()) 3852: base(BoundKind.IfStatement, syntax, hasErrors || condition.HasErrors() || consequence.HasErrors() || alternativeOpt.HasErrors()) 3884protected BoundLoopStatement(BoundKind kind, SyntaxNode syntax, GeneratedLabelSymbol breakLabel, GeneratedLabelSymbol continueLabel, bool hasErrors) 3895protected BoundLoopStatement(BoundKind kind, SyntaxNode syntax, GeneratedLabelSymbol breakLabel, GeneratedLabelSymbol continueLabel) 3912protected BoundConditionalLoopStatement(BoundKind kind, SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, BoundExpression condition, BoundStatement body, GeneratedLabelSymbol breakLabel, GeneratedLabelSymbol continueLabel, bool hasErrors = false) 3935: base(BoundKind.DoStatement, syntax, locals, condition, body, breakLabel, continueLabel, hasErrors || condition.HasErrors() || body.HasErrors()) 3965: base(BoundKind.WhileStatement, syntax, locals, condition, body, breakLabel, continueLabel, hasErrors || condition.HasErrors() || body.HasErrors()) 3995: base(BoundKind.ForStatement, syntax, breakLabel, continueLabel, hasErrors || initializer.HasErrors() || condition.HasErrors() || increment.HasErrors() || body.HasErrors()) 4037: base(BoundKind.ForEachStatement, syntax, breakLabel, continueLabel, hasErrors || elementPlaceholder.HasErrors() || elementConversion.HasErrors() || iterationVariableType.HasErrors() || iterationErrorExpressionOpt.HasErrors() || expression.HasErrors() || deconstructionOpt.HasErrors() || awaitOpt.HasErrors() || body.HasErrors()) 4088: base(BoundKind.ForEachDeconstructStep, syntax, hasErrors || deconstructionAssignment.HasErrors() || targetPlaceholder.HasErrors()) 4119: base(BoundKind.UsingStatement, syntax, hasErrors || declarationsOpt.HasErrors() || expressionOpt.HasErrors() || body.HasErrors() || awaitOpt.HasErrors()) 4158: base(BoundKind.FixedStatement, syntax, hasErrors || declarations.HasErrors() || body.HasErrors()) 4192: base(BoundKind.LockStatement, syntax, hasErrors || argument.HasErrors() || body.HasErrors()) 4223: base(BoundKind.TryStatement, syntax, hasErrors || tryBlock.HasErrors() || catchBlocks.HasErrors() || finallyBlockOpt.HasErrors()) 4260: base(BoundKind.CatchBlock, syntax, hasErrors || exceptionSourceOpt.HasErrors() || exceptionFilterPrologueOpt.HasErrors() || exceptionFilterOpt.HasErrors() || body.HasErrors()) 4301: base(BoundKind.Literal, syntax, type, hasErrors) 4307: base(BoundKind.Literal, syntax, type) 4332: base(BoundKind.Utf8String, syntax, type, hasErrors) 4342: base(BoundKind.Utf8String, syntax, type) 4372: base(BoundKind.ThisReference, syntax, type, hasErrors) 4380: base(BoundKind.ThisReference, syntax, type) 4407: base(BoundKind.PreviousSubmissionReference, syntax, type, hasErrors) 4415: base(BoundKind.PreviousSubmissionReference, syntax, type) 4442: base(BoundKind.HostObjectMemberReference, syntax, type, hasErrors) 4450: base(BoundKind.HostObjectMemberReference, syntax, type) 4477: base(BoundKind.BaseReference, syntax, type, hasErrors) 4482: base(BoundKind.BaseReference, syntax, type) 4506: base(BoundKind.Local, syntax, type, hasErrors) 4519: base(BoundKind.Local, syntax, type) 4555: base(BoundKind.PseudoVariable, syntax, type, hasErrors) 4567: base(BoundKind.PseudoVariable, syntax, type) 4600: base(BoundKind.RangeVariable, syntax, type, hasErrors || value.HasErrors()) 4633: base(BoundKind.Parameter, syntax, type, hasErrors) 4643: base(BoundKind.Parameter, syntax, type) 4673: base(BoundKind.LabelStatement, syntax, hasErrors) 4682: base(BoundKind.LabelStatement, syntax) 4710: base(BoundKind.GotoStatement, syntax, hasErrors || caseExpressionOpt.HasErrors() || labelExpressionOpt.HasErrors()) 4742: base(BoundKind.LabeledStatement, syntax, hasErrors || body.HasErrors()) 4773: base(BoundKind.Label, syntax, type, hasErrors) 4782: base(BoundKind.Label, syntax, type) 4809protected BoundStatementList(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundStatement> statements, bool hasErrors = false) 4819: base(BoundKind.StatementList, syntax, hasErrors || statements.HasErrors()) 4847: base(BoundKind.ConditionalGoto, syntax, hasErrors || condition.HasErrors()) 4879protected BoundSwitchExpression(BoundKind kind, SyntaxNode syntax, BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol? type, bool hasErrors = false) 4904: base(BoundKind.SwitchExpressionArm, syntax, hasErrors || pattern.HasErrors() || whenClause.HasErrors() || value.HasErrors()) 4943: base(BoundKind.UnconvertedSwitchExpression, syntax, expression, switchArms, reachabilityDecisionDag, defaultLabel, reportedNotExhaustive, type, hasErrors || expression.HasErrors() || switchArms.HasErrors() || reachabilityDecisionDag.HasErrors()) 4971: base(BoundKind.ConvertedSwitchExpression, syntax, expression, switchArms, reachabilityDecisionDag, defaultLabel, reportedNotExhaustive, type, hasErrors || expression.HasErrors() || switchArms.HasErrors() || reachabilityDecisionDag.HasErrors()) 5005: base(BoundKind.DecisionDag, syntax, hasErrors || rootNode.HasErrors()) 5032protected BoundDecisionDagNode(BoundKind kind, SyntaxNode syntax, bool hasErrors) 5037protected BoundDecisionDagNode(BoundKind kind, SyntaxNode syntax) 5047: base(BoundKind.EvaluationDecisionDagNode, syntax, hasErrors || evaluation.HasErrors() || next.HasErrors()) 5078: base(BoundKind.TestDecisionDagNode, syntax, hasErrors || test.HasErrors() || whenTrue.HasErrors() || whenFalse.HasErrors()) 5112: base(BoundKind.WhenDecisionDagNode, syntax, hasErrors || whenExpression.HasErrors() || whenTrue.HasErrors() || whenFalse.HasErrors()) 5147: base(BoundKind.LeafDecisionDagNode, syntax, hasErrors) 5156: base(BoundKind.LeafDecisionDagNode, syntax) 5183protected BoundDagTest(BoundKind kind, SyntaxNode syntax, BoundDagTemp input, bool hasErrors = false) 5198: base(BoundKind.DagTemp, syntax, hasErrors || source.HasErrors()) 5230: base(BoundKind.DagTypeTest, syntax, input, hasErrors || input.HasErrors()) 5259: base(BoundKind.DagNonNullTest, syntax, input, hasErrors || input.HasErrors()) 5287: base(BoundKind.DagExplicitNullTest, syntax, input, hasErrors || input.HasErrors()) 5313: base(BoundKind.DagValueTest, syntax, input, hasErrors || input.HasErrors()) 5342: base(BoundKind.DagRelationalTest, syntax, input, hasErrors || input.HasErrors()) 5372protected BoundDagEvaluation(BoundKind kind, SyntaxNode syntax, BoundDagTemp input, bool hasErrors = false) 5385: base(BoundKind.DagDeconstructEvaluation, syntax, input, hasErrors || input.HasErrors()) 5414: base(BoundKind.DagTypeEvaluation, syntax, input, hasErrors || input.HasErrors()) 5443: base(BoundKind.DagFieldEvaluation, syntax, input, hasErrors || input.HasErrors()) 5472: base(BoundKind.DagPropertyEvaluation, syntax, input, hasErrors || input.HasErrors()) 5503: base(BoundKind.DagIndexEvaluation, syntax, input, hasErrors || input.HasErrors()) 5534: base(BoundKind.DagIndexerEvaluation, syntax, input, hasErrors || lengthTemp.HasErrors() || indexerAccess.HasErrors() || receiverPlaceholder.HasErrors() || argumentPlaceholder.HasErrors() || input.HasErrors()) 5581: base(BoundKind.DagSliceEvaluation, syntax, input, hasErrors || lengthTemp.HasErrors() || indexerAccess.HasErrors() || receiverPlaceholder.HasErrors() || argumentPlaceholder.HasErrors() || input.HasErrors()) 5630: base(BoundKind.DagAssignmentEvaluation, syntax, input, hasErrors || target.HasErrors() || input.HasErrors()) 5659: base(BoundKind.SwitchSection, syntax, statements, hasErrors || switchLabels.HasErrors() || statements.HasErrors()) 5691: base(BoundKind.SwitchLabel, syntax, hasErrors || pattern.HasErrors() || whenClause.HasErrors()) 5723protected BoundMethodOrPropertyGroup(BoundKind kind, SyntaxNode syntax, BoundExpression? receiverOpt, LookupResultKind resultKind, bool hasErrors = false) 5738: base(BoundKind.SequencePointExpression, syntax, type, hasErrors || expression.HasErrors()) 5766: base(BoundKind.Sequence, syntax, type, hasErrors || sideEffects.HasErrors() || value.HasErrors()) 5802: base(BoundKind.SpillSequence, syntax, type, hasErrors || sideEffects.HasErrors() || value.HasErrors()) 5838: base(BoundKind.DynamicMemberAccess, syntax, type, hasErrors || receiver.HasErrors()) 5876protected BoundDynamicInvocableBase(BoundKind kind, SyntaxNode syntax, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol? type, bool hasErrors = false) 5894: base(BoundKind.DynamicInvocation, syntax, expression, arguments, type, hasErrors || expression.HasErrors() || arguments.HasErrors()) 5930: base(BoundKind.ConditionalAccess, syntax, type, hasErrors || receiver.HasErrors() || accessExpression.HasErrors()) 5963: base(BoundKind.LoweredConditionalAccess, syntax, type, hasErrors || receiver.HasErrors() || whenNotNull.HasErrors() || whenNullOpt.HasErrors()) 6004: base(BoundKind.ConditionalReceiver, syntax, type, hasErrors) 6013: base(BoundKind.ConditionalReceiver, syntax, type) 6042: base(BoundKind.ComplexConditionalReceiver, syntax, type, hasErrors || valueTypeReceiver.HasErrors() || referenceTypeReceiver.HasErrors()) 6075: base(BoundKind.MethodGroup, syntax, receiverOpt, resultKind, hasErrors || receiverOpt.HasErrors()) 6116: base(BoundKind.PropertyGroup, syntax, receiverOpt, resultKind, hasErrors || receiverOpt.HasErrors()) 6144: base(BoundKind.Call, syntax, type, hasErrors || receiverOpt.HasErrors() || arguments.HasErrors()) 6199: base(BoundKind.EventAssignmentOperator, syntax, type, hasErrors || receiverOpt.HasErrors() || argument.HasErrors()) 6238: base(BoundKind.Attribute, syntax, type, hasErrors || constructorArguments.HasErrors() || namedArguments.HasErrors()) 6283: base(BoundKind.UnconvertedObjectCreationExpression, syntax, null, hasErrors || arguments.HasErrors()) 6320protected BoundObjectCreationExpressionBase(BoundKind kind, SyntaxNode syntax, TypeSymbol type, bool hasErrors) 6328protected BoundObjectCreationExpressionBase(BoundKind kind, SyntaxNode syntax, TypeSymbol type) 6342: base(BoundKind.ObjectCreationExpression, syntax, type, hasErrors || arguments.HasErrors() || initializerExpressionOpt.HasErrors()) 6392protected BoundCollectionExpressionBase(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundNode> elements, TypeSymbol? type, bool hasErrors = false) 6407: base(BoundKind.UnconvertedCollectionExpression, syntax, elements, null, hasErrors || elements.HasErrors()) 6434: base(BoundKind.CollectionExpression, syntax, elements, type, hasErrors || placeholder.HasErrors() || collectionCreation.HasErrors() || collectionBuilderInvocationPlaceholder.HasErrors() || collectionBuilderInvocationConversion.HasErrors() || unconvertedCollectionExpression.HasErrors() || elements.HasErrors()) 6479: base(BoundKind.CollectionExpressionSpreadExpressionPlaceholder, syntax, type, hasErrors) 6484: base(BoundKind.CollectionExpressionSpreadExpressionPlaceholder, syntax, type) 6507: base(BoundKind.CollectionExpressionSpreadElement, syntax, hasErrors || expression.HasErrors() || expressionPlaceholder.HasErrors() || conversion.HasErrors() || lengthOrCount.HasErrors() || elementPlaceholder.HasErrors() || iteratorBody.HasErrors()) 6546protected BoundTupleExpression(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type, bool hasErrors = false) 6565: base(BoundKind.TupleLiteral, syntax, arguments, argumentNamesOpt, inferredNamesOpt, type, hasErrors || arguments.HasErrors()) 6592: base(BoundKind.ConvertedTupleLiteral, syntax, arguments, argumentNamesOpt, inferredNamesOpt, type, hasErrors || sourceTuple.HasErrors() || arguments.HasErrors()) 6622: base(BoundKind.DynamicObjectCreationExpression, syntax, type, hasErrors || arguments.HasErrors() || initializerExpressionOpt.HasErrors()) 6665: base(BoundKind.NoPiaObjectCreationExpression, syntax, type, hasErrors || initializerExpressionOpt.HasErrors()) 6696protected BoundObjectInitializerExpressionBase(BoundKind kind, SyntaxNode syntax, BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type, bool hasErrors = false) 6716: base(BoundKind.ObjectInitializerExpression, syntax, placeholder, initializers, type, hasErrors || placeholder.HasErrors() || initializers.HasErrors()) 6744: base(BoundKind.ObjectInitializerMember, syntax, type, hasErrors || arguments.HasErrors()) 6793: base(BoundKind.DynamicObjectInitializerMember, syntax, type, hasErrors) 6805: base(BoundKind.DynamicObjectInitializerMember, syntax, type) 6838: base(BoundKind.CollectionInitializerExpression, syntax, placeholder, initializers, type, hasErrors || placeholder.HasErrors() || initializers.HasErrors()) 6866: base(BoundKind.CollectionElementInitializer, syntax, type, hasErrors || arguments.HasErrors() || implicitReceiverOpt.HasErrors()) 6911: base(BoundKind.DynamicCollectionElementInitializer, syntax, expression, arguments, type, hasErrors || expression.HasErrors() || arguments.HasErrors()) 6943: base(BoundKind.ImplicitReceiver, syntax, type, hasErrors) 6951: base(BoundKind.ImplicitReceiver, syntax, type) 6978: base(BoundKind.AnonymousObjectCreationExpression, syntax, type, hasErrors || arguments.HasErrors() || declarations.HasErrors()) 7014: base(BoundKind.AnonymousPropertyDeclaration, syntax, type, hasErrors) 7024: base(BoundKind.AnonymousPropertyDeclaration, syntax, type) 7054: base(BoundKind.NewT, syntax, type, hasErrors || initializerExpressionOpt.HasErrors()) 7084: base(BoundKind.DelegateCreationExpression, syntax, type, hasErrors || argument.HasErrors()) 7120: base(BoundKind.ArrayCreation, syntax, type, hasErrors || bounds.HasErrors() || initializerOpt.HasErrors()) 7152: base(BoundKind.ArrayInitialization, syntax, null, hasErrors || initializers.HasErrors()) 7182protected BoundStackAllocArrayCreationBase(BoundKind kind, SyntaxNode syntax, TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol? type, bool hasErrors = false) 7202: base(BoundKind.StackAllocArrayCreation, syntax, elementType, count, initializerOpt, type, hasErrors || count.HasErrors() || initializerOpt.HasErrors()) 7229: base(BoundKind.ConvertedStackAllocExpression, syntax, elementType, count, initializerOpt, type, hasErrors || count.HasErrors() || initializerOpt.HasErrors()) 7258: base(BoundKind.FieldAccess, syntax, type, hasErrors || receiverOpt.HasErrors()) 7298: base(BoundKind.HoistedFieldAccess, syntax, type, hasErrors) 7308: base(BoundKind.HoistedFieldAccess, syntax, type) 7338: base(BoundKind.PropertyAccess, syntax, type, hasErrors || receiverOpt.HasErrors()) 7376: base(BoundKind.EventAccess, syntax, type, hasErrors || receiverOpt.HasErrors()) 7412: base(BoundKind.IndexerAccess, syntax, type, hasErrors || receiverOpt.HasErrors() || arguments.HasErrors()) 7463: base(BoundKind.ImplicitIndexerAccess, syntax, type, hasErrors || receiver.HasErrors() || argument.HasErrors() || lengthOrCountAccess.HasErrors() || receiverPlaceholder.HasErrors() || indexerOrSliceAccess.HasErrors() || argumentPlaceholders.HasErrors()) 7512: base(BoundKind.InlineArrayAccess, syntax, type, hasErrors || expression.HasErrors() || argument.HasErrors()) 7553: base(BoundKind.DynamicIndexerAccess, syntax, type, hasErrors || receiver.HasErrors() || arguments.HasErrors()) 7593: base(BoundKind.Lambda, syntax, type, hasErrors || unboundLambda.HasErrors() || body.HasErrors()) 7633: base(BoundKind.UnboundLambda, syntax, null, hasErrors) 7644: base(BoundKind.UnboundLambda, syntax, null) 7677: base(BoundKind.QueryClause, syntax, type, hasErrors || value.HasErrors() || operation.HasErrors() || cast.HasErrors() || unoptimizedForm.HasErrors()) 7718: base(BoundKind.TypeOrInstanceInitializers, syntax, statements, hasErrors || statements.HasErrors()) 7744: base(BoundKind.NameOfOperator, syntax, type, hasErrors || argument.HasErrors()) 7776protected BoundInterpolatedStringBase(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type, bool hasErrors = false) 7793: base(BoundKind.UnconvertedInterpolatedString, syntax, parts, constantValueOpt, type, hasErrors || parts.HasErrors()) 7819: base(BoundKind.InterpolatedString, syntax, parts, constantValueOpt, type, hasErrors || parts.HasErrors()) 7847: base(BoundKind.InterpolatedStringHandlerPlaceholder, syntax, type, hasErrors) 7852: base(BoundKind.InterpolatedStringHandlerPlaceholder, syntax, type) 7875: base(BoundKind.InterpolatedStringArgumentPlaceholder, syntax, type, hasErrors) 7884: base(BoundKind.InterpolatedStringArgumentPlaceholder, syntax, type) 7913: base(BoundKind.StringInsert, syntax, null, hasErrors || value.HasErrors() || alignment.HasErrors() || format.HasErrors()) 7948: base(BoundKind.IsPatternExpression, syntax, type, hasErrors || expression.HasErrors() || pattern.HasErrors() || reachabilityDecisionDag.HasErrors()) 7989protected BoundPattern(BoundKind kind, SyntaxNode syntax, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors) 8000protected BoundPattern(BoundKind kind, SyntaxNode syntax, TypeSymbol inputType, TypeSymbol narrowedType) 8018: base(BoundKind.ConstantPattern, syntax, inputType, narrowedType, hasErrors || value.HasErrors()) 8051: base(BoundKind.DiscardPattern, syntax, inputType, narrowedType, hasErrors) 8060: base(BoundKind.DiscardPattern, syntax, inputType, narrowedType) 8086protected BoundObjectPattern(BoundKind kind, SyntaxNode syntax, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8104: base(BoundKind.DeclarationPattern, syntax, variable, variableAccess, inputType, narrowedType, hasErrors || declaredType.HasErrors() || variableAccess.HasErrors()) 8136: base(BoundKind.RecursivePattern, syntax, variable, variableAccess, inputType, narrowedType, hasErrors || declaredType.HasErrors() || deconstruction.HasErrors() || properties.HasErrors() || variableAccess.HasErrors()) 8173: base(BoundKind.ListPattern, syntax, variable, variableAccess, inputType, narrowedType, hasErrors || subpatterns.HasErrors() || lengthAccess.HasErrors() || indexerAccess.HasErrors() || receiverPlaceholder.HasErrors() || argumentPlaceholder.HasErrors() || variableAccess.HasErrors()) 8217: base(BoundKind.SlicePattern, syntax, inputType, narrowedType, hasErrors || pattern.HasErrors() || indexerAccess.HasErrors() || receiverPlaceholder.HasErrors() || argumentPlaceholder.HasErrors()) 8256: base(BoundKind.ITuplePattern, syntax, inputType, narrowedType, hasErrors || subpatterns.HasErrors()) 8291protected BoundSubpattern(BoundKind kind, SyntaxNode syntax, BoundPattern pattern, bool hasErrors = false) 8306: base(BoundKind.PositionalSubpattern, syntax, pattern, hasErrors || pattern.HasErrors()) 8334: base(BoundKind.PropertySubpattern, syntax, pattern, hasErrors || member.HasErrors() || pattern.HasErrors()) 8364: base(BoundKind.PropertySubpatternMember, syntax, hasErrors || receiver.HasErrors()) 8396: base(BoundKind.TypePattern, syntax, inputType, narrowedType, hasErrors || declaredType.HasErrors()) 8428: base(BoundKind.BinaryPattern, syntax, inputType, narrowedType, hasErrors || left.HasErrors() || right.HasErrors()) 8463: base(BoundKind.NegatedPattern, syntax, inputType, narrowedType, hasErrors || negated.HasErrors()) 8493: base(BoundKind.RelationalPattern, syntax, inputType, narrowedType, hasErrors || value.HasErrors()) 8528: base(BoundKind.DiscardExpression, syntax, type, hasErrors) 8535: base(BoundKind.DiscardExpression, syntax, type) 8563: base(BoundKind.ThrowExpression, syntax, type, hasErrors || expression.HasErrors()) 8590protected VariablePendingInference(BoundKind kind, SyntaxNode syntax, Symbol variableSymbol, BoundExpression? receiverOpt, bool hasErrors = false) 8608: base(BoundKind.OutVariablePendingInference, syntax, variableSymbol, receiverOpt, hasErrors || receiverOpt.HasErrors()) 8634: base(BoundKind.DeconstructionVariablePendingInference, syntax, variableSymbol, receiverOpt, hasErrors || receiverOpt.HasErrors()) 8660: base(BoundKind.OutDeconstructVarPendingInference, syntax, null, hasErrors) 8667: base(BoundKind.OutDeconstructVarPendingInference, syntax, null) 8694protected BoundMethodBodyBase(BoundKind kind, SyntaxNode syntax, BoundBlock? blockBody, BoundBlock? expressionBody, bool hasErrors = false) 8708: base(BoundKind.NonConstructorMethodBody, syntax, blockBody, expressionBody, hasErrors || blockBody.HasErrors() || expressionBody.HasErrors()) 8731: base(BoundKind.ConstructorMethodBody, syntax, blockBody, expressionBody, hasErrors || initializer.HasErrors() || blockBody.HasErrors() || expressionBody.HasErrors()) 8761: base(BoundKind.ExpressionWithNullability, syntax, type, hasErrors || expression.HasErrors()) 8792: base(BoundKind.WithExpression, syntax, type, hasErrors || receiver.HasErrors() || initializerExpression.HasErrors()) 8832case BoundKind.FieldEqualsValue: 8834case BoundKind.PropertyEqualsValue: 8836case BoundKind.ParameterEqualsValue: 8838case BoundKind.GlobalStatementInitializer: 8840case BoundKind.ValuePlaceholder: 8842case BoundKind.CapturedReceiverPlaceholder: 8844case BoundKind.DeconstructValuePlaceholder: 8846case BoundKind.TupleOperandPlaceholder: 8848case BoundKind.AwaitableValuePlaceholder: 8850case BoundKind.DisposableValuePlaceholder: 8852case BoundKind.ObjectOrCollectionValuePlaceholder: 8854case BoundKind.ImplicitIndexerValuePlaceholder: 8856case BoundKind.ImplicitIndexerReceiverPlaceholder: 8858case BoundKind.ListPatternReceiverPlaceholder: 8860case BoundKind.ListPatternIndexPlaceholder: 8862case BoundKind.SlicePatternReceiverPlaceholder: 8864case BoundKind.SlicePatternRangePlaceholder: 8866case BoundKind.Dup: 8868case BoundKind.PassByCopy: 8870case BoundKind.BadExpression: 8872case BoundKind.BadStatement: 8874case BoundKind.ExtractedFinallyBlock: 8876case BoundKind.TypeExpression: 8878case BoundKind.TypeOrValueExpression: 8880case BoundKind.NamespaceExpression: 8882case BoundKind.UnaryOperator: 8884case BoundKind.IncrementOperator: 8886case BoundKind.AddressOfOperator: 8888case BoundKind.UnconvertedAddressOfOperator: 8890case BoundKind.FunctionPointerLoad: 8892case BoundKind.PointerIndirectionOperator: 8894case BoundKind.PointerElementAccess: 8896case BoundKind.FunctionPointerInvocation: 8898case BoundKind.RefTypeOperator: 8900case BoundKind.MakeRefOperator: 8902case BoundKind.RefValueOperator: 8904case BoundKind.FromEndIndexExpression: 8906case BoundKind.RangeExpression: 8908case BoundKind.BinaryOperator: 8910case BoundKind.TupleBinaryOperator: 8912case BoundKind.UserDefinedConditionalLogicalOperator: 8914case BoundKind.CompoundAssignmentOperator: 8916case BoundKind.AssignmentOperator: 8918case BoundKind.DeconstructionAssignmentOperator: 8920case BoundKind.NullCoalescingOperator: 8922case BoundKind.NullCoalescingAssignmentOperator: 8924case BoundKind.UnconvertedConditionalOperator: 8926case BoundKind.ConditionalOperator: 8928case BoundKind.ArrayAccess: 8930case BoundKind.RefArrayAccess: 8932case BoundKind.ArrayLength: 8934case BoundKind.AwaitableInfo: 8936case BoundKind.AwaitExpression: 8938case BoundKind.TypeOfOperator: 8940case BoundKind.BlockInstrumentation: 8942case BoundKind.MethodDefIndex: 8944case BoundKind.LocalId: 8946case BoundKind.ParameterId: 8948case BoundKind.StateMachineInstanceId: 8950case BoundKind.MaximumMethodDefIndex: 8952case BoundKind.InstrumentationPayloadRoot: 8954case BoundKind.ThrowIfModuleCancellationRequested: 8956case BoundKind.ModuleCancellationTokenExpression: 8958case BoundKind.ModuleVersionId: 8960case BoundKind.ModuleVersionIdString: 8962case BoundKind.SourceDocumentIndex: 8964case BoundKind.MethodInfo: 8966case BoundKind.FieldInfo: 8968case BoundKind.DefaultLiteral: 8970case BoundKind.DefaultExpression: 8972case BoundKind.IsOperator: 8974case BoundKind.AsOperator: 8976case BoundKind.SizeOfOperator: 8978case BoundKind.Conversion: 8980case BoundKind.ReadOnlySpanFromArray: 8982case BoundKind.ArgList: 8984case BoundKind.ArgListOperator: 8986case BoundKind.FixedLocalCollectionInitializer: 8988case BoundKind.SequencePoint: 8990case BoundKind.SequencePointWithSpan: 8992case BoundKind.SavePreviousSequencePoint: 8994case BoundKind.RestorePreviousSequencePoint: 8996case BoundKind.StepThroughSequencePoint: 8998case BoundKind.Block: 9000case BoundKind.Scope: 9002case BoundKind.StateMachineScope: 9004case BoundKind.LocalDeclaration: 9006case BoundKind.MultipleLocalDeclarations: 9008case BoundKind.UsingLocalDeclarations: 9010case BoundKind.LocalFunctionStatement: 9012case BoundKind.NoOpStatement: 9014case BoundKind.ReturnStatement: 9016case BoundKind.YieldReturnStatement: 9018case BoundKind.YieldBreakStatement: 9020case BoundKind.ThrowStatement: 9022case BoundKind.ExpressionStatement: 9024case BoundKind.BreakStatement: 9026case BoundKind.ContinueStatement: 9028case BoundKind.SwitchStatement: 9030case BoundKind.SwitchDispatch: 9032case BoundKind.IfStatement: 9034case BoundKind.DoStatement: 9036case BoundKind.WhileStatement: 9038case BoundKind.ForStatement: 9040case BoundKind.ForEachStatement: 9042case BoundKind.ForEachDeconstructStep: 9044case BoundKind.UsingStatement: 9046case BoundKind.FixedStatement: 9048case BoundKind.LockStatement: 9050case BoundKind.TryStatement: 9052case BoundKind.CatchBlock: 9054case BoundKind.Literal: 9056case BoundKind.Utf8String: 9058case BoundKind.ThisReference: 9060case BoundKind.PreviousSubmissionReference: 9062case BoundKind.HostObjectMemberReference: 9064case BoundKind.BaseReference: 9066case BoundKind.Local: 9068case BoundKind.PseudoVariable: 9070case BoundKind.RangeVariable: 9072case BoundKind.Parameter: 9074case BoundKind.LabelStatement: 9076case BoundKind.GotoStatement: 9078case BoundKind.LabeledStatement: 9080case BoundKind.Label: 9082case BoundKind.StatementList: 9084case BoundKind.ConditionalGoto: 9086case BoundKind.SwitchExpressionArm: 9088case BoundKind.UnconvertedSwitchExpression: 9090case BoundKind.ConvertedSwitchExpression: 9092case BoundKind.DecisionDag: 9094case BoundKind.EvaluationDecisionDagNode: 9096case BoundKind.TestDecisionDagNode: 9098case BoundKind.WhenDecisionDagNode: 9100case BoundKind.LeafDecisionDagNode: 9102case BoundKind.DagTemp: 9104case BoundKind.DagTypeTest: 9106case BoundKind.DagNonNullTest: 9108case BoundKind.DagExplicitNullTest: 9110case BoundKind.DagValueTest: 9112case BoundKind.DagRelationalTest: 9114case BoundKind.DagDeconstructEvaluation: 9116case BoundKind.DagTypeEvaluation: 9118case BoundKind.DagFieldEvaluation: 9120case BoundKind.DagPropertyEvaluation: 9122case BoundKind.DagIndexEvaluation: 9124case BoundKind.DagIndexerEvaluation: 9126case BoundKind.DagSliceEvaluation: 9128case BoundKind.DagAssignmentEvaluation: 9130case BoundKind.SwitchSection: 9132case BoundKind.SwitchLabel: 9134case BoundKind.SequencePointExpression: 9136case BoundKind.Sequence: 9138case BoundKind.SpillSequence: 9140case BoundKind.DynamicMemberAccess: 9142case BoundKind.DynamicInvocation: 9144case BoundKind.ConditionalAccess: 9146case BoundKind.LoweredConditionalAccess: 9148case BoundKind.ConditionalReceiver: 9150case BoundKind.ComplexConditionalReceiver: 9152case BoundKind.MethodGroup: 9154case BoundKind.PropertyGroup: 9156case BoundKind.Call: 9158case BoundKind.EventAssignmentOperator: 9160case BoundKind.Attribute: 9162case BoundKind.UnconvertedObjectCreationExpression: 9164case BoundKind.ObjectCreationExpression: 9166case BoundKind.UnconvertedCollectionExpression: 9168case BoundKind.CollectionExpression: 9170case BoundKind.CollectionExpressionSpreadExpressionPlaceholder: 9172case BoundKind.CollectionExpressionSpreadElement: 9174case BoundKind.TupleLiteral: 9176case BoundKind.ConvertedTupleLiteral: 9178case BoundKind.DynamicObjectCreationExpression: 9180case BoundKind.NoPiaObjectCreationExpression: 9182case BoundKind.ObjectInitializerExpression: 9184case BoundKind.ObjectInitializerMember: 9186case BoundKind.DynamicObjectInitializerMember: 9188case BoundKind.CollectionInitializerExpression: 9190case BoundKind.CollectionElementInitializer: 9192case BoundKind.DynamicCollectionElementInitializer: 9194case BoundKind.ImplicitReceiver: 9196case BoundKind.AnonymousObjectCreationExpression: 9198case BoundKind.AnonymousPropertyDeclaration: 9200case BoundKind.NewT: 9202case BoundKind.DelegateCreationExpression: 9204case BoundKind.ArrayCreation: 9206case BoundKind.ArrayInitialization: 9208case BoundKind.StackAllocArrayCreation: 9210case BoundKind.ConvertedStackAllocExpression: 9212case BoundKind.FieldAccess: 9214case BoundKind.HoistedFieldAccess: 9216case BoundKind.PropertyAccess: 9218case BoundKind.EventAccess: 9220case BoundKind.IndexerAccess: 9222case BoundKind.ImplicitIndexerAccess: 9224case BoundKind.InlineArrayAccess: 9226case BoundKind.DynamicIndexerAccess: 9228case BoundKind.Lambda: 9230case BoundKind.UnboundLambda: 9232case BoundKind.QueryClause: 9234case BoundKind.TypeOrInstanceInitializers: 9236case BoundKind.NameOfOperator: 9238case BoundKind.UnconvertedInterpolatedString: 9240case BoundKind.InterpolatedString: 9242case BoundKind.InterpolatedStringHandlerPlaceholder: 9244case BoundKind.InterpolatedStringArgumentPlaceholder: 9246case BoundKind.StringInsert: 9248case BoundKind.IsPatternExpression: 9250case BoundKind.ConstantPattern: 9252case BoundKind.DiscardPattern: 9254case BoundKind.DeclarationPattern: 9256case BoundKind.RecursivePattern: 9258case BoundKind.ListPattern: 9260case BoundKind.SlicePattern: 9262case BoundKind.ITuplePattern: 9264case BoundKind.PositionalSubpattern: 9266case BoundKind.PropertySubpattern: 9268case BoundKind.PropertySubpatternMember: 9270case BoundKind.TypePattern: 9272case BoundKind.BinaryPattern: 9274case BoundKind.NegatedPattern: 9276case BoundKind.RelationalPattern: 9278case BoundKind.DiscardExpression: 9280case BoundKind.ThrowExpression: 9282case BoundKind.OutVariablePendingInference: 9284case BoundKind.DeconstructionVariablePendingInference: 9286case BoundKind.OutDeconstructVarPendingInference: 9288case BoundKind.NonConstructorMethodBody: 9290case BoundKind.ConstructorMethodBody: 9292case BoundKind.ExpressionWithNullability: 9294case BoundKind.WithExpression:
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (3)
307if (node.Expression.Kind == BoundKind.AwaitExpression) 311else if (node.Expression.Kind == BoundKind.AssignmentOperator) 314if (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)
36case BoundKind.MethodGroup: 44Debug.Assert(methodGroup.ReceiverOpt == null || methodGroup.ReceiverOpt.Kind != BoundKind.TypeOrValueExpression); 71case BoundKind.DynamicMemberAccess: 555case BoundKind.Parameter: 557goto case BoundKind.Local; 559case BoundKind.Local: 563case BoundKind.PassByCopy: 565case BoundKind.Conversion: 1538if (argument.Kind == BoundKind.Local) 1627if (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)
408if (statement.Kind == BoundKind.Block) 412if (rewrittenStatements.Length == 1 && rewrittenStatements[0].Kind == BoundKind.StateMachineScope) 568case BoundKind.ArrayAccess: 582case BoundKind.FieldAccess: 601if (receiver.Kind != BoundKind.ThisReference && !isFieldOfStruct) 609case BoundKind.ThisReference: 610case BoundKind.BaseReference: 611case BoundKind.DefaultExpression: 614case BoundKind.Call: 632case BoundKind.ConditionalOperator: 811if (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)
399if (convertedExpression.ConstantValueOpt == null && convertedExpression.Kind == BoundKind.Conversion &&