2431 references to BoundKind
Microsoft.CodeAnalysis.CSharp (2412)
Binder\Binder.cs (1)
886RoslynDebug.Assert(statement.Kind != BoundKind.StatementList);
Binder\Binder.ValueChecks.cs (230)
738case BoundKind.PropertyGroup: 748case BoundKind.Local: 752case BoundKind.OutVariablePendingInference: 753case BoundKind.OutDeconstructVarPendingInference: 757case BoundKind.DiscardExpression: 761case BoundKind.PropertyAccess: 799case BoundKind.IndexerAccess: 803case BoundKind.ImplicitIndexerAccess: 821case BoundKind.UnconvertedObjectCreationExpression: 822case BoundKind.UnconvertedCollectionExpression: 823case BoundKind.UnconvertedConditionalOperator: 824case BoundKind.UnconvertedSwitchExpression: 825case BoundKind.TupleLiteral: 832case BoundKind.PointerIndirectionOperator: 840case BoundKind.PointerElementAccess: 855if (expr.Kind == BoundKind.MethodGroup && valueKind != BindValueKind.RValueOrMethodGroup) 881if ((object)otherSymbol != null && receiver?.Kind == BoundKind.TypeOrValueExpression) 921case BoundKind.TypeOrValueExpression: 922case BoundKind.QueryClause when ((BoundQueryClause)expression).Value.Kind == BoundKind.TypeOrValueExpression: 954case BoundKind.PropertyAccess: 955case BoundKind.IndexerAccess: 956case BoundKind.ImplicitIndexerAccess when ((BoundImplicitIndexerAccess)expr).IndexerOrSliceAccess.Kind == BoundKind.IndexerAccess: 959case BoundKind.EventAccess: 979case BoundKind.NamespaceExpression: 984case BoundKind.TypeExpression: 989case BoundKind.Lambda: 990case BoundKind.UnboundLambda: 995case BoundKind.UnconvertedAddressOfOperator: 1000case BoundKind.MethodGroup when valueKind == BindValueKind.AddressOf: 1005case BoundKind.MethodGroup: 1011case BoundKind.RangeVariable: 1027case BoundKind.Conversion: 1038case BoundKind.ArrayAccess: 1042case BoundKind.PointerIndirectionOperator: 1044case BoundKind.RefValueOperator: 1046case BoundKind.DynamicMemberAccess: 1047case BoundKind.DynamicIndexerAccess: 1048case BoundKind.DynamicObjectInitializerMember: 1060case BoundKind.PointerElementAccess: 1077case BoundKind.Parameter: 1081case BoundKind.Local: 1085case BoundKind.ThisReference: 1113case BoundKind.ImplicitReceiver: 1114case BoundKind.ObjectOrCollectionValuePlaceholder: 1118case BoundKind.Call: 1122case BoundKind.FunctionPointerInvocation: 1130case BoundKind.ImplicitIndexerAccess: 1144case BoundKind.InlineArrayAccess: 1166case BoundKind.ImplicitIndexerReceiverPlaceholder: 1169case BoundKind.DeconstructValuePlaceholder: 1172case BoundKind.ConditionalOperator: 1192case BoundKind.FieldAccess: 1198case BoundKind.AssignmentOperator: 1209case BoundKind.ValuePlaceholder: 1261case BoundKind.NamespaceExpression: 1264case BoundKind.TypeExpression: 1911return Flags.Includes(BinderFlags.ObjectInitializerMember) && receiver.Kind == BoundKind.ObjectOrCollectionValuePlaceholder || 2075ReportDiagnosticsIfObsolete(diagnostics, setMethod, node, receiver?.Kind == BoundKind.BaseReference); 2125ReportDiagnosticsIfObsolete(diagnostics, getMethod, node, receiver?.Kind == BoundKind.BaseReference); 2208if (receiverOpt?.Kind == BoundKind.BaseReference && member.IsAbstract) 2690if (argument.Kind == BoundKind.ArgListOperator) 3731case BoundKind.ArrayAccess: 3732case BoundKind.PointerIndirectionOperator: 3733case BoundKind.PointerElementAccess: 3737case BoundKind.RefValueOperator: 3743case BoundKind.DiscardExpression: 3747case BoundKind.DynamicMemberAccess: 3748case BoundKind.DynamicIndexerAccess: 3754case BoundKind.Parameter: 3757case BoundKind.Local: 3760case BoundKind.CapturedReceiverPlaceholder: 3764case BoundKind.ThisReference: 3769case BoundKind.ConditionalOperator: 3782case BoundKind.FieldAccess: 3785case BoundKind.EventAccess: 3804case BoundKind.Call: 3824case BoundKind.FunctionPointerInvocation: 3839case BoundKind.IndexerAccess: 3849case BoundKind.ImplicitIndexerAccess: 3888case BoundKind.InlineArrayAccess: 3909case BoundKind.PropertyAccess: 3917case BoundKind.AssignmentOperator: 3929case BoundKind.Conversion: 3936case BoundKind.UnaryOperator: 3943case BoundKind.BinaryOperator: 3950case BoundKind.UserDefinedConditionalLogicalOperator: 3956case BoundKind.CompoundAssignmentOperator: 3963case BoundKind.IncrementOperator: 4015case BoundKind.ArrayAccess: 4016case BoundKind.PointerIndirectionOperator: 4017case BoundKind.PointerElementAccess: 4021case BoundKind.RefValueOperator: 4032case BoundKind.DiscardExpression: 4036case BoundKind.DynamicMemberAccess: 4037case BoundKind.DynamicIndexerAccess: 4043case BoundKind.Parameter: 4047case BoundKind.Local: 4051case BoundKind.CapturedReceiverPlaceholder: 4059case BoundKind.ThisReference: 4064case BoundKind.ConditionalOperator: 4076case BoundKind.FieldAccess: 4080case BoundKind.EventAccess: 4090case BoundKind.Call: 4114case BoundKind.IndexerAccess: 4133case BoundKind.ImplicitIndexerAccess: 4185case BoundKind.InlineArrayAccess: 4210case BoundKind.FunctionPointerInvocation: 4227case BoundKind.PropertyAccess: 4245case BoundKind.AssignmentOperator: 4262case BoundKind.Conversion: 4274case BoundKind.UnaryOperator: 4281case BoundKind.BinaryOperator: 4288case BoundKind.UserDefinedConditionalLogicalOperator: 4294case BoundKind.CompoundAssignmentOperator: 4301case BoundKind.IncrementOperator: 4308case BoundKind.ThrowExpression: 4371case BoundKind.ThisReference: 4375case BoundKind.DefaultLiteral: 4376case BoundKind.DefaultExpression: 4377case BoundKind.Utf8String: 4381case BoundKind.Parameter: 4384case BoundKind.FromEndIndexExpression: 4389case BoundKind.TupleLiteral: 4390case BoundKind.ConvertedTupleLiteral: 4394case BoundKind.MakeRefOperator: 4395case BoundKind.RefValueOperator: 4401case BoundKind.DiscardExpression: 4404case BoundKind.DeconstructValuePlaceholder: 4405case BoundKind.InterpolatedStringArgumentPlaceholder: 4406case BoundKind.AwaitableValuePlaceholder: 4409case BoundKind.Local: 4412case BoundKind.CapturedReceiverPlaceholder: 4417case BoundKind.StackAllocArrayCreation: 4418case BoundKind.ConvertedStackAllocExpression: 4421case BoundKind.ConditionalOperator: 4436case BoundKind.NullCoalescingOperator: 4442case BoundKind.FieldAccess: 4455case BoundKind.Call: 4469case BoundKind.FunctionPointerInvocation: 4477case BoundKind.IndexerAccess: 4487case BoundKind.ImplicitIndexerAccess: 4519case BoundKind.InlineArrayAccess: 4532case BoundKind.PropertyAccess: 4540case BoundKind.ObjectCreationExpression: 4558case BoundKind.NewT: 4573case BoundKind.WithExpression: 4579case BoundKind.UnaryOperator: 4590case BoundKind.Conversion: 4629case BoundKind.AssignmentOperator: 4633case BoundKind.NullCoalescingAssignmentOperator: 4638case BoundKind.IncrementOperator: 4659case BoundKind.CompoundAssignmentOperator: 4681case BoundKind.BinaryOperator: 4694case BoundKind.RangeExpression: 4700case BoundKind.UserDefinedConditionalLogicalOperator: 4707case BoundKind.QueryClause: 4710case BoundKind.RangeVariable: 4713case BoundKind.ObjectInitializerExpression: 4717case BoundKind.CollectionInitializerExpression: 4721case BoundKind.ObjectInitializerMember: 4727case BoundKind.ImplicitReceiver: 4728case BoundKind.ObjectOrCollectionValuePlaceholder: 4733case BoundKind.InterpolatedStringHandlerPlaceholder: 4738case BoundKind.DisposableValuePlaceholder: 4743case BoundKind.PointerElementAccess: 4744case BoundKind.PointerIndirectionOperator: 4748case BoundKind.AsOperator: 4749case BoundKind.AwaitExpression: 4750case BoundKind.ConditionalAccess: 4751case BoundKind.ConditionalReceiver: 4752case BoundKind.ArrayAccess: 4756case BoundKind.ArgList: 4760case BoundKind.ConvertedSwitchExpression: 4761case BoundKind.UnconvertedSwitchExpression: 4869if (expr.Kind == BoundKind.AssignmentOperator) 5023case BoundKind.ThisReference: 5028case BoundKind.DefaultLiteral: 5029case BoundKind.DefaultExpression: 5030case BoundKind.Utf8String: 5034case BoundKind.Parameter: 5037case BoundKind.TupleLiteral: 5038case BoundKind.ConvertedTupleLiteral: 5042case BoundKind.MakeRefOperator: 5043case BoundKind.RefValueOperator: 5047case BoundKind.DiscardExpression: 5051case BoundKind.DeconstructValuePlaceholder: 5052case BoundKind.AwaitableValuePlaceholder: 5053case BoundKind.InterpolatedStringArgumentPlaceholder: 5061case BoundKind.Local: 5070case BoundKind.CapturedReceiverPlaceholder: 5075case BoundKind.StackAllocArrayCreation: 5076case BoundKind.ConvertedStackAllocExpression: 5084case BoundKind.UnconvertedConditionalOperator: 5092case BoundKind.ConditionalOperator: 5108case BoundKind.NullCoalescingOperator: 5113case BoundKind.FieldAccess: 5126case BoundKind.Call: 5145case BoundKind.FunctionPointerInvocation: 5157case BoundKind.IndexerAccess: 5171case BoundKind.ImplicitIndexerAccess: 5213case BoundKind.InlineArrayAccess: 5230case BoundKind.PropertyAccess: 5242case BoundKind.ObjectCreationExpression: 5270case BoundKind.NewT: 5290case BoundKind.WithExpression: 5301case BoundKind.UnaryOperator: 5316case BoundKind.FromEndIndexExpression: 5320case BoundKind.Conversion: 5370case BoundKind.AssignmentOperator: 5375case BoundKind.NullCoalescingAssignmentOperator: 5380case BoundKind.IncrementOperator: 5405case BoundKind.CompoundAssignmentOperator: 5429case BoundKind.BinaryOperator: 5451case BoundKind.RangeExpression: 5461case BoundKind.UserDefinedConditionalLogicalOperator: 5472case BoundKind.QueryClause: 5476case BoundKind.RangeVariable: 5480case BoundKind.ObjectInitializerExpression: 5484case BoundKind.CollectionInitializerExpression: 5488case BoundKind.PointerElementAccess: 5492case BoundKind.PointerIndirectionOperator: 5496case BoundKind.AsOperator: 5497case BoundKind.AwaitExpression: 5498case BoundKind.ConditionalAccess: 5499case BoundKind.ConditionalReceiver: 5500case BoundKind.ArrayAccess: 5504case BoundKind.UnconvertedSwitchExpression: 5505case BoundKind.ConvertedSwitchExpression:
Binder\Binder_Attributes.cs (5)
816case BoundKind.FieldAccess: 821case BoundKind.PropertyAccess: 866case BoundKind.Conversion: 868case BoundKind.TypeOfOperator: 870case BoundKind.ArrayCreation:
Binder\Binder_Await.cs (3)
81if (expression.Kind != BoundKind.Call || 599if (getAwaiterCall.Kind != BoundKind.Call) 708if (getAwaiterGetResultCall.Kind != BoundKind.Call)
Binder\Binder_Conversions.cs (18)
141if (conversion.IsAnonymousFunction && source.Kind == BoundKind.UnboundLambda) 215if (source.Kind == BoundKind.UnconvertedSwitchExpression) 237if (source.Kind == BoundKind.UnconvertedCollectionExpression) 260if (source.Kind == BoundKind.UnconvertedConditionalOperator) 1330if (boundExpression.Kind == BoundKind.FieldAccess || boundExpression.Kind == BoundKind.PropertyAccess) 1337if (boundExpression.Kind != BoundKind.MethodGroup) 2209Debug.Assert(source.Kind is BoundKind.MethodGroup or BoundKind.UnboundLambda); 2216if (source.Kind == BoundKind.UnboundLambda && 2225source.Kind == BoundKind.MethodGroup && 2607if (node.Kind != BoundKind.MethodGroup) 2750if (receiverOpt.Kind == BoundKind.QueryClause) 2852while (receiverOpt.Kind == BoundKind.QueryClause) 2857return receiverOpt.Kind == BoundKind.TypeExpression; 2869case BoundKind.ThisReference: 2870case BoundKind.HostObjectMemberReference: 2871case BoundKind.PreviousSubmissionReference:
Binder\Binder_Deconstruct.cs (9)
213if (boundRHS.Kind == BoundKind.TupleLiteral) 373case BoundKind.DeconstructionVariablePendingInference: 378case BoundKind.DiscardExpression: 408case BoundKind.DeconstructionVariablePendingInference: 412case BoundKind.DiscardExpression: 490if (element.Kind == BoundKind.TupleLiteral) 599if (expression.Kind == BoundKind.DiscardExpression) 663if (memberAccess.Kind != BoundKind.MethodGroup) 795if (expression == null && checkedVariable.Kind != BoundKind.DiscardExpression)
Binder\Binder_Expressions.cs (71)
224BoundKind exprKind = expr.Kind; 226if (expr.HasAnyErrors && ((object)resultType != null || exprKind == BoundKind.UnboundLambda || exprKind == BoundKind.DefaultLiteral)) 231if (exprKind == BoundKind.BadExpression) 278if (valueOrType.Kind == BoundKind.TypeExpression) 448Debug.Assert(expr.Kind is BoundKind.UnboundLambda or BoundKind.MethodGroup); 578if (expr.Kind == BoundKind.ArgListOperator) 620if (IsEarlyAttributeBinder && result.Kind == BoundKind.MethodGroup && (!IsInsideNameof || EnclosingNameofArgument != node)) 2847if (operand.Kind == BoundKind.UnboundLambda) 2896case BoundKind.MethodGroup: 2906case BoundKind.TupleLiteral: 2930case BoundKind.StackAllocArrayCreation: 2936case BoundKind.UnconvertedConditionalOperator when operand.Type is null: 2937case BoundKind.UnconvertedSwitchExpression when operand.Type is null: 2942case BoundKind.UnconvertedCollectionExpression: 2947case BoundKind.UnconvertedAddressOfOperator: 3193case BoundKind.PropertyAccess: 3194case BoundKind.IndexerAccess: 3584else if (argument.Kind == BoundKind.OutVariablePendingInference) 3588else if (argument.Kind == BoundKind.OutDeconstructVarPendingInference) 3592else if (argument.Kind == BoundKind.DiscardExpression && !argument.HasExpressionType()) 3628(BoundKind.OutVariablePendingInference or BoundKind.OutDeconstructVarPendingInference or BoundKind.DiscardExpression or BoundKind.ArgListOperator)); 5524else if (argument.Kind == BoundKind.MethodGroup) 5961if (boundMember.Kind == BoundKind.PropertyGroup) 6003BoundKind boundMemberKind = boundMember.Kind; 6015case BoundKind.FieldAccess: 6032case BoundKind.EventAccess: 6035case BoundKind.PropertyAccess: 6039case BoundKind.IndexerAccess: 6073case BoundKind.ImplicitIndexerAccess: 6084case BoundKind.DynamicObjectInitializerMember: 6087case BoundKind.DynamicIndexerAccess: 6097case BoundKind.ArrayAccess: 6098case BoundKind.PointerElementAccess: 6592if (addMethodInvocation.Kind == BoundKind.DynamicInvocation) 6603else if (addMethodInvocation.Kind == BoundKind.Call) 6632Debug.Assert(addMethodInvocation.Kind == BoundKind.BadExpression); 7112case BoundKind.ObjectCreationExpression: 7118case BoundKind.BadExpression: 7816if (boundLeft.Kind == BoundKind.UnboundLambda) 7863case BoundKind.NamespaceExpression: 7873case BoundKind.TypeExpression: 7883case BoundKind.TypeOrValueExpression: 7893if (boundLeft.Kind == BoundKind.Literal && ((BoundLiteral)boundLeft).ConstantValueOpt == ConstantValue.Null) 8082case BoundKind.MethodGroup: 8105case BoundKind.PropertyGroup: 8207bool leftIsBaseReference = boundLeft.Kind == BoundKind.BaseReference; 8314if (boundLeft.HasAnyErrors && boundLeft.Kind != BoundKind.TypeOrValueExpression) 8335else if (boundLeft.Kind == BoundKind.TypeExpression || 8336boundLeft.Kind == BoundKind.BaseReference || 8346else if (boundLeft.Kind == BoundKind.AwaitableValuePlaceholder && boundLeft.Type.IsIAsyncEnumerableType(Compilation)) 8577ReportDiagnosticsIfObsolete(diagnostics, symbol, node, hasBaseReceiver: left.Kind == BoundKind.BaseReference); 9193ReportDiagnosticsIfObsolete(diagnostics, propertySymbol, node, hasBaseReceiver: receiver?.Kind == BoundKind.BaseReference); 9299case BoundKind.PreviousSubmissionReference: 9302case BoundKind.TypeExpression: 9304case BoundKind.QueryClause: 9495if (receiver.Kind == BoundKind.PropertyGroup) 9910if (index.Kind == BoundKind.OutVariablePendingInference) 9914else if (index.Kind == BoundKind.DiscardExpression && !index.HasExpressionType()) 10102LookupOptions lookupOptions = expr.Kind == BoundKind.BaseReference ? LookupOptions.UseBaseReferenceAccessibility : LookupOptions.Default; 10216BoundKind receiverKind = receiver.Kind; 10217if (receiverKind == BoundKind.BaseReference) 10222else if (receiverKind == BoundKind.TypeOrValueExpression) 10358ReportDiagnosticsIfObsolete(diagnostics, property, syntax, hasBaseReceiver: receiver != null && receiver.Kind == BoundKind.BaseReference); 10368if (!gotError && receiver != null && receiver.Kind == BoundKind.ThisReference && receiver.WasCompilerGenerated) 11520if (access.Kind == BoundKind.MethodGroup) 11687if (receiver.Kind == BoundKind.UnboundLambda)
Binder\Binder_Initializers.cs (2)
268if (statement.Kind == BoundKind.LabeledStatement) 271while (labeledStatementBody.Kind == BoundKind.LabeledStatement)
Binder\Binder_Invocation.cs (40)
108if (!allowFieldsAndProperties && (boundExpression.Kind == BoundKind.FieldAccess || boundExpression.Kind == BoundKind.PropertyAccess)) 113if (boundExpression.Kind == BoundKind.FieldAccess) 125Debug.Assert(allowFieldsAndProperties || boundExpression.Kind is (BoundKind.MethodGroup or BoundKind.BadExpression)); 130Debug.Assert(!args.Any(static e => e.Kind == BoundKind.OutVariablePendingInference || 131e.Kind == BoundKind.OutDeconstructVarPendingInference || 132e.Kind == BoundKind.DiscardExpression && !e.HasExpressionType())); 146if (queryClause != null && result.Kind == BoundKind.DynamicInvocation) 162if (boundExpression.Kind == BoundKind.FieldAccess) 247string name = boundExpression.Kind == BoundKind.MethodGroup ? GetName(node.Expression) : null; 281if (argument.Kind == BoundKind.OutVariablePendingInference) 358else if (boundExpression.Kind == BoundKind.MethodGroup) 411if (expression.Kind == BoundKind.MethodGroup) 421case BoundKind.BaseReference: 426case BoundKind.ThisReference: 449case BoundKind.TypeOrValueExpression: 594if (arg.Kind == BoundKind.Lambda || arg.Kind == BoundKind.UnboundLambda) 600else if (arg.Kind == BoundKind.MethodGroup) 606else if (arg.Kind == BoundKind.ArgListOperator) 735Debug.Assert(extensionMemberAccess.Kind != BoundKind.MethodGroup); 1082case BoundKind.Call: 1096else if (call.ReceiverOpt.Kind == BoundKind.BaseReference && this.ContainingType.IsRestrictedType()) 1104case BoundKind.DynamicInvocation: 1117case BoundKind.FunctionPointerInvocation: 1314if (!gotError && method.RequiresInstanceReceiver && receiver != null && receiver.Kind == BoundKind.ThisReference && receiver.WasCompilerGenerated) 1330bool hasBaseReceiver = receiver != null && receiver.Kind == BoundKind.BaseReference; 1956case BoundKind.TypeOrValueExpression: 1982case BoundKind.QueryClause: 2020if ((object)expr != null && expr.Kind != BoundKind.TypeExpression) 2161case BoundKind.UnboundLambda: 2198case BoundKind.OutVariablePendingInference: 2199case BoundKind.DiscardExpression: 2207if (argument.Kind == BoundKind.OutVariablePendingInference) 2218else if (argument.Kind == BoundKind.DiscardExpression) 2232case BoundKind.OutDeconstructVarPendingInference: 2237case BoundKind.Parameter: 2238case BoundKind.Local: 2326var originalMethods = (expr.Kind == BoundKind.MethodGroup) ? ((BoundMethodGroup)expr).Methods : ImmutableArray<MethodSymbol>.Empty;
Binder\Binder_Operators.cs (43)
43if (left.Kind == BoundKind.EventAccess) 111if (left.Kind == BoundKind.EventAccess && !CheckEventValueKind((BoundEventAccess)left, BindValueKind.Assignable, diagnostics)) 316Debug.Assert(left.Kind != BoundKind.EventAccess || hasError); 909if (result.Kind == BoundKind.TypeExpression 914else if (result.Kind == BoundKind.BadExpression) 1341case (BoundKind.DefaultLiteral, _) when !isEquality: 1342case (_, BoundKind.DefaultLiteral) when !isEquality: 1346case (BoundKind.DefaultLiteral, BoundKind.DefaultLiteral): 1349case (BoundKind.DefaultLiteral, _) when right.Type is TypeParameterSymbol: 1353case (_, BoundKind.DefaultLiteral) when left.Type is TypeParameterSymbol: 1357case (BoundKind.UnconvertedObjectCreationExpression, _): 1360case (_, BoundKind.UnconvertedObjectCreationExpression): 2926if (left.Kind == BoundKind.Conversion && right.Kind == BoundKind.Conversion) 4045case BoundKind.NamespaceExpression: 4046case BoundKind.TypeExpression: 4167BoundKind exprKind = expr.Kind; 4170case BoundKind.FieldAccess: 4171case BoundKind.EventAccess: 4175if (exprKind == BoundKind.FieldAccess) 4217case BoundKind.InlineArrayAccess: 4229case BoundKind.RangeVariable: 4237case BoundKind.Parameter: 4260case BoundKind.ThisReference: 4261case BoundKind.BaseReference: 4266case BoundKind.Local: 4276case BoundKind.PointerIndirectionOperator: //Covers ->, since the receiver will be one of these. 4277case BoundKind.ConvertedStackAllocExpression: 4281case BoundKind.PointerElementAccess: 4296case BoundKind.PropertyAccess: // Never fixed 4297case BoundKind.IndexerAccess: // Never fixed 4763case BoundKind.UnboundLambda: 4764case BoundKind.Lambda: 4765case BoundKind.MethodGroup: // New in Roslyn - see DevDiv #864740. 4893operand.Kind == BoundKind.MethodGroup || 5311case BoundKind.UnboundLambda: 5312case BoundKind.Lambda: 5313case BoundKind.MethodGroup: // New in Roslyn - see DevDiv #864740. 5322case BoundKind.TupleLiteral: 5323case BoundKind.ConvertedTupleLiteral: 5622if (leftOperand.Kind == BoundKind.UnboundLambda || leftOperand.Kind == BoundKind.MethodGroup)
Binder\Binder_Patterns.cs (11)
520wasExpression = expression.Kind != BoundKind.TypeExpression; 527Debug.Assert(expression is { Kind: BoundKind.TypeExpression, Type: { } }); 549wasExpression = expression.Kind switch { BoundKind.BadExpression => false, BoundKind.TypeExpression => false, _ => true }; 698if (convertedExpression.Kind == BoundKind.Conversion) 1573if (boundMember.Kind == BoundKind.PropertyGroup) 1583case BoundKind.FieldAccess: 1584case BoundKind.PropertyAccess: 1587case BoundKind.IndexerAccess: 1588case BoundKind.DynamicIndexerAccess: 1589case BoundKind.EventAccess:
Binder\Binder_Query.cs (7)
929while (ultimateReceiver.Kind == BoundKind.QueryClause) 936Debug.Assert(ultimateReceiver.Kind != BoundKind.MethodGroup || ultimateReceiver.HasAnyErrors); 954else if (ultimateReceiver.Kind == BoundKind.NamespaceExpression) 958else if (ultimateReceiver.Kind == BoundKind.Lambda || ultimateReceiver.Kind == BoundKind.UnboundLambda) 966else if (ultimateReceiver.Kind == BoundKind.TypeExpression) 974else 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 && 899BoundExpression expression = value.Kind is BoundKind.UnboundLambda or BoundKind.MethodGroup ? 1252case BoundKind.AddressOfOperator: 1256case BoundKind.FieldAccess: 1434bool discardAssignment = op1.Kind == BoundKind.DiscardExpression; 1513if (op1.Kind != BoundKind.DynamicIndexerAccess && 1514op1.Kind != BoundKind.DynamicMemberAccess && 1515op1.Kind != BoundKind.DynamicObjectInitializerMember) 1531if ((op1.Kind == BoundKind.EventAccess) && 1588else if (op1.Kind is BoundKind.Local or BoundKind.Parameter) 1601Debug.Assert(op1.Kind != BoundKind.Parameter); // If the assert fails, add a corresponding test. 1678case BoundKind.PropertyAccess: 1685case BoundKind.IndexerAccess: 1692case BoundKind.ImplicitIndexerAccess: 1817(propertyIsStatic || receiver?.Kind == BoundKind.ThisReference); 1852else if (receiver.Kind == BoundKind.BaseReference) 1978if (expression.HasAnyErrors && expression.Kind != BoundKind.UnboundLambda) 2368case BoundKind.BadExpression: 2372case BoundKind.UnboundLambda: 2377case BoundKind.TupleLiteral: 2401case BoundKind.MethodGroup: 2406case BoundKind.UnconvertedAddressOfOperator: 2411case BoundKind.Literal: 2428case BoundKind.StackAllocArrayCreation: 2434case BoundKind.UnconvertedSwitchExpression: 2447case BoundKind.UnconvertedCollectionExpression: 2452case BoundKind.AddressOfOperator when targetType.IsFunctionPointer(): 2457case BoundKind.UnconvertedConditionalOperator: 2486Debug.Assert(operand.HasAnyErrors && operand.Kind != BoundKind.UnboundLambda, "Missing a case in implicit conversion error reporting"); 2729if (expr.Kind == BoundKind.AssignmentOperator) 2732if (assignment.Right.Kind == BoundKind.Literal && assignment.Right.ConstantValueOpt.Discriminator == ConstantValueTypeDiscriminator.Boolean) 3209if (!argument.HasAnyErrors || argument.Kind == BoundKind.UnboundLambda) 3485if (expression.Kind == BoundKind.DelegateCreationExpression || expression.Kind == BoundKind.NameOfOperator) 3513if ((refKind != RefKind.None) != (returnRefKind != RefKind.None) && expression.Kind != BoundKind.ThrowExpression) 4171if (boundAccess.Kind != BoundKind.MethodGroup) 4199if (patternMethodCall.Kind != BoundKind.Call)
Binder\Binder_TupleOperators.cs (2)
224Debug.Assert((object)left.Type != null || left.Kind == BoundKind.TupleLiteral); 225Debug.Assert((object)right.Type != null || right.Kind == BoundKind.TupleLiteral);
Binder\DecisionDagBuilder.cs (3)
2766if (RemainingTests[0] is One { Test: { Kind: BoundKind.DagNonNullTest } planA }) 2773case One { Test: { Kind: BoundKind.DagTypeTest } planB1 }: 2780case One { Test: { Kind: BoundKind.DagValueTest } planB2 }:
Binder\DecisionDagBuilder_ListPatterns.cs (1)
19list.Subpatterns.Count(p => p.Kind == BoundKind.SlicePattern) == (list.HasSlice ? 1 : 0) &&
Binder\ForEachLoopBinder.cs (1)
410if (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)
602if (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) 1646if (source.Kind != BoundKind.UnboundLambda) 1949if (sourceExpressionOpt?.Kind == BoundKind.TupleLiteral)
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (1)
469&& nonDelegate.Kind == BoundKind.UnboundLambda)
Binder\Semantics\OverloadResolution\MethodGroup.cs (1)
117if (this.Receiver.Kind == BoundKind.TypeExpression)
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (17)
637if (argument.Kind == BoundKind.UnboundLambda && target.Type.GetDelegateType() is { }) 642else if (argument.Kind == BoundKind.UnconvertedCollectionExpression) 646else if (argument.Kind != BoundKind.TupleLiteral || 879if (argument.Kind == BoundKind.TupleLiteral && (object)argument.Type == null) 883else if (argument.Kind == BoundKind.UnconvertedCollectionExpression) 1023if ((isFunctionPointer && argument.Kind != BoundKind.UnconvertedAddressOfOperator) || 1024(!isFunctionPointer && argument.Kind is not (BoundKind.UnboundLambda or BoundKind.MethodGroup))) 1079if ((isFunctionPointer && argument.Kind != BoundKind.UnconvertedAddressOfOperator) || 1080(!isFunctionPointer && argument.Kind is not (BoundKind.UnboundLambda or BoundKind.MethodGroup))) 1448if (source.Kind is not (BoundKind.MethodGroup or BoundKind.UnconvertedAddressOfOperator)) 1459if (delegateOrFunctionPointerType.IsFunctionPointer() != (source.Kind == BoundKind.UnconvertedAddressOfOperator)) 1559if (source.Kind != BoundKind.UnboundLambda) 1613if (source.Kind != BoundKind.UnboundLambda) 3091if (source.Kind != BoundKind.UnboundLambda)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (18)
2172var argumentKind = arguments[i].Kind; 2176if (argumentKind == BoundKind.ArgListOperator) 2314var argumentKind = arguments[i].Kind; 2318if (argumentKind == BoundKind.ArgListOperator) 2478if (arguments[i].Kind == BoundKind.ArgListOperator) 2624if (arguments[i].Kind != BoundKind.ArgListOperator) 2951var nodeKind = node.Kind; 2952if (nodeKind == BoundKind.OutVariablePendingInference || 2953nodeKind == BoundKind.OutDeconstructVarPendingInference || 2954(nodeKind == BoundKind.DiscardExpression && !node.HasExpressionType())) 3274if (node.Kind == BoundKind.TupleLiteral) 3290if (node.Kind == BoundKind.UnboundLambda && 3330if (lambda.Body.Statements[0].Kind == BoundKind.ReturnStatement) 3606if (node?.Kind == BoundKind.MethodGroup) 4556if (argument.Kind == BoundKind.ArgListOperator) 4731if (argument.Kind == BoundKind.OutVariablePendingInference || 4732argument.Kind == BoundKind.OutDeconstructVarPendingInference || 4733(argument.Kind == BoundKind.DiscardExpression && (object)argType == null))
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (13)
677if (receiverOpt?.Kind == BoundKind.QueryClause) 1100if (argument.Kind == BoundKind.UnboundLambda) 1240argument.Kind != BoundKind.OutDeconstructVarPendingInference && 1241argument.Kind != BoundKind.OutVariablePendingInference && 1242argument.Kind != BoundKind.DiscardExpression) 1248if (argument.Kind == BoundKind.UnboundLambda && refArg == refParameter) 1252else if (argument.Kind == BoundKind.MethodGroup && parameterType.TypeKind == TypeKind.Delegate && 1257else if (argument.Kind == BoundKind.MethodGroup && parameterType.TypeKind == TypeKind.FunctionPointer) 1261else if (argument.Kind == BoundKind.UnconvertedAddressOfOperator && 1266else if (argument.Kind == BoundKind.UnconvertedCollectionExpression) 1331Debug.Assert(argument.Kind != BoundKind.OutDeconstructVarPendingInference); 1332Debug.Assert(argument.Kind != BoundKind.OutVariablePendingInference); 1333Debug.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: 613return this.Condition.Kind == BoundKind.UnaryOperator && ((BoundUnaryOperator)this.Condition).OperatorKind.IsDynamic(); 679if (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); 182case BoundKind.MethodGroup: 196case BoundKind.BadExpression: 204case BoundKind.DelegateCreationExpression: 213case BoundKind.Call: 227case BoundKind.IndexerAccess: 254case 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)
250if (child.Kind != BoundKind.BinaryOperator) 265if (child.Kind != BoundKind.BinaryOperator) 344if (child.Kind != BoundKind.BinaryPattern) 359if (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: 213Debug.Assert(method is ErrorMethodSymbol || arguments[i].Kind == BoundKind.ArgListOperator);
BoundTree\Expression.cs (2)
170(this.Kind == BoundKind.StatementList || this.Kind == BoundKind.Scope) ? StaticCast<BoundNode?>.From(this.Statements) : ImmutableArray<BoundNode?>.Empty;
CodeGen\CodeGenerator_HasHome.cs (17)
53case BoundKind.ArrayAccess: 63case BoundKind.PointerIndirectionOperator: 64case BoundKind.RefValueOperator: 67case BoundKind.ThisReference: 82case BoundKind.ThrowExpression: 86case BoundKind.Parameter: 90case BoundKind.Local: 97case BoundKind.Call: 102case BoundKind.Dup: 108case BoundKind.FieldAccess: 111case BoundKind.Sequence: 114case BoundKind.AssignmentOperator: 124case BoundKind.ComplexConditionalReceiver: 137goto case BoundKind.ConditionalReceiver; 139case BoundKind.ConditionalReceiver: 144case BoundKind.ConditionalOperator: 257fieldAccess.ReceiverOpt.Kind == BoundKind.ThisReference;
CodeGen\EmitAddress.cs (25)
28case BoundKind.RefValueOperator: 32case BoundKind.Local: 35case BoundKind.Dup: 39case BoundKind.ConditionalReceiver: 45case BoundKind.ComplexConditionalReceiver: 49case BoundKind.Parameter: 52case BoundKind.FieldAccess: 55case BoundKind.ArrayAccess: 64case BoundKind.ThisReference: 85case BoundKind.PreviousSubmissionReference: 89case BoundKind.BaseReference: 93case BoundKind.PassByCopy: 96case BoundKind.Sequence: 99case BoundKind.PointerIndirectionOperator: 106case BoundKind.PseudoVariable: 110case BoundKind.Call: 121case BoundKind.FunctionPointerInvocation: 133case BoundKind.DefaultExpression: 143case BoundKind.ConditionalOperator: 152case BoundKind.AssignmentOperator: 164case BoundKind.ThrowExpression: 355case BoundKind.Local: 364case BoundKind.Sequence: 367case BoundKind.FieldAccess: 522if (receiver.Kind != BoundKind.ConditionalReceiver)
CodeGen\EmitArrayInitializer.cs (4)
347if (inits[0].Kind == BoundKind.ArrayInitialization) 369Debug.Assert(inits.All((init) => init.Kind != BoundKind.ArrayInitialization) || 370inits.All((init) => init.Kind == BoundKind.ArrayInitialization), 373return 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)) || 870Debug.Assert(sequence.Value.Kind != BoundKind.TypeExpression || !used); 871if (sequence.Value.Kind != BoundKind.TypeExpression) 1013Debug.Assert(arguments[i].Kind == BoundKind.ArgListOperator); 1242else if (receiver.Kind == BoundKind.Conversion) 1253else if (receiver.Kind == BoundKind.FieldAccess) 1284if (receiver.Kind == BoundKind.Conversion && ((BoundConversion)receiver).ConversionKind == ConversionKind.Unboxing) 1297case BoundKind.Parameter: 1301case BoundKind.Local: 1305case BoundKind.Sequence: 1308case BoundKind.FieldAccess: 1527Debug.Assert(receiver.Kind != BoundKind.BaseReference, "base should always use call"); 1538case BoundKind.ArrayCreation: 1541case BoundKind.ObjectCreationExpression: 1546case BoundKind.Conversion: 1566case BoundKind.ThisReference: 1573case BoundKind.FieldAccess: 1577case BoundKind.Local: 1581case BoundKind.DelegateCreationExpression: 1584case BoundKind.Sequence: 1588case BoundKind.AssignmentOperator: 1592case BoundKind.TypeOfOperator: 1595case BoundKind.ConditionalReceiver: 1611case BoundKind.ThisReference: 1614case BoundKind.Sequence: 1657Debug.Assert(receiver.Kind == BoundKind.ThisReference); 2159case BoundKind.TypeExpression: 2160case BoundKind.Parameter: 2161case BoundKind.Local: 2162case BoundKind.ThisReference: 2164case BoundKind.FieldAccess: 2175case BoundKind.PassByCopy: 2178case BoundKind.BinaryOperator: 2191case BoundKind.Conversion: 2240case BoundKind.Local: 2243case BoundKind.Parameter: 2246case BoundKind.Call: 2249case BoundKind.FunctionPointerInvocation: 2252case BoundKind.Dup: 2255case BoundKind.Sequence: 2652if (objCreation.Arguments.Length > 0 && objCreation.Arguments[0].Kind == BoundKind.ConvertedStackAllocExpression) 2686if (left.Kind == BoundKind.ArrayAccess && left.Type.TypeKind == TypeKind.TypeParameter && !left.Type.IsValueType) 2691if (left.Kind == BoundKind.FieldAccess) 2795case BoundKind.Parameter: 2798case BoundKind.Local: 2814case BoundKind.RefValueOperator: 2818case BoundKind.FieldAccess: 2836case BoundKind.Parameter: 2848case BoundKind.Local: 2900case BoundKind.ArrayAccess: 2909case BoundKind.ThisReference: 2920case BoundKind.Dup: 2931case BoundKind.ConditionalOperator: 2943case BoundKind.PointerIndirectionOperator: 2953case BoundKind.Sequence: 2966case BoundKind.Call: 2977case BoundKind.FunctionPointerInvocation: 2988case BoundKind.PropertyAccess: 2989case BoundKind.IndexerAccess: 2991case BoundKind.PreviousSubmissionReference: 2995case BoundKind.PseudoVariable: 3000case BoundKind.ModuleVersionId: 3001case BoundKind.InstrumentationPayloadRoot: 3004case BoundKind.AssignmentOperator: 3043Debug.Assert(lhs.Kind != BoundKind.Parameter || exprTempsAfter <= exprTempsBefore); 3045if (lhs.Kind == BoundKind.Local && ((BoundLocal)lhs).LocalSymbol.SynthesizedKind.IsLongLived()) 3103case BoundKind.FieldAccess: 3107case BoundKind.Local: 3134case BoundKind.ArrayAccess: 3140case BoundKind.ThisReference: 3144case BoundKind.Parameter: 3148case BoundKind.Dup: 3153case BoundKind.ConditionalOperator: 3158case BoundKind.RefValueOperator: 3159case BoundKind.PointerIndirectionOperator: 3160case BoundKind.PseudoVariable: 3164case BoundKind.Sequence: 3171case BoundKind.Call: 3176case BoundKind.FunctionPointerInvocation: 3181case BoundKind.ModuleVersionId: 3185case BoundKind.InstrumentationPayloadRoot: 3189case BoundKind.AssignmentOperator: 3198case BoundKind.PreviousSubmissionReference: 3956case BoundKind.Conversion: 3970case BoundKind.AssignmentOperator: 3974case BoundKind.Sequence: 3978case BoundKind.Local: 3987case 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: 1158while (exceptionSource.Kind == BoundKind.Sequence) 1168case BoundKind.Local: 1178case BoundKind.FieldAccess: 1291if (expression.Kind == BoundKind.Sequence) 1299if (expression.Kind == BoundKind.SequencePointExpression) 1308case BoundKind.Local: 1317case BoundKind.Parameter:
CodeGen\Optimizer.cs (35)
450Debug.Assert(expr.Kind != BoundKind.Label); 761if (value != null && value.Kind == BoundKind.Local && ((BoundLocal)value).LocalSymbol == local) 769if (lastSideeffect.Kind == BoundKind.AssignmentOperator) 773assignment.Right.Kind == BoundKind.Sequence) 949bool mayPushReceiver = (right.Kind == BoundKind.ObjectCreationExpression && 995assignmentLocal.Type.IsPointerOrFunctionPointer() && right.Kind == BoundKind.Conversion && 1006right.Kind == BoundKind.PointerIndirectionOperator) 1040(lhs.Kind is BoundKind.Local or BoundKind.Parameter or BoundKind.FieldAccess && lhs.GetRefKind() != RefKind.None), 1045case BoundKind.ThisReference: 1049case BoundKind.Parameter: 1057case BoundKind.Local: 1065case BoundKind.Call: 1069case BoundKind.FunctionPointerInvocation: 1073case BoundKind.ConditionalOperator: 1077case BoundKind.AssignmentOperator: 1081case BoundKind.Sequence: 1086case BoundKind.RefValueOperator: 1087case BoundKind.PointerIndirectionOperator: 1088case BoundKind.PseudoVariable: 1091case BoundKind.ModuleVersionId: 1092case BoundKind.InstrumentationPayloadRoot: 1094goto case BoundKind.FieldAccess; 1096case BoundKind.FieldAccess: 1097case BoundKind.ArrayAccess: 1109if (lhs.Kind == BoundKind.FieldAccess) 1434if (boundExpression.Kind == BoundKind.Local) 1486if (child.Kind != BoundKind.BinaryOperator || child.ConstantValueOpt != null) 1502if (child.Kind != BoundKind.BinaryOperator || child.ConstantValueOpt != null) 1708if (exceptionSourceOpt.Kind == BoundKind.Local) 1947top.Item1.Kind == BoundKind.Local && 2082if (child.Kind != BoundKind.BinaryOperator || child.ConstantValueOpt != null) 2098if (child.Kind != BoundKind.BinaryOperator || child.ConstantValueOpt != null) 2311if (exceptionSource.Kind == BoundKind.Local)
Compilation\CSharpSemanticModel.cs (56)
2083var highestBoundExprKind = highestBoundExpr?.Kind ?? BoundKind.NoOpStatement; 2088if (highestBoundExprKind == BoundKind.Lambda) // the enclosing conversion is explicit 2104if (tupleLiteralConversion.Operand.Kind == BoundKind.ConvertedTupleLiteral) 2118else if (highestBoundExprKind == BoundKind.FixedLocalCollectionInitializer) 2189if (highestBoundExprKind != BoundKind.Conversion) 2193else if (((BoundConversion)highestBoundExpr).Operand.Kind != BoundKind.Conversion) 2211else if (boundNodeForSyntacticParent?.Kind == BoundKind.DelegateCreationExpression) 2218case BoundKind.MethodGroup: 2223case BoundKind.Lambda: 2229case BoundKind.UnboundLambda: 2298if (boundExpr != null && boundExpr.Kind != BoundKind.TypeExpression) 3355case BoundKind.MethodGroup: 3359case BoundKind.PropertyGroup: 3364case BoundKind.BadExpression: 3387case BoundKind.DelegateCreationExpression: 3390case BoundKind.TypeExpression: 3398boundNodeForSyntacticParent.Kind == BoundKind.BadExpression && 3420case 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: 3987case BoundKind.Attribute: 4001case BoundKind.BadExpression: 4266case BoundKind.Call: 4287case BoundKind.DelegateCreationExpression: 4297case BoundKind.Conversion: 4329case BoundKind.DynamicInvocation: 4335case BoundKind.BadExpression: 4346case BoundKind.NameOfOperator: 4415case BoundKind.IndexerAccess: 4436case BoundKind.BadExpression:
Compilation\MemberSemanticModel.cs (12)
1239Debug.Assert(highestBoundNode.Kind != BoundKind.UnboundLambda); 1783case BoundKind.UnboundLambda: 1785goto case BoundKind.Lambda; 1786case BoundKind.Lambda: 1790case BoundKind.QueryClause: 1812case BoundKind.QueryClause: 1816case BoundKind.Call: 1828while (receiver?.Kind == BoundKind.MethodGroup) 1845case BoundKind.Conversion: 1848case BoundKind.UnboundLambda: 1852case BoundKind.Lambda: 1895if (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)
623(init.Kind == BoundKind.FieldEqualsValue) && !((BoundFieldEqualsValue)init).Field.IsMetadataConstant)); 1342if (processedInitializers.LoweredInitializers.Kind == BoundKind.StatementList) 2000case BoundKind.ConstructorMethodBody: 2030case BoundKind.NonConstructorMethodBody: 2036case BoundKind.Block:
FlowAnalysis\AbstractFlowPass.cs (25)
555case BoundKind.Parameter: 559case BoundKind.Local: 563case BoundKind.ThisReference: 564case BoundKind.BaseReference: 567case BoundKind.PropertyAccess: 584case BoundKind.FieldAccess: 591case BoundKind.EventAccess: 598case BoundKind.TupleLiteral: 599case BoundKind.ConvertedTupleLiteral: 603case BoundKind.InlineArrayAccess: 848case BoundKind.LabeledStatement: 854case BoundKind.LabelStatement: 860case BoundKind.SwitchSection: 1869if (pend.Branch.Kind != BoundKind.YieldReturnStatement) 2130if (expr.Kind != BoundKind.PropertyAccess) 2163var refKind = node.Left.Kind == BoundKind.BadExpression 2244receiverOpt.Kind != BoundKind.TypeExpression && 2425var childKind = child.Kind; 2427if (childKind == BoundKind.BinaryOperator) 2440else if (childKind == BoundKind.UserDefinedConditionalLogicalOperator) 2467case BoundKind.BinaryOperator: 2471case BoundKind.UserDefinedConditionalLogicalOperator: 2487case BoundKind.BinaryOperator: 2492case BoundKind.UserDefinedConditionalLogicalOperator: 2504Debug.Assert(!isBool || binary.Kind != BoundKind.UserDefinedConditionalLogicalOperator);
FlowAnalysis\ControlFlowPass.cs (12)
215case BoundKind.GotoStatement: 222case BoundKind.BreakStatement: 223case BoundKind.ContinueStatement: 230case BoundKind.ReturnStatement: 243case BoundKind.NoOpStatement: 244case BoundKind.Block: 245case BoundKind.ThrowStatement: 246case BoundKind.LabeledStatement: 247case BoundKind.LocalFunctionStatement: 250case 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 (81)
242if (node.Kind == BoundKind.Attribute) 737Debug.Assert(fieldOrEventAccess.Kind == BoundKind.FieldAccess || fieldOrEventAccess.Kind == BoundKind.EventAccess); 743case BoundKind.FieldAccess: 759case BoundKind.EventAccess: 776case BoundKind.ThisReference: 780case BoundKind.Local: 784case BoundKind.Parameter: 788case BoundKind.InlineArrayAccess: 873if (value is { ConstantValueOpt: not null, Kind: not BoundKind.InterpolatedString }) return false; 877case BoundKind.Conversion: 891case BoundKind.DefaultLiteral: 892case BoundKind.DefaultExpression: 894case BoundKind.ObjectCreationExpression: 897case BoundKind.TupleLiteral: 898case BoundKind.ConvertedTupleLiteral: 899case BoundKind.Utf8String: 915case BoundKind.FieldAccess: 930if (n.Kind == BoundKind.Local) 942case BoundKind.EventAccess: 963case BoundKind.ThisReference: 967case BoundKind.Local: 971case BoundKind.Parameter: 975case BoundKind.RangeVariable: 979case BoundKind.InlineArrayAccess: 1024case BoundKind.FieldAccess: 1040case BoundKind.EventAccess: 1052case BoundKind.PropertyAccess: 1076receiver.Kind != BoundKind.TypeExpression && 1093receiverOpt.Kind != BoundKind.TypeExpression && 1336case BoundKind.ThisReference: 1349case BoundKind.Local: 1355case BoundKind.FieldAccess: 1367case BoundKind.EventAccess: 1379case BoundKind.InlineArrayAccess: 1385case BoundKind.PropertyAccess: 1407case BoundKind.Parameter: 1414case BoundKind.RangeVariable: 1439case BoundKind.FieldAccess: 1448case BoundKind.Local: 1452case BoundKind.RangeVariable: 1454case BoundKind.Parameter: 1456case BoundKind.ThisReference: 1458case BoundKind.BaseReference: 1491case BoundKind.ListPattern: 1492case BoundKind.RecursivePattern: 1493case BoundKind.DeclarationPattern: 1509case BoundKind.LocalDeclaration: 1520case BoundKind.Local: 1538case BoundKind.InlineArrayAccess: 1568case BoundKind.Parameter: 1585case BoundKind.ObjectInitializerMember: 1597case BoundKind.ThisReference: 1598case BoundKind.FieldAccess: 1599case BoundKind.EventAccess: 1600case BoundKind.PropertyAccess: 1609case BoundKind.RangeVariable: 1613case BoundKind.BadExpression: 1624case BoundKind.TupleLiteral: 1625case BoundKind.ConvertedTupleLiteral: 1957case BoundKind.DeclarationPattern: 1964case BoundKind.DiscardPattern: 1965case BoundKind.TypePattern: 1967case BoundKind.SlicePattern: 1976case BoundKind.ConstantPattern: 1982case BoundKind.RecursivePattern: 2016case BoundKind.ITuplePattern: 2025case BoundKind.ListPattern: 2036case BoundKind.RelationalPattern: 2042case BoundKind.NegatedPattern: 2048case BoundKind.BinaryPattern: 2157if (stmt.Kind != BoundKind.LocalFunctionStatement) 2405if (pending.Branch.Kind == BoundKind.ReturnStatement) 2479if (initializer.Kind == BoundKind.AddressOfOperator) 2552case BoundKind.Local: 2555case BoundKind.Parameter: 2558case BoundKind.FieldAccess: 2566case BoundKind.EventAccess: 2574case BoundKind.ThisReference: 2575case BoundKind.BaseReference: 2579case 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).EnumeratorInfoOpt is { MoveNextAwaitableInfo: not 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 (72)
294private static readonly ImmutableArray<BoundKind> s_skippedExpressions = ImmutableArray.Create(BoundKind.ArrayInitialization, 295BoundKind.ObjectInitializerExpression, 296BoundKind.CollectionInitializerExpression, 297BoundKind.DynamicCollectionElementInitializer); 392|| expr.Kind == BoundKind.ExpressionWithNullability 462private bool IsAnalyzingAttribute => methodMainNode.Kind == BoundKind.Attribute; 573Debug.Assert(expression != null || placeholder.Kind == BoundKind.InterpolatedStringArgumentPlaceholder); 594case BoundKind.DeconstructValuePlaceholder: 595case BoundKind.InterpolatedStringHandlerPlaceholder: 596case BoundKind.InterpolatedStringArgumentPlaceholder: 597case BoundKind.ObjectOrCollectionValuePlaceholder: 598case BoundKind.AwaitableValuePlaceholder: 601case BoundKind.ImplicitIndexerValuePlaceholder: 2068case BoundKind.FieldAccess: 2084case BoundKind.EventAccess: 2097case BoundKind.PropertyAccess: 2115receiver.Kind != BoundKind.TypeExpression && 2143case BoundKind.ThisReference: 2144case BoundKind.BaseReference: 2150case BoundKind.Conversion: 2193case BoundKind.DefaultLiteral: 2194case BoundKind.DefaultExpression: 2195case BoundKind.ObjectCreationExpression: 2196case BoundKind.DynamicObjectCreationExpression: 2197case BoundKind.AnonymousObjectCreationExpression: 2198case BoundKind.NewT: 2199case BoundKind.TupleLiteral: 2200case BoundKind.ConvertedTupleLiteral: 2202case BoundKind.ConditionalAccess: 2204case BoundKind.ConditionalReceiver: 2612case BoundKind.Conversion: 2619case BoundKind.DefaultLiteral: 2620case BoundKind.DefaultExpression: 3137if (!expr.IsSuppressed && RemoveConversion(expr, includeExplicitConversions: false).expression.Kind != BoundKind.ThrowExpression) 4197Debug.Assert(node.Kind is BoundKind.ObjectCreationExpression or BoundKind.DynamicObjectCreationExpression or BoundKind.NewT or BoundKind.NoPiaObjectCreationExpression); 4290case BoundKind.AssignmentOperator: 4305case BoundKind.CollectionElementInitializer: 4335case BoundKind.ObjectInitializerMember: 5067if (child.Kind == BoundKind.ArrayInitialization) 5690case BoundKind.Conversion: 5694case BoundKind.AsOperator: 5697case BoundKind.ConditionalAccess: 5884while (possiblyConversion.Kind == BoundKind.Conversion) 7863return (argument.Kind == BoundKind.Lambda); 8514/// other than <see cref="BoundKind.ExpressionWithNullability"/> which is an expression 8521case BoundKind.DefaultLiteral: 8522case BoundKind.DefaultExpression: 8523case BoundKind.Literal: 8525case BoundKind.ExpressionWithNullability: 8527case BoundKind.MethodGroup: 8528case BoundKind.UnboundLambda: 8529case BoundKind.UnconvertedObjectCreationExpression: 8530case BoundKind.ConvertedTupleLiteral: 8531case BoundKind.UnconvertedCollectionExpression: 8571if (argument.Kind == BoundKind.Lambda) 8580if (argument.Kind == BoundKind.CollectionExpression) 8705if (expr.Kind != BoundKind.Conversion) 8790case BoundKind.InterpolatedString: 9629if (operandType.Type?.IsTupleType == true || conversionOperand.Kind == BoundKind.TupleLiteral) 10639if (left.Kind == BoundKind.EventAccess && ((BoundEventAccess)left).EventSymbol.IsWindowsRuntimeEvent) 11057case BoundKind.TupleLiteral: 11058case BoundKind.ConvertedTupleLiteral: 11075case BoundKind.TupleLiteral: 11076case BoundKind.ConvertedTupleLiteral: 11078case BoundKind.Conversion: 11426if (initializer.Kind == BoundKind.AddressOfOperator) 11432if (node.Expression.Kind == BoundKind.AddressOfOperator) 11712if (node.Expression.Kind != BoundKind.Conversion)
FlowAnalysis\NullableWalker.SnapshotManager.cs (1)
106if (node.Kind == BoundKind.TypeExpression || node.WasCompilerGenerated)
FlowAnalysis\ReadWriteWalker.cs (14)
147if (!IsInside && node.Span.Contains(RegionSpan) && (expr.Kind == BoundKind.FieldAccess)) 190case BoundKind.Local: 196case BoundKind.ThisReference: 202case BoundKind.BaseReference: 208case BoundKind.Parameter: 214case BoundKind.RangeVariable: 220case BoundKind.FieldAccess: 226case BoundKind.InlineArrayAccess: 240case BoundKind.RangeVariable: 244case BoundKind.QueryClause: 255case BoundKind.FieldAccess: 265case BoundKind.InlineArrayAccess: 306case BoundKind.Parameter: 308case BoundKind.PropertyAccess:
FlowAnalysis\RegionAnalysisContext.cs (2)
51case BoundKind.NamespaceExpression: 52case BoundKind.TypeExpression:
Generated\BoundNodes.xml.Generated.cs (597)
259protected BoundInitializer(BoundKind kind, SyntaxNode syntax, bool hasErrors) 264protected BoundInitializer(BoundKind kind, SyntaxNode syntax) 273protected BoundEqualsValue(BoundKind kind, SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, BoundExpression value, bool hasErrors = false) 291: base(BoundKind.FieldEqualsValue, syntax, locals, value, hasErrors || value.HasErrors()) 321: base(BoundKind.PropertyEqualsValue, syntax, locals, value, hasErrors || value.HasErrors()) 351: base(BoundKind.ParameterEqualsValue, syntax, locals, value, hasErrors || value.HasErrors()) 381: base(BoundKind.GlobalStatementInitializer, syntax, hasErrors || statement.HasErrors()) 408protected BoundExpression(BoundKind kind, SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 414protected BoundExpression(BoundKind kind, SyntaxNode syntax, TypeSymbol? type) 425protected BoundValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 430protected BoundValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type) 439protected BoundEarlyValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 444protected BoundEarlyValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type) 454: base(BoundKind.ValuePlaceholder, syntax, type, hasErrors) 459: base(BoundKind.ValuePlaceholder, syntax, type) 482: base(BoundKind.CapturedReceiverPlaceholder, syntax, type, hasErrors || receiver.HasErrors()) 510: base(BoundKind.DeconstructValuePlaceholder, syntax, type, hasErrors) 520: base(BoundKind.DeconstructValuePlaceholder, syntax, type) 551: base(BoundKind.TupleOperandPlaceholder, syntax, type, hasErrors) 559: base(BoundKind.TupleOperandPlaceholder, syntax, type) 586: base(BoundKind.AwaitableValuePlaceholder, syntax, type, hasErrors) 591: base(BoundKind.AwaitableValuePlaceholder, syntax, type) 615: base(BoundKind.DisposableValuePlaceholder, syntax, type, hasErrors) 623: base(BoundKind.DisposableValuePlaceholder, syntax, type) 650: base(BoundKind.ObjectOrCollectionValuePlaceholder, syntax, type, hasErrors) 659: base(BoundKind.ObjectOrCollectionValuePlaceholder, syntax, type) 688: base(BoundKind.ImplicitIndexerValuePlaceholder, syntax, type, hasErrors) 696: base(BoundKind.ImplicitIndexerValuePlaceholder, syntax, type) 723: base(BoundKind.ImplicitIndexerReceiverPlaceholder, syntax, type, hasErrors) 732: base(BoundKind.ImplicitIndexerReceiverPlaceholder, syntax, type) 761: base(BoundKind.ListPatternReceiverPlaceholder, syntax, type, hasErrors) 769: base(BoundKind.ListPatternReceiverPlaceholder, syntax, type) 796: base(BoundKind.ListPatternIndexPlaceholder, syntax, type, hasErrors) 804: base(BoundKind.ListPatternIndexPlaceholder, syntax, type) 831: base(BoundKind.SlicePatternReceiverPlaceholder, syntax, type, hasErrors) 839: base(BoundKind.SlicePatternReceiverPlaceholder, syntax, type) 866: base(BoundKind.SlicePatternRangePlaceholder, syntax, type, hasErrors) 874: base(BoundKind.SlicePatternRangePlaceholder, syntax, type) 901: base(BoundKind.Dup, syntax, type, hasErrors) 907: base(BoundKind.Dup, syntax, type) 932: base(BoundKind.PassByCopy, syntax, type, hasErrors || expression.HasErrors()) 960: base(BoundKind.BadExpression, syntax, type, hasErrors || childBoundNodes.HasErrors()) 997: base(BoundKind.BadStatement, syntax, hasErrors || childBoundNodes.HasErrors()) 1025: base(BoundKind.ExtractedFinallyBlock, syntax, hasErrors || finallyBlock.HasErrors()) 1053: base(BoundKind.TypeExpression, syntax, type, hasErrors || boundContainingTypeOpt.HasErrors() || boundDimensionsOpt.HasErrors()) 1088: base(BoundKind.TypeOrValueExpression, syntax, type, hasErrors) 1104: base(BoundKind.TypeOrValueExpression, syntax, type) 1137: base(BoundKind.NamespaceExpression, syntax, null, hasErrors) 1147: base(BoundKind.NamespaceExpression, syntax, null) 1178: base(BoundKind.UnaryOperator, syntax, type, hasErrors || operand.HasErrors()) 1220: base(BoundKind.IncrementOperator, syntax, type, hasErrors || operand.HasErrors() || operandPlaceholder.HasErrors() || operandConversion.HasErrors() || resultPlaceholder.HasErrors() || resultConversion.HasErrors()) 1268: base(BoundKind.AddressOfOperator, syntax, type, hasErrors || operand.HasErrors()) 1300: base(BoundKind.UnconvertedAddressOfOperator, syntax, null, hasErrors || operand.HasErrors()) 1329: base(BoundKind.FunctionPointerLoad, syntax, type, hasErrors) 1340: base(BoundKind.FunctionPointerLoad, syntax, type) 1372: base(BoundKind.PointerIndirectionOperator, syntax, type, hasErrors || operand.HasErrors()) 1404: base(BoundKind.PointerElementAccess, syntax, type, hasErrors || expression.HasErrors() || index.HasErrors()) 1441: base(BoundKind.FunctionPointerInvocation, syntax, type, hasErrors || invokedExpression.HasErrors() || arguments.HasErrors()) 1478: base(BoundKind.RefTypeOperator, syntax, type, hasErrors || operand.HasErrors()) 1510: base(BoundKind.MakeRefOperator, syntax, type, hasErrors || operand.HasErrors()) 1540: base(BoundKind.RefValueOperator, syntax, type, hasErrors || operand.HasErrors()) 1572: base(BoundKind.FromEndIndexExpression, syntax, type, hasErrors || operand.HasErrors()) 1604: base(BoundKind.RangeExpression, syntax, type, hasErrors || leftOperandOpt.HasErrors() || rightOperandOpt.HasErrors()) 1636protected BoundBinaryOperatorBase(BoundKind kind, SyntaxNode syntax, BoundExpression left, BoundExpression right, TypeSymbol type, bool hasErrors = false) 1656: base(BoundKind.BinaryOperator, syntax, left, right, type, hasErrors || left.HasErrors() || right.HasErrors()) 1694: base(BoundKind.TupleBinaryOperator, syntax, type, hasErrors || left.HasErrors() || right.HasErrors()) 1732: base(BoundKind.UserDefinedConditionalLogicalOperator, syntax, left, right, type, hasErrors || trueFalseOperandPlaceholder.HasErrors() || trueFalseOperandConversion.HasErrors() || left.HasErrors() || right.HasErrors()) 1785: base(BoundKind.CompoundAssignmentOperator, syntax, type, hasErrors || left.HasErrors() || right.HasErrors() || leftPlaceholder.HasErrors() || leftConversion.HasErrors() || finalPlaceholder.HasErrors() || finalConversion.HasErrors()) 1832: base(BoundKind.AssignmentOperator, syntax, type, hasErrors || left.HasErrors() || right.HasErrors()) 1866: base(BoundKind.DeconstructionAssignmentOperator, syntax, type, hasErrors || left.HasErrors() || right.HasErrors()) 1901: base(BoundKind.NullCoalescingOperator, syntax, type, hasErrors || leftOperand.HasErrors() || rightOperand.HasErrors() || leftPlaceholder.HasErrors() || leftConversion.HasErrors()) 1942: base(BoundKind.NullCoalescingAssignmentOperator, syntax, type, hasErrors || leftOperand.HasErrors() || rightOperand.HasErrors()) 1973: base(BoundKind.UnconvertedConditionalOperator, syntax, null, hasErrors || condition.HasErrors() || consequence.HasErrors() || alternative.HasErrors()) 2012: base(BoundKind.ConditionalOperator, syntax, type, hasErrors || condition.HasErrors() || consequence.HasErrors() || alternative.HasErrors()) 2056: base(BoundKind.ArrayAccess, syntax, type, hasErrors || expression.HasErrors() || indices.HasErrors()) 2089: base(BoundKind.RefArrayAccess, syntax, null, hasErrors || arrayAccess.HasErrors()) 2118: base(BoundKind.ArrayLength, syntax, type, hasErrors || expression.HasErrors()) 2148: base(BoundKind.AwaitableInfo, syntax, hasErrors || awaitableInstancePlaceholder.HasErrors() || getAwaiter.HasErrors() || runtimeAsyncAwaitCall.HasErrors() || runtimeAsyncAwaitCallPlaceholder.HasErrors()) 2189: base(BoundKind.AwaitExpression, syntax, type, hasErrors || expression.HasErrors() || awaitableInfo.HasErrors()) 2223protected BoundTypeOf(BoundKind kind, SyntaxNode syntax, MethodSymbol? getTypeFromHandle, TypeSymbol type, bool hasErrors) 2232protected BoundTypeOf(BoundKind kind, SyntaxNode syntax, MethodSymbol? getTypeFromHandle, TypeSymbol type) 2248: base(BoundKind.TypeOfOperator, syntax, getTypeFromHandle, type, hasErrors || sourceType.HasErrors()) 2277: base(BoundKind.BlockInstrumentation, syntax, hasErrors || prologue.HasErrors() || epilogue.HasErrors()) 2309: base(BoundKind.MethodDefIndex, syntax, type, hasErrors) 2323: base(BoundKind.MethodDefIndex, syntax, type) 2353: base(BoundKind.LocalId, syntax, type, hasErrors) 2364: base(BoundKind.LocalId, syntax, type) 2396: base(BoundKind.ParameterId, syntax, type, hasErrors) 2407: base(BoundKind.ParameterId, syntax, type) 2439: base(BoundKind.StateMachineInstanceId, syntax, type, hasErrors) 2447: base(BoundKind.StateMachineInstanceId, syntax, type) 2474: base(BoundKind.MaximumMethodDefIndex, syntax, type, hasErrors) 2482: base(BoundKind.MaximumMethodDefIndex, syntax, type) 2509: base(BoundKind.InstrumentationPayloadRoot, syntax, type, hasErrors) 2518: base(BoundKind.InstrumentationPayloadRoot, syntax, type) 2547: base(BoundKind.ThrowIfModuleCancellationRequested, syntax, type, hasErrors) 2555: base(BoundKind.ThrowIfModuleCancellationRequested, syntax, type) 2582: base(BoundKind.ModuleCancellationTokenExpression, syntax, type, hasErrors) 2590: base(BoundKind.ModuleCancellationTokenExpression, syntax, type) 2617: base(BoundKind.ModuleVersionId, syntax, type, hasErrors) 2625: base(BoundKind.ModuleVersionId, syntax, type) 2652: base(BoundKind.ModuleVersionIdString, syntax, type, hasErrors) 2660: base(BoundKind.ModuleVersionIdString, syntax, type) 2687: base(BoundKind.SourceDocumentIndex, syntax, type, hasErrors) 2697: base(BoundKind.SourceDocumentIndex, syntax, type) 2727: base(BoundKind.MethodInfo, syntax, type, hasErrors) 2738: base(BoundKind.MethodInfo, syntax, type) 2770: base(BoundKind.FieldInfo, syntax, type, hasErrors) 2781: base(BoundKind.FieldInfo, syntax, type) 2813: base(BoundKind.DefaultLiteral, syntax, null, hasErrors) 2818: base(BoundKind.DefaultLiteral, syntax, null) 2836: base(BoundKind.DefaultExpression, syntax, type, hasErrors || targetType.HasErrors()) 2867: base(BoundKind.IsOperator, syntax, type, hasErrors || operand.HasErrors() || targetType.HasErrors()) 2902: base(BoundKind.AsOperator, syntax, type, hasErrors || operand.HasErrors() || targetType.HasErrors() || operandPlaceholder.HasErrors() || operandConversion.HasErrors()) 2939: base(BoundKind.SizeOfOperator, syntax, type, hasErrors || sourceType.HasErrors()) 2971: base(BoundKind.Conversion, syntax, type, hasErrors || operand.HasErrors()) 3019: base(BoundKind.ReadOnlySpanFromArray, syntax, type, hasErrors || operand.HasErrors()) 3052: base(BoundKind.ArgList, syntax, type, hasErrors) 3060: base(BoundKind.ArgList, syntax, type) 3087: base(BoundKind.ArgListOperator, syntax, type, hasErrors || arguments.HasErrors()) 3118: base(BoundKind.FixedLocalCollectionInitializer, syntax, type, hasErrors || elementPointerPlaceholder.HasErrors() || elementPointerConversion.HasErrors() || expression.HasErrors()) 3156protected BoundStatement(BoundKind kind, SyntaxNode syntax, bool hasErrors) 3161protected BoundStatement(BoundKind kind, SyntaxNode syntax) 3171: base(BoundKind.SequencePoint, syntax, hasErrors || statementOpt.HasErrors()) 3196: base(BoundKind.SequencePointWithSpan, syntax, hasErrors || statementOpt.HasErrors()) 3223: base(BoundKind.SavePreviousSequencePoint, syntax, hasErrors) 3232: base(BoundKind.SavePreviousSequencePoint, syntax) 3260: base(BoundKind.RestorePreviousSequencePoint, syntax, hasErrors) 3269: base(BoundKind.RestorePreviousSequencePoint, syntax) 3297: base(BoundKind.StepThroughSequencePoint, syntax, hasErrors) 3303: base(BoundKind.StepThroughSequencePoint, syntax) 3328: base(BoundKind.Block, syntax, statements, hasErrors || instrumentation.HasErrors() || statements.HasErrors()) 3364: base(BoundKind.Scope, syntax, statements, hasErrors || statements.HasErrors()) 3393: base(BoundKind.StateMachineScope, syntax, hasErrors || statement.HasErrors()) 3424: base(BoundKind.LocalDeclaration, syntax, hasErrors || declaredTypeOpt.HasErrors() || initializerOpt.HasErrors() || argumentsOpt.HasErrors()) 3459protected BoundMultipleLocalDeclarationsBase(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundLocalDeclaration> localDeclarations, bool hasErrors = false) 3474: base(BoundKind.MultipleLocalDeclarations, syntax, localDeclarations, hasErrors || localDeclarations.HasErrors()) 3500: base(BoundKind.UsingLocalDeclarations, syntax, localDeclarations, hasErrors || awaitOpt.HasErrors() || localDeclarations.HasErrors()) 3530: base(BoundKind.LocalFunctionStatement, syntax, hasErrors || blockBody.HasErrors() || expressionBody.HasErrors()) 3562: base(BoundKind.NoOpStatement, syntax, hasErrors) 3568: base(BoundKind.NoOpStatement, syntax) 3593: base(BoundKind.ReturnStatement, syntax, hasErrors || expressionOpt.HasErrors()) 3626: base(BoundKind.YieldReturnStatement, syntax, hasErrors || expression.HasErrors()) 3654: base(BoundKind.YieldBreakStatement, syntax, hasErrors) 3659: base(BoundKind.YieldBreakStatement, syntax) 3671: base(BoundKind.ThrowStatement, syntax, hasErrors || expressionOpt.HasErrors()) 3696: base(BoundKind.ExpressionStatement, syntax, hasErrors || expression.HasErrors()) 3724: base(BoundKind.BreakStatement, syntax, hasErrors) 3733: base(BoundKind.BreakStatement, syntax) 3761: base(BoundKind.ContinueStatement, syntax, hasErrors) 3770: base(BoundKind.ContinueStatement, syntax) 3798: base(BoundKind.SwitchStatement, syntax, hasErrors || expression.HasErrors() || switchSections.HasErrors() || reachabilityDecisionDag.HasErrors() || defaultLabel.HasErrors()) 3843: base(BoundKind.SwitchDispatch, syntax, hasErrors || expression.HasErrors()) 3879: base(BoundKind.IfStatement, syntax, hasErrors || condition.HasErrors() || consequence.HasErrors() || alternativeOpt.HasErrors()) 3911protected BoundLoopStatement(BoundKind kind, SyntaxNode syntax, LabelSymbol breakLabel, LabelSymbol continueLabel, bool hasErrors) 3922protected BoundLoopStatement(BoundKind kind, SyntaxNode syntax, LabelSymbol breakLabel, LabelSymbol continueLabel) 3939protected BoundConditionalLoopStatement(BoundKind kind, SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, BoundExpression condition, BoundStatement body, LabelSymbol breakLabel, LabelSymbol continueLabel, bool hasErrors = false) 3962: base(BoundKind.DoStatement, syntax, locals, condition, body, breakLabel, continueLabel, hasErrors || condition.HasErrors() || body.HasErrors()) 3992: base(BoundKind.WhileStatement, syntax, locals, condition, body, breakLabel, continueLabel, hasErrors || condition.HasErrors() || body.HasErrors()) 4022: base(BoundKind.ForStatement, syntax, breakLabel, continueLabel, hasErrors || initializer.HasErrors() || condition.HasErrors() || increment.HasErrors() || body.HasErrors()) 4064: base(BoundKind.ForEachStatement, syntax, breakLabel, continueLabel, hasErrors || elementPlaceholder.HasErrors() || elementConversion.HasErrors() || iterationVariableType.HasErrors() || iterationErrorExpressionOpt.HasErrors() || expression.HasErrors() || deconstructionOpt.HasErrors() || body.HasErrors()) 4113: base(BoundKind.ForEachDeconstructStep, syntax, hasErrors || deconstructionAssignment.HasErrors() || targetPlaceholder.HasErrors()) 4144: base(BoundKind.UsingStatement, syntax, hasErrors || declarationsOpt.HasErrors() || expressionOpt.HasErrors() || body.HasErrors() || awaitOpt.HasErrors()) 4183: base(BoundKind.FixedStatement, syntax, hasErrors || declarations.HasErrors() || body.HasErrors()) 4217: base(BoundKind.LockStatement, syntax, hasErrors || argument.HasErrors() || body.HasErrors()) 4248: base(BoundKind.TryStatement, syntax, hasErrors || tryBlock.HasErrors() || catchBlocks.HasErrors() || finallyBlockOpt.HasErrors()) 4285: base(BoundKind.CatchBlock, syntax, hasErrors || exceptionSourceOpt.HasErrors() || exceptionFilterPrologueOpt.HasErrors() || exceptionFilterOpt.HasErrors() || body.HasErrors()) 4326: base(BoundKind.Literal, syntax, type, hasErrors) 4332: base(BoundKind.Literal, syntax, type) 4357: base(BoundKind.Utf8String, syntax, type, hasErrors) 4367: base(BoundKind.Utf8String, syntax, type) 4397: base(BoundKind.ThisReference, syntax, type, hasErrors) 4405: base(BoundKind.ThisReference, syntax, type) 4432: base(BoundKind.PreviousSubmissionReference, syntax, type, hasErrors) 4440: base(BoundKind.PreviousSubmissionReference, syntax, type) 4467: base(BoundKind.HostObjectMemberReference, syntax, type, hasErrors) 4475: base(BoundKind.HostObjectMemberReference, syntax, type) 4502: base(BoundKind.BaseReference, syntax, type, hasErrors) 4507: base(BoundKind.BaseReference, syntax, type) 4531: base(BoundKind.Local, syntax, type, hasErrors) 4544: base(BoundKind.Local, syntax, type) 4580: base(BoundKind.PseudoVariable, syntax, type, hasErrors) 4592: base(BoundKind.PseudoVariable, syntax, type) 4625: base(BoundKind.RangeVariable, syntax, type, hasErrors || value.HasErrors()) 4658: base(BoundKind.Parameter, syntax, type, hasErrors) 4668: base(BoundKind.Parameter, syntax, type) 4698: base(BoundKind.LabelStatement, syntax, hasErrors) 4707: base(BoundKind.LabelStatement, syntax) 4735: base(BoundKind.GotoStatement, syntax, hasErrors || caseExpressionOpt.HasErrors() || labelExpressionOpt.HasErrors()) 4767: base(BoundKind.LabeledStatement, syntax, hasErrors || body.HasErrors()) 4798: base(BoundKind.Label, syntax, type, hasErrors) 4807: base(BoundKind.Label, syntax, type) 4834protected BoundStatementList(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundStatement> statements, bool hasErrors = false) 4844: base(BoundKind.StatementList, syntax, hasErrors || statements.HasErrors()) 4872: base(BoundKind.ConditionalGoto, syntax, hasErrors || condition.HasErrors()) 4904protected BoundSwitchExpression(BoundKind kind, SyntaxNode syntax, BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol? type, bool hasErrors = false) 4929: base(BoundKind.SwitchExpressionArm, syntax, hasErrors || pattern.HasErrors() || whenClause.HasErrors() || value.HasErrors()) 4968: base(BoundKind.UnconvertedSwitchExpression, syntax, expression, switchArms, reachabilityDecisionDag, defaultLabel, reportedNotExhaustive, type, hasErrors || expression.HasErrors() || switchArms.HasErrors() || reachabilityDecisionDag.HasErrors()) 4996: base(BoundKind.ConvertedSwitchExpression, syntax, expression, switchArms, reachabilityDecisionDag, defaultLabel, reportedNotExhaustive, type, hasErrors || expression.HasErrors() || switchArms.HasErrors() || reachabilityDecisionDag.HasErrors()) 5030: base(BoundKind.DecisionDag, syntax, hasErrors || rootNode.HasErrors()) 5057protected BoundDecisionDagNode(BoundKind kind, SyntaxNode syntax, bool hasErrors) 5062protected BoundDecisionDagNode(BoundKind kind, SyntaxNode syntax) 5072: base(BoundKind.EvaluationDecisionDagNode, syntax, hasErrors || evaluation.HasErrors() || next.HasErrors()) 5103: base(BoundKind.TestDecisionDagNode, syntax, hasErrors || test.HasErrors() || whenTrue.HasErrors() || whenFalse.HasErrors()) 5137: base(BoundKind.WhenDecisionDagNode, syntax, hasErrors || whenExpression.HasErrors() || whenTrue.HasErrors() || whenFalse.HasErrors()) 5172: base(BoundKind.LeafDecisionDagNode, syntax, hasErrors) 5181: base(BoundKind.LeafDecisionDagNode, syntax) 5208protected BoundDagTest(BoundKind kind, SyntaxNode syntax, BoundDagTemp input, bool hasErrors = false) 5223: base(BoundKind.DagTemp, syntax, hasErrors || source.HasErrors()) 5255: base(BoundKind.DagTypeTest, syntax, input, hasErrors || input.HasErrors()) 5284: base(BoundKind.DagNonNullTest, syntax, input, hasErrors || input.HasErrors()) 5312: base(BoundKind.DagExplicitNullTest, syntax, input, hasErrors || input.HasErrors()) 5338: base(BoundKind.DagValueTest, syntax, input, hasErrors || input.HasErrors()) 5367: base(BoundKind.DagRelationalTest, syntax, input, hasErrors || input.HasErrors()) 5397protected BoundDagEvaluation(BoundKind kind, SyntaxNode syntax, BoundDagTemp input, bool hasErrors = false) 5410: base(BoundKind.DagDeconstructEvaluation, syntax, input, hasErrors || input.HasErrors()) 5439: base(BoundKind.DagTypeEvaluation, syntax, input, hasErrors || input.HasErrors()) 5468: base(BoundKind.DagFieldEvaluation, syntax, input, hasErrors || input.HasErrors()) 5497: base(BoundKind.DagPropertyEvaluation, syntax, input, hasErrors || input.HasErrors()) 5528: base(BoundKind.DagIndexEvaluation, syntax, input, hasErrors || input.HasErrors()) 5559: base(BoundKind.DagIndexerEvaluation, syntax, input, hasErrors || lengthTemp.HasErrors() || indexerAccess.HasErrors() || receiverPlaceholder.HasErrors() || argumentPlaceholder.HasErrors() || input.HasErrors()) 5606: base(BoundKind.DagSliceEvaluation, syntax, input, hasErrors || lengthTemp.HasErrors() || indexerAccess.HasErrors() || receiverPlaceholder.HasErrors() || argumentPlaceholder.HasErrors() || input.HasErrors()) 5655: base(BoundKind.DagAssignmentEvaluation, syntax, input, hasErrors || target.HasErrors() || input.HasErrors()) 5684: base(BoundKind.SwitchSection, syntax, statements, hasErrors || switchLabels.HasErrors() || statements.HasErrors()) 5716: base(BoundKind.SwitchLabel, syntax, hasErrors || pattern.HasErrors() || whenClause.HasErrors()) 5748protected BoundMethodOrPropertyGroup(BoundKind kind, SyntaxNode syntax, BoundExpression? receiverOpt, LookupResultKind resultKind, bool hasErrors = false) 5763: base(BoundKind.SequencePointExpression, syntax, type, hasErrors || expression.HasErrors()) 5791: base(BoundKind.Sequence, syntax, type, hasErrors || sideEffects.HasErrors() || value.HasErrors()) 5827: base(BoundKind.SpillSequence, syntax, type, hasErrors || sideEffects.HasErrors() || value.HasErrors()) 5863: base(BoundKind.DynamicMemberAccess, syntax, type, hasErrors || receiver.HasErrors()) 5901protected BoundDynamicInvocableBase(BoundKind kind, SyntaxNode syntax, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol? type, bool hasErrors = false) 5919: base(BoundKind.DynamicInvocation, syntax, expression, arguments, type, hasErrors || expression.HasErrors() || arguments.HasErrors()) 5955: base(BoundKind.ConditionalAccess, syntax, type, hasErrors || receiver.HasErrors() || accessExpression.HasErrors()) 5988: base(BoundKind.LoweredConditionalAccess, syntax, type, hasErrors || receiver.HasErrors() || whenNotNull.HasErrors() || whenNullOpt.HasErrors()) 6029: base(BoundKind.ConditionalReceiver, syntax, type, hasErrors) 6038: base(BoundKind.ConditionalReceiver, syntax, type) 6067: base(BoundKind.ComplexConditionalReceiver, syntax, type, hasErrors || valueTypeReceiver.HasErrors() || referenceTypeReceiver.HasErrors()) 6100: base(BoundKind.MethodGroup, syntax, receiverOpt, resultKind, hasErrors || receiverOpt.HasErrors()) 6141: base(BoundKind.PropertyGroup, syntax, receiverOpt, resultKind, hasErrors || receiverOpt.HasErrors()) 6169: base(BoundKind.Call, syntax, type, hasErrors || receiverOpt.HasErrors() || arguments.HasErrors()) 6228: base(BoundKind.EventAssignmentOperator, syntax, type, hasErrors || receiverOpt.HasErrors() || argument.HasErrors()) 6267: base(BoundKind.Attribute, syntax, type, hasErrors || constructorArguments.HasErrors() || namedArguments.HasErrors()) 6312: base(BoundKind.UnconvertedObjectCreationExpression, syntax, null, hasErrors || arguments.HasErrors()) 6349protected BoundObjectCreationExpressionBase(BoundKind kind, SyntaxNode syntax, TypeSymbol type, bool hasErrors) 6357protected BoundObjectCreationExpressionBase(BoundKind kind, SyntaxNode syntax, TypeSymbol type) 6371: base(BoundKind.ObjectCreationExpression, syntax, type, hasErrors || arguments.HasErrors() || initializerExpressionOpt.HasErrors()) 6421protected BoundCollectionExpressionBase(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundNode> elements, TypeSymbol? type, bool hasErrors = false) 6436: base(BoundKind.UnconvertedCollectionExpression, syntax, elements, null, hasErrors || elements.HasErrors()) 6463: base(BoundKind.CollectionExpression, syntax, elements, type, hasErrors || placeholder.HasErrors() || collectionCreation.HasErrors() || collectionBuilderInvocationPlaceholder.HasErrors() || collectionBuilderInvocationConversion.HasErrors() || unconvertedCollectionExpression.HasErrors() || elements.HasErrors()) 6508: base(BoundKind.CollectionExpressionSpreadExpressionPlaceholder, syntax, type, hasErrors) 6513: base(BoundKind.CollectionExpressionSpreadExpressionPlaceholder, syntax, type) 6536: base(BoundKind.CollectionExpressionSpreadElement, syntax, hasErrors || expression.HasErrors() || expressionPlaceholder.HasErrors() || conversion.HasErrors() || lengthOrCount.HasErrors() || elementPlaceholder.HasErrors() || iteratorBody.HasErrors()) 6575protected BoundTupleExpression(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type, bool hasErrors = false) 6594: base(BoundKind.TupleLiteral, syntax, arguments, argumentNamesOpt, inferredNamesOpt, type, hasErrors || arguments.HasErrors()) 6621: base(BoundKind.ConvertedTupleLiteral, syntax, arguments, argumentNamesOpt, inferredNamesOpt, type, hasErrors || sourceTuple.HasErrors() || arguments.HasErrors()) 6651: base(BoundKind.DynamicObjectCreationExpression, syntax, type, hasErrors || arguments.HasErrors() || initializerExpressionOpt.HasErrors()) 6694: base(BoundKind.NoPiaObjectCreationExpression, syntax, type, hasErrors || initializerExpressionOpt.HasErrors()) 6725protected BoundObjectInitializerExpressionBase(BoundKind kind, SyntaxNode syntax, BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type, bool hasErrors = false) 6745: base(BoundKind.ObjectInitializerExpression, syntax, placeholder, initializers, type, hasErrors || placeholder.HasErrors() || initializers.HasErrors()) 6773: base(BoundKind.ObjectInitializerMember, syntax, type, hasErrors || arguments.HasErrors()) 6822: base(BoundKind.DynamicObjectInitializerMember, syntax, type, hasErrors) 6834: base(BoundKind.DynamicObjectInitializerMember, syntax, type) 6867: base(BoundKind.CollectionInitializerExpression, syntax, placeholder, initializers, type, hasErrors || placeholder.HasErrors() || initializers.HasErrors()) 6895: base(BoundKind.CollectionElementInitializer, syntax, type, hasErrors || arguments.HasErrors() || implicitReceiverOpt.HasErrors()) 6940: base(BoundKind.DynamicCollectionElementInitializer, syntax, expression, arguments, type, hasErrors || expression.HasErrors() || arguments.HasErrors()) 6972: base(BoundKind.ImplicitReceiver, syntax, type, hasErrors) 6980: base(BoundKind.ImplicitReceiver, syntax, type) 7007: base(BoundKind.AnonymousObjectCreationExpression, syntax, type, hasErrors || arguments.HasErrors() || declarations.HasErrors()) 7043: base(BoundKind.AnonymousPropertyDeclaration, syntax, type, hasErrors) 7053: base(BoundKind.AnonymousPropertyDeclaration, syntax, type) 7083: base(BoundKind.NewT, syntax, type, hasErrors || initializerExpressionOpt.HasErrors()) 7113: base(BoundKind.DelegateCreationExpression, syntax, type, hasErrors || argument.HasErrors()) 7149: base(BoundKind.ArrayCreation, syntax, type, hasErrors || bounds.HasErrors() || initializerOpt.HasErrors()) 7181: base(BoundKind.ArrayInitialization, syntax, null, hasErrors || initializers.HasErrors()) 7211protected BoundStackAllocArrayCreationBase(BoundKind kind, SyntaxNode syntax, TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol? type, bool hasErrors = false) 7231: base(BoundKind.StackAllocArrayCreation, syntax, elementType, count, initializerOpt, type, hasErrors || count.HasErrors() || initializerOpt.HasErrors()) 7258: base(BoundKind.ConvertedStackAllocExpression, syntax, elementType, count, initializerOpt, type, hasErrors || count.HasErrors() || initializerOpt.HasErrors()) 7287: base(BoundKind.FieldAccess, syntax, type, hasErrors || receiverOpt.HasErrors()) 7327: base(BoundKind.HoistedFieldAccess, syntax, type, hasErrors) 7337: base(BoundKind.HoistedFieldAccess, syntax, type) 7367: base(BoundKind.PropertyAccess, syntax, type, hasErrors || receiverOpt.HasErrors()) 7405: base(BoundKind.EventAccess, syntax, type, hasErrors || receiverOpt.HasErrors()) 7441: base(BoundKind.IndexerAccess, syntax, type, hasErrors || receiverOpt.HasErrors() || arguments.HasErrors()) 7492: base(BoundKind.ImplicitIndexerAccess, syntax, type, hasErrors || receiver.HasErrors() || argument.HasErrors() || lengthOrCountAccess.HasErrors() || receiverPlaceholder.HasErrors() || indexerOrSliceAccess.HasErrors() || argumentPlaceholders.HasErrors()) 7541: base(BoundKind.InlineArrayAccess, syntax, type, hasErrors || expression.HasErrors() || argument.HasErrors()) 7582: base(BoundKind.DynamicIndexerAccess, syntax, type, hasErrors || receiver.HasErrors() || arguments.HasErrors()) 7622: base(BoundKind.Lambda, syntax, type, hasErrors || unboundLambda.HasErrors() || body.HasErrors()) 7662: base(BoundKind.UnboundLambda, syntax, null, hasErrors) 7673: base(BoundKind.UnboundLambda, syntax, null) 7706: base(BoundKind.QueryClause, syntax, type, hasErrors || value.HasErrors() || operation.HasErrors() || cast.HasErrors() || unoptimizedForm.HasErrors()) 7747: base(BoundKind.TypeOrInstanceInitializers, syntax, statements, hasErrors || statements.HasErrors()) 7773: base(BoundKind.NameOfOperator, syntax, type, hasErrors || argument.HasErrors()) 7809protected BoundInterpolatedStringBase(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type, bool hasErrors = false) 7826: base(BoundKind.UnconvertedInterpolatedString, syntax, parts, constantValueOpt, type, hasErrors || parts.HasErrors()) 7852: base(BoundKind.InterpolatedString, syntax, parts, constantValueOpt, type, hasErrors || parts.HasErrors()) 7880: base(BoundKind.InterpolatedStringHandlerPlaceholder, syntax, type, hasErrors) 7885: base(BoundKind.InterpolatedStringHandlerPlaceholder, syntax, type) 7908: base(BoundKind.InterpolatedStringArgumentPlaceholder, syntax, type, hasErrors) 7917: base(BoundKind.InterpolatedStringArgumentPlaceholder, syntax, type) 7946: base(BoundKind.StringInsert, syntax, null, hasErrors || value.HasErrors() || alignment.HasErrors() || format.HasErrors()) 7981: base(BoundKind.IsPatternExpression, syntax, type, hasErrors || expression.HasErrors() || pattern.HasErrors() || reachabilityDecisionDag.HasErrors()) 8022protected BoundPattern(BoundKind kind, SyntaxNode syntax, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors) 8033protected BoundPattern(BoundKind kind, SyntaxNode syntax, TypeSymbol inputType, TypeSymbol narrowedType) 8051: base(BoundKind.ConstantPattern, syntax, inputType, narrowedType, hasErrors || value.HasErrors()) 8088: base(BoundKind.DiscardPattern, syntax, inputType, narrowedType, hasErrors) 8101: base(BoundKind.DiscardPattern, syntax, inputType, narrowedType) 8127protected BoundObjectPattern(BoundKind kind, SyntaxNode syntax, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8145: base(BoundKind.DeclarationPattern, syntax, variable, variableAccess, inputType, narrowedType, hasErrors || declaredType.HasErrors() || variableAccess.HasErrors()) 8181: base(BoundKind.RecursivePattern, syntax, variable, variableAccess, inputType, narrowedType, hasErrors || declaredType.HasErrors() || deconstruction.HasErrors() || properties.HasErrors() || variableAccess.HasErrors()) 8222: base(BoundKind.ListPattern, syntax, variable, variableAccess, inputType, narrowedType, hasErrors || subpatterns.HasErrors() || lengthAccess.HasErrors() || indexerAccess.HasErrors() || receiverPlaceholder.HasErrors() || argumentPlaceholder.HasErrors() || variableAccess.HasErrors()) 8266: base(BoundKind.SlicePattern, syntax, inputType, narrowedType, hasErrors || pattern.HasErrors() || indexerAccess.HasErrors() || receiverPlaceholder.HasErrors() || argumentPlaceholder.HasErrors()) 8305: base(BoundKind.ITuplePattern, syntax, inputType, narrowedType, hasErrors || subpatterns.HasErrors()) 8344protected BoundSubpattern(BoundKind kind, SyntaxNode syntax, BoundPattern pattern, bool hasErrors = false) 8359: base(BoundKind.PositionalSubpattern, syntax, pattern, hasErrors || pattern.HasErrors()) 8387: base(BoundKind.PropertySubpattern, syntax, pattern, hasErrors || member.HasErrors() || pattern.HasErrors()) 8417: base(BoundKind.PropertySubpatternMember, syntax, hasErrors || receiver.HasErrors()) 8449: base(BoundKind.TypePattern, syntax, inputType, narrowedType, hasErrors || declaredType.HasErrors()) 8485: base(BoundKind.BinaryPattern, syntax, inputType, narrowedType, hasErrors || left.HasErrors() || right.HasErrors()) 8524: base(BoundKind.NegatedPattern, syntax, inputType, narrowedType, hasErrors || negated.HasErrors()) 8558: base(BoundKind.RelationalPattern, syntax, inputType, narrowedType, hasErrors || value.HasErrors()) 8597: base(BoundKind.DiscardExpression, syntax, type, hasErrors) 8604: base(BoundKind.DiscardExpression, syntax, type) 8632: base(BoundKind.ThrowExpression, syntax, type, hasErrors || expression.HasErrors()) 8659protected VariablePendingInference(BoundKind kind, SyntaxNode syntax, Symbol variableSymbol, BoundExpression? receiverOpt, bool hasErrors = false) 8677: base(BoundKind.OutVariablePendingInference, syntax, variableSymbol, receiverOpt, hasErrors || receiverOpt.HasErrors()) 8703: base(BoundKind.DeconstructionVariablePendingInference, syntax, variableSymbol, receiverOpt, hasErrors || receiverOpt.HasErrors()) 8729: base(BoundKind.OutDeconstructVarPendingInference, syntax, null, hasErrors) 8736: base(BoundKind.OutDeconstructVarPendingInference, syntax, null) 8763protected BoundMethodBodyBase(BoundKind kind, SyntaxNode syntax, BoundBlock? blockBody, BoundBlock? expressionBody, bool hasErrors = false) 8777: base(BoundKind.NonConstructorMethodBody, syntax, blockBody, expressionBody, hasErrors || blockBody.HasErrors() || expressionBody.HasErrors()) 8800: base(BoundKind.ConstructorMethodBody, syntax, blockBody, expressionBody, hasErrors || initializer.HasErrors() || blockBody.HasErrors() || expressionBody.HasErrors()) 8830: base(BoundKind.ExpressionWithNullability, syntax, type, hasErrors || expression.HasErrors()) 8861: base(BoundKind.WithExpression, syntax, type, hasErrors || receiver.HasErrors() || initializerExpression.HasErrors()) 8901case BoundKind.FieldEqualsValue: 8903case BoundKind.PropertyEqualsValue: 8905case BoundKind.ParameterEqualsValue: 8907case BoundKind.GlobalStatementInitializer: 8909case BoundKind.ValuePlaceholder: 8911case BoundKind.CapturedReceiverPlaceholder: 8913case BoundKind.DeconstructValuePlaceholder: 8915case BoundKind.TupleOperandPlaceholder: 8917case BoundKind.AwaitableValuePlaceholder: 8919case BoundKind.DisposableValuePlaceholder: 8921case BoundKind.ObjectOrCollectionValuePlaceholder: 8923case BoundKind.ImplicitIndexerValuePlaceholder: 8925case BoundKind.ImplicitIndexerReceiverPlaceholder: 8927case BoundKind.ListPatternReceiverPlaceholder: 8929case BoundKind.ListPatternIndexPlaceholder: 8931case BoundKind.SlicePatternReceiverPlaceholder: 8933case BoundKind.SlicePatternRangePlaceholder: 8935case BoundKind.Dup: 8937case BoundKind.PassByCopy: 8939case BoundKind.BadExpression: 8941case BoundKind.BadStatement: 8943case BoundKind.ExtractedFinallyBlock: 8945case BoundKind.TypeExpression: 8947case BoundKind.TypeOrValueExpression: 8949case BoundKind.NamespaceExpression: 8951case BoundKind.UnaryOperator: 8953case BoundKind.IncrementOperator: 8955case BoundKind.AddressOfOperator: 8957case BoundKind.UnconvertedAddressOfOperator: 8959case BoundKind.FunctionPointerLoad: 8961case BoundKind.PointerIndirectionOperator: 8963case BoundKind.PointerElementAccess: 8965case BoundKind.FunctionPointerInvocation: 8967case BoundKind.RefTypeOperator: 8969case BoundKind.MakeRefOperator: 8971case BoundKind.RefValueOperator: 8973case BoundKind.FromEndIndexExpression: 8975case BoundKind.RangeExpression: 8977case BoundKind.BinaryOperator: 8979case BoundKind.TupleBinaryOperator: 8981case BoundKind.UserDefinedConditionalLogicalOperator: 8983case BoundKind.CompoundAssignmentOperator: 8985case BoundKind.AssignmentOperator: 8987case BoundKind.DeconstructionAssignmentOperator: 8989case BoundKind.NullCoalescingOperator: 8991case BoundKind.NullCoalescingAssignmentOperator: 8993case BoundKind.UnconvertedConditionalOperator: 8995case BoundKind.ConditionalOperator: 8997case BoundKind.ArrayAccess: 8999case BoundKind.RefArrayAccess: 9001case BoundKind.ArrayLength: 9003case BoundKind.AwaitableInfo: 9005case BoundKind.AwaitExpression: 9007case BoundKind.TypeOfOperator: 9009case BoundKind.BlockInstrumentation: 9011case BoundKind.MethodDefIndex: 9013case BoundKind.LocalId: 9015case BoundKind.ParameterId: 9017case BoundKind.StateMachineInstanceId: 9019case BoundKind.MaximumMethodDefIndex: 9021case BoundKind.InstrumentationPayloadRoot: 9023case BoundKind.ThrowIfModuleCancellationRequested: 9025case BoundKind.ModuleCancellationTokenExpression: 9027case BoundKind.ModuleVersionId: 9029case BoundKind.ModuleVersionIdString: 9031case BoundKind.SourceDocumentIndex: 9033case BoundKind.MethodInfo: 9035case BoundKind.FieldInfo: 9037case BoundKind.DefaultLiteral: 9039case BoundKind.DefaultExpression: 9041case BoundKind.IsOperator: 9043case BoundKind.AsOperator: 9045case BoundKind.SizeOfOperator: 9047case BoundKind.Conversion: 9049case BoundKind.ReadOnlySpanFromArray: 9051case BoundKind.ArgList: 9053case BoundKind.ArgListOperator: 9055case BoundKind.FixedLocalCollectionInitializer: 9057case BoundKind.SequencePoint: 9059case BoundKind.SequencePointWithSpan: 9061case BoundKind.SavePreviousSequencePoint: 9063case BoundKind.RestorePreviousSequencePoint: 9065case BoundKind.StepThroughSequencePoint: 9067case BoundKind.Block: 9069case BoundKind.Scope: 9071case BoundKind.StateMachineScope: 9073case BoundKind.LocalDeclaration: 9075case BoundKind.MultipleLocalDeclarations: 9077case BoundKind.UsingLocalDeclarations: 9079case BoundKind.LocalFunctionStatement: 9081case BoundKind.NoOpStatement: 9083case BoundKind.ReturnStatement: 9085case BoundKind.YieldReturnStatement: 9087case BoundKind.YieldBreakStatement: 9089case BoundKind.ThrowStatement: 9091case BoundKind.ExpressionStatement: 9093case BoundKind.BreakStatement: 9095case BoundKind.ContinueStatement: 9097case BoundKind.SwitchStatement: 9099case BoundKind.SwitchDispatch: 9101case BoundKind.IfStatement: 9103case BoundKind.DoStatement: 9105case BoundKind.WhileStatement: 9107case BoundKind.ForStatement: 9109case BoundKind.ForEachStatement: 9111case BoundKind.ForEachDeconstructStep: 9113case BoundKind.UsingStatement: 9115case BoundKind.FixedStatement: 9117case BoundKind.LockStatement: 9119case BoundKind.TryStatement: 9121case BoundKind.CatchBlock: 9123case BoundKind.Literal: 9125case BoundKind.Utf8String: 9127case BoundKind.ThisReference: 9129case BoundKind.PreviousSubmissionReference: 9131case BoundKind.HostObjectMemberReference: 9133case BoundKind.BaseReference: 9135case BoundKind.Local: 9137case BoundKind.PseudoVariable: 9139case BoundKind.RangeVariable: 9141case BoundKind.Parameter: 9143case BoundKind.LabelStatement: 9145case BoundKind.GotoStatement: 9147case BoundKind.LabeledStatement: 9149case BoundKind.Label: 9151case BoundKind.StatementList: 9153case BoundKind.ConditionalGoto: 9155case BoundKind.SwitchExpressionArm: 9157case BoundKind.UnconvertedSwitchExpression: 9159case BoundKind.ConvertedSwitchExpression: 9161case BoundKind.DecisionDag: 9163case BoundKind.EvaluationDecisionDagNode: 9165case BoundKind.TestDecisionDagNode: 9167case BoundKind.WhenDecisionDagNode: 9169case BoundKind.LeafDecisionDagNode: 9171case BoundKind.DagTemp: 9173case BoundKind.DagTypeTest: 9175case BoundKind.DagNonNullTest: 9177case BoundKind.DagExplicitNullTest: 9179case BoundKind.DagValueTest: 9181case BoundKind.DagRelationalTest: 9183case BoundKind.DagDeconstructEvaluation: 9185case BoundKind.DagTypeEvaluation: 9187case BoundKind.DagFieldEvaluation: 9189case BoundKind.DagPropertyEvaluation: 9191case BoundKind.DagIndexEvaluation: 9193case BoundKind.DagIndexerEvaluation: 9195case BoundKind.DagSliceEvaluation: 9197case BoundKind.DagAssignmentEvaluation: 9199case BoundKind.SwitchSection: 9201case BoundKind.SwitchLabel: 9203case BoundKind.SequencePointExpression: 9205case BoundKind.Sequence: 9207case BoundKind.SpillSequence: 9209case BoundKind.DynamicMemberAccess: 9211case BoundKind.DynamicInvocation: 9213case BoundKind.ConditionalAccess: 9215case BoundKind.LoweredConditionalAccess: 9217case BoundKind.ConditionalReceiver: 9219case BoundKind.ComplexConditionalReceiver: 9221case BoundKind.MethodGroup: 9223case BoundKind.PropertyGroup: 9225case BoundKind.Call: 9227case BoundKind.EventAssignmentOperator: 9229case BoundKind.Attribute: 9231case BoundKind.UnconvertedObjectCreationExpression: 9233case BoundKind.ObjectCreationExpression: 9235case BoundKind.UnconvertedCollectionExpression: 9237case BoundKind.CollectionExpression: 9239case BoundKind.CollectionExpressionSpreadExpressionPlaceholder: 9241case BoundKind.CollectionExpressionSpreadElement: 9243case BoundKind.TupleLiteral: 9245case BoundKind.ConvertedTupleLiteral: 9247case BoundKind.DynamicObjectCreationExpression: 9249case BoundKind.NoPiaObjectCreationExpression: 9251case BoundKind.ObjectInitializerExpression: 9253case BoundKind.ObjectInitializerMember: 9255case BoundKind.DynamicObjectInitializerMember: 9257case BoundKind.CollectionInitializerExpression: 9259case BoundKind.CollectionElementInitializer: 9261case BoundKind.DynamicCollectionElementInitializer: 9263case BoundKind.ImplicitReceiver: 9265case BoundKind.AnonymousObjectCreationExpression: 9267case BoundKind.AnonymousPropertyDeclaration: 9269case BoundKind.NewT: 9271case BoundKind.DelegateCreationExpression: 9273case BoundKind.ArrayCreation: 9275case BoundKind.ArrayInitialization: 9277case BoundKind.StackAllocArrayCreation: 9279case BoundKind.ConvertedStackAllocExpression: 9281case BoundKind.FieldAccess: 9283case BoundKind.HoistedFieldAccess: 9285case BoundKind.PropertyAccess: 9287case BoundKind.EventAccess: 9289case BoundKind.IndexerAccess: 9291case BoundKind.ImplicitIndexerAccess: 9293case BoundKind.InlineArrayAccess: 9295case BoundKind.DynamicIndexerAccess: 9297case BoundKind.Lambda: 9299case BoundKind.UnboundLambda: 9301case BoundKind.QueryClause: 9303case BoundKind.TypeOrInstanceInitializers: 9305case BoundKind.NameOfOperator: 9307case BoundKind.UnconvertedInterpolatedString: 9309case BoundKind.InterpolatedString: 9311case BoundKind.InterpolatedStringHandlerPlaceholder: 9313case BoundKind.InterpolatedStringArgumentPlaceholder: 9315case BoundKind.StringInsert: 9317case BoundKind.IsPatternExpression: 9319case BoundKind.ConstantPattern: 9321case BoundKind.DiscardPattern: 9323case BoundKind.DeclarationPattern: 9325case BoundKind.RecursivePattern: 9327case BoundKind.ListPattern: 9329case BoundKind.SlicePattern: 9331case BoundKind.ITuplePattern: 9333case BoundKind.PositionalSubpattern: 9335case BoundKind.PropertySubpattern: 9337case BoundKind.PropertySubpatternMember: 9339case BoundKind.TypePattern: 9341case BoundKind.BinaryPattern: 9343case BoundKind.NegatedPattern: 9345case BoundKind.RelationalPattern: 9347case BoundKind.DiscardExpression: 9349case BoundKind.ThrowExpression: 9351case BoundKind.OutVariablePendingInference: 9353case BoundKind.DeconstructionVariablePendingInference: 9355case BoundKind.OutDeconstructVarPendingInference: 9357case BoundKind.NonConstructorMethodBody: 9359case BoundKind.ConstructorMethodBody: 9361case BoundKind.ExpressionWithNullability: 9363case BoundKind.WithExpression: 17333internal static PipelinePhase DoesNotSurvive(BoundKind kind) 17337BoundKind.ValuePlaceholder => PipelinePhase.LocalRewriting, 17338BoundKind.DeconstructValuePlaceholder => PipelinePhase.LocalRewriting, 17339BoundKind.TupleOperandPlaceholder => PipelinePhase.InitialBinding, 17340BoundKind.AwaitableValuePlaceholder => PipelinePhase.StateMachineRewriting, 17341BoundKind.DisposableValuePlaceholder => PipelinePhase.InitialBinding, 17342BoundKind.ImplicitIndexerReceiverPlaceholder => PipelinePhase.LocalRewriting, 17343BoundKind.ListPatternReceiverPlaceholder => PipelinePhase.LocalRewriting, 17344BoundKind.ListPatternIndexPlaceholder => PipelinePhase.LocalRewriting, 17345BoundKind.SlicePatternReceiverPlaceholder => PipelinePhase.LocalRewriting, 17346BoundKind.SlicePatternRangePlaceholder => PipelinePhase.LocalRewriting, 17347BoundKind.TypeOrValueExpression => PipelinePhase.InitialBinding, 17348BoundKind.UnconvertedAddressOfOperator => PipelinePhase.InitialBinding, 17349BoundKind.UnconvertedConditionalOperator => PipelinePhase.InitialBinding, 17350BoundKind.AwaitableInfo => PipelinePhase.StateMachineRewriting, 17351BoundKind.AwaitExpression => PipelinePhase.StateMachineRewriting, 17352BoundKind.DefaultLiteral => PipelinePhase.LocalRewriting, 17353BoundKind.LocalFunctionStatement => PipelinePhase.ClosureConversion, 17354BoundKind.YieldReturnStatement => PipelinePhase.StateMachineRewriting, 17355BoundKind.YieldBreakStatement => PipelinePhase.StateMachineRewriting, 17356BoundKind.IfStatement => PipelinePhase.LocalRewriting, 17357BoundKind.UsingStatement => PipelinePhase.LocalRewriting, 17358BoundKind.UnconvertedSwitchExpression => PipelinePhase.InitialBinding, 17359BoundKind.SpillSequence => PipelinePhase.Spilling, 17360BoundKind.UnconvertedObjectCreationExpression => PipelinePhase.InitialBinding, 17361BoundKind.UnconvertedCollectionExpression => PipelinePhase.InitialBinding, 17362BoundKind.TupleLiteral => PipelinePhase.InitialBinding, 17363BoundKind.TypeOrInstanceInitializers => PipelinePhase.LocalRewriting, 17364BoundKind.UnconvertedInterpolatedString => PipelinePhase.InitialBinding, 17365BoundKind.InterpolatedStringHandlerPlaceholder => PipelinePhase.LocalRewriting, 17366BoundKind.InterpolatedStringArgumentPlaceholder => PipelinePhase.LocalRewriting, 17367BoundKind.DeconstructionVariablePendingInference => PipelinePhase.LocalRewriting,
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (3)
315if (node.Expression.Kind == BoundKind.AwaitExpression) 319else if (node.Expression.Kind == BoundKind.AssignmentOperator) 322if (expression.Right.Kind == BoundKind.AwaitExpression)
Lowering\ClosureConversion\ClosureConversion.Analysis.cs (6)
111case BoundKind.SequencePoint: 115case BoundKind.SequencePointWithSpan: 119case BoundKind.Block: 120case BoundKind.StatementList: 121case BoundKind.FieldEqualsValue: 124case BoundKind.GlobalStatementInitializer:
Lowering\ClosureConversion\ClosureConversion.cs (3)
1109if (visited.Kind != BoundKind.Call) 1336if (node.Argument.Kind == BoundKind.Lambda) 1383receiver.Kind == BoundKind.TypeExpression &&
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (42)
141case BoundKind.ReturnStatement: 149case BoundKind.ExpressionStatement: 151case BoundKind.SequencePoint: 154case BoundKind.SequencePointWithSpan: 187case BoundKind.ArrayAccess: 189case BoundKind.ArrayCreation: 191case BoundKind.ArrayLength: 193case BoundKind.AsOperator: 195case BoundKind.BaseReference: 197case BoundKind.BinaryOperator: 201case BoundKind.UserDefinedConditionalLogicalOperator: 204case BoundKind.Call: 206case BoundKind.ConditionalOperator: 208case BoundKind.Conversion: 210case BoundKind.PassByCopy: 212case BoundKind.DelegateCreationExpression: 214case BoundKind.FieldAccess: 221case BoundKind.IsOperator: 223case BoundKind.Lambda: 225case BoundKind.NewT: 227case BoundKind.NullCoalescingOperator: 229case BoundKind.ObjectCreationExpression: 231case BoundKind.Parameter: 233case BoundKind.PointerIndirectionOperator: 235case BoundKind.PointerElementAccess: 237case BoundKind.PropertyAccess: 239case BoundKind.SizeOfOperator: 241case BoundKind.UnaryOperator: 244case BoundKind.DefaultExpression: 245case BoundKind.HostObjectMemberReference: 246case BoundKind.Literal: 247case BoundKind.Local: 248case BoundKind.MethodInfo: 249case BoundKind.PreviousSubmissionReference: 250case BoundKind.ThisReference: 251case BoundKind.TypeOfOperator: 253case BoundKind.ValuePlaceholder: 540if (operand.Kind == BoundKind.Conversion) 805if (node.Argument.Kind == BoundKind.MethodGroup) 807throw ExceptionUtilities.UnexpectedValue(BoundKind.MethodGroup); 989case BoundKind.ObjectInitializerExpression: 1040case 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; 709if (current.Left.Kind == BoundKind.BinaryOperator) 813if (operand.Kind == BoundKind.FieldAccess) 913if (node.Argument.Kind != BoundKind.MethodGroup) 997if (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: 316if (node.Left.ConstantValueOpt != null && node.Right.ConstantValueOpt == null && node.Right.Kind == BoundKind.Conversion) 321if (node.Right.ConstantValueOpt != null && node.Left.ConstantValueOpt == null && node.Left.Kind == BoundKind.Conversion) 346return node.Kind == BoundKind.Conversion && ((BoundConversion)node).ExplicitCastInCode; 352if (node.Kind != BoundKind.Conversion) return false; 576if (operand.Kind == BoundKind.Conversion) 605if (expr.Kind != BoundKind.Conversion) 864if (node.Kind == BoundKind.Conversion) 888while (right.Kind == BoundKind.Conversion) 903if (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 (43)
290node.Kind is not (BoundKind.ImplicitReceiver or BoundKind.ObjectOrCollectionValuePlaceholder or BoundKind.ValuePlaceholder)) 313return node.Kind == BoundKind.DeconstructionAssignmentOperator && !((BoundDeconstructionAssignmentOperator)node).IsUsed; 713if (initializer.Kind == BoundKind.Block) 885case BoundKind.Block: 890if (initializer.Kind == BoundKind.ExpressionStatement) 892goto case BoundKind.ExpressionStatement; 897case BoundKind.ExpressionStatement: 898return ((BoundExpressionStatement)initializer).Expression.Kind == BoundKind.AssignmentOperator; 915if (statement.Kind != BoundKind.ExpressionStatement) 926Debug.Assert(assignment.Left.Kind == BoundKind.FieldAccess); 1024case BoundKind.Parameter: 1025case BoundKind.Local: 1026case BoundKind.ArrayAccess: 1027case BoundKind.ThisReference: 1028case BoundKind.PointerIndirectionOperator: 1029case BoundKind.PointerElementAccess: 1030case BoundKind.RefValueOperator: 1031case BoundKind.PseudoVariable: 1032case BoundKind.DiscardExpression: 1035case BoundKind.DeconstructValuePlaceholder: 1040case BoundKind.InterpolatedStringArgumentPlaceholder: 1047case BoundKind.InterpolatedStringHandlerPlaceholder: 1052case BoundKind.CollectionExpressionSpreadExpressionPlaceholder: 1056case BoundKind.AwaitableValuePlaceholder: 1061case BoundKind.EventAccess: 1075case BoundKind.FieldAccess: 1086case BoundKind.Sequence: 1089case BoundKind.AssignmentOperator: 1092case BoundKind.ConditionalOperator: 1095case BoundKind.Call: 1098case BoundKind.PropertyAccess: 1101case BoundKind.IndexerAccess: 1104case BoundKind.ImplicitIndexerAccess: 1107case BoundKind.ImplicitIndexerReceiverPlaceholder: 1111case BoundKind.InlineArrayAccess: 1114case BoundKind.ImplicitIndexerValuePlaceholder: 1119case BoundKind.ListPatternReceiverPlaceholder: 1120case BoundKind.SlicePatternReceiverPlaceholder: 1121case BoundKind.SlicePatternRangePlaceholder: 1122case BoundKind.ListPatternIndexPlaceholder: 1125case BoundKind.Conversion:
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (4)
388ImmutableArray<BoundDecisionDagNode> nodesToLower = sortedNodes.WhereAsArray(n => n.Kind != BoundKind.WhenDecisionDagNode && n.Kind != BoundKind.LeafDecisionDagNode); 980if (!sortedNodes.Any(static n => n.Kind == BoundKind.WhenDecisionDagNode)) return; 1192Debug.Assert(left.Kind == BoundKind.Local && left == binding.VariableAccess);
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (4)
532if ((loweredInput.Kind == BoundKind.Local || loweredInput.Kind == BoundKind.Parameter) 657if (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: 105case BoundKind.DynamicIndexerAccess: 116case BoundKind.DynamicMemberAccess: 125case BoundKind.EventAccess: 185case BoundKind.DynamicIndexerAccess: 186case BoundKind.DynamicMemberAccess: 189case BoundKind.PropertyAccess: 209case BoundKind.IndexerAccess: 230case BoundKind.Local: 231case BoundKind.Parameter: 232case BoundKind.FieldAccess: 242case BoundKind.DiscardExpression: 247case BoundKind.Sequence: 253if (sequence.Value.Kind == BoundKind.IndexerAccess)
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (13)
291if (loweredRight.Kind == BoundKind.Local || loweredRight.Kind == BoundKind.Parameter) 303if (loweredRight.Kind == BoundKind.Local || loweredRight.Kind == BoundKind.Parameter) 490if (loweredLeft.Kind == BoundKind.ArrayLength && loweredRight.IsDefaultValue()) 505if (loweredRight.Kind == BoundKind.ArrayLength && loweredLeft.IsDefaultValue()) 520if (loweredLeft.Kind == BoundKind.ArrayLength && loweredRight.IsDefaultValue()) 524else if (loweredRight.Kind == BoundKind.ArrayLength && loweredLeft.IsDefaultValue()) 660if (constantLeft == null && loweredLeft.Kind != BoundKind.Local && loweredLeft.Kind != BoundKind.Parameter) 721if (expression.Kind == BoundKind.Conversion) 1627if (nonNullRight != null && nonNullRight.ConstantValueOpt != null && left.Kind == BoundKind.Sequence) 1630if (seq.Value.Kind == BoundKind.ConditionalOperator)
Lowering\LocalRewriter\LocalRewriter_Block.cs (2)
111case BoundKind.LabeledStatement: 114case BoundKind.UsingLocalDeclarations:
Lowering\LocalRewriter\LocalRewriter_Call.cs (10)
35case BoundKind.MethodGroup: 43Debug.Assert(methodGroup.ReceiverOpt == null || methodGroup.ReceiverOpt.Kind != BoundKind.TypeOrValueExpression); 71case BoundKind.DynamicMemberAccess: 572case BoundKind.Parameter: 574goto case BoundKind.Local; 576case BoundKind.Local: 580case BoundKind.PassByCopy: 582case BoundKind.Conversion: 1621if (argument.Kind == BoundKind.Local) 1710if (argument.Kind == BoundKind.Local)
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (40)
99if (node.Left.Kind == BoundKind.DynamicMemberAccess && 289Debug.Assert(receiverOpt.Kind != BoundKind.TypeExpression); 611Debug.Assert(receiver.Kind != BoundKind.TypeExpression); 723case BoundKind.PropertyAccess: 738case BoundKind.IndexerAccess: 750case BoundKind.ImplicitIndexerAccess: 763case BoundKind.FieldAccess: 780case BoundKind.ArrayAccess: 808case BoundKind.InlineArrayAccess: 812case BoundKind.DynamicMemberAccess: 815case BoundKind.DynamicIndexerAccess: 818case BoundKind.Local: 819case BoundKind.Parameter: 820case BoundKind.ThisReference: // a special kind of parameter 821case BoundKind.PseudoVariable: 829case BoundKind.Call: 833case BoundKind.FunctionPointerInvocation: 837case BoundKind.ConditionalOperator: 841case BoundKind.AssignmentOperator: 845case BoundKind.PointerElementAccess: 846case BoundKind.PointerIndirectionOperator: 847case BoundKind.RefValueOperator: 850case BoundKind.EventAccess: 973case BoundKind.ThisReference: 976case BoundKind.BaseReference: 979case BoundKind.Literal: 983case BoundKind.Parameter: 988case BoundKind.Local: 991case BoundKind.TypeExpression: 1015case BoundKind.Parameter: 1017goto case BoundKind.Local; 1018case BoundKind.Local: 1019case BoundKind.Lambda: 1020case BoundKind.ThisReference: 1021case BoundKind.BaseReference: 1022case BoundKind.Literal: 1025case BoundKind.Conversion: 1030case BoundKind.PassByCopy: 1033case BoundKind.ObjectCreationExpression: 1045case BoundKind.Call:
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (4)
243case BoundKind.Sequence: 247case BoundKind.Conversion: 1320if (operand.Kind == BoundKind.Sequence) 1323if (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 (7)
50case BoundKind.AwaitExpression: 53case BoundKind.AssignmentOperator: 57case BoundKind.CompoundAssignmentOperator: 60case BoundKind.Call: 71case BoundKind.DynamicInvocation: 75case BoundKind.ConditionalAccess: 78case BoundKind.IncrementOperator:
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)
536if (node.LengthOrCountAccess.Kind is not BoundKind.Local || receiver.Kind is not (BoundKind.Local or BoundKind.Parameter)) 578if (makeOffsetInput.ConstantValueOpt is null && lengthAccess.Kind is not BoundKind.ArrayLength) 839if (node.LengthOrCountAccess.Kind is not BoundKind.Local || receiver.Kind is not (BoundKind.Local or BoundKind.Parameter)) 990if ((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)
103Debug.Assert(!_inExpressionLambda && lhsRead.Kind != BoundKind.PropertyAccess); 107if (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 (12)
72case BoundKind.ObjectInitializerExpression: 75case BoundKind.CollectionInitializerExpression: 91if (initializer.Kind != BoundKind.CollectionElementInitializer) 137if (initializer.Kind == BoundKind.CollectionElementInitializer) 144Debug.Assert(initializer.Kind == BoundKind.DynamicCollectionElementInitializer); 314bool isRhsNestedInitializer = right.Kind is BoundKind.ObjectInitializerExpression or BoundKind.CollectionInitializerExpression; 327case BoundKind.ObjectInitializerMember: 408case BoundKind.DynamicObjectInitializerMember: 434case BoundKind.ArrayAccess: 480case BoundKind.PointerElementAccess: 513case BoundKind.ImplicitIndexerAccess:
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (1)
627if (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)
46if (node.Operand.Kind == BoundKind.BinaryOperator) 322if (loweredOperand.Kind == BoundKind.Sequence) 325if (seq.Value.Kind == BoundKind.ConditionalOperator) 636case BoundKind.Local: 639case BoundKind.Parameter: 643case BoundKind.FieldAccess: 1023case BoundKind.PropertyAccess: 1027case BoundKind.DynamicMemberAccess: 1031case BoundKind.IndexerAccess: 1035case 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)
226if (loweredReceiver.Kind == BoundKind.TypeExpression) 673int discardCount = loweredArguments.Count(a => a.Kind == BoundKind.DiscardExpression);
Lowering\MethodToClassRewriter.cs (6)
259if (originalLeft.Kind != BoundKind.Local) 273Debug.Assert(originalRight.Kind != BoundKind.ConvertedStackAllocExpression); 295if (rewrittenLeft.Kind != BoundKind.Local && originalRight.Kind == BoundKind.ConvertedStackAllocExpression) 377return originalReceiver is { Kind: BoundKind.BaseReference } && 378rewrittenReceiver 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: 885case BoundKind.Local: 886case BoundKind.Parameter: 890case BoundKind.FieldAccess: 899case BoundKind.ArrayAccess:
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (1)
316if (node.ReceiverOpt != null && node.ReceiverOpt.Kind == BoundKind.ThisReference)
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (3)
417if (statement.Kind == BoundKind.Block) 421if (rewrittenStatements.Length == 1 && rewrittenStatements[0].Kind == BoundKind.StateMachineScope) 620if (node.Left.Kind != BoundKind.Local)
Lowering\StateMachineRewriter\RefInitializationHoister.cs (8)
149case BoundKind.ArrayAccess: 186case BoundKind.FieldAccess: 216if (receiver.Kind != BoundKind.ThisReference && !isFieldOfStruct) 225case BoundKind.ThisReference: 226case BoundKind.BaseReference: 227case BoundKind.DefaultExpression: 230case BoundKind.Call: 251case BoundKind.ConditionalOperator:
Lowering\SyntheticBoundNodeFactory.cs (3)
586if (body.Kind != BoundKind.Block) 1742var discardsPresent = arguments.Any(static a => a.Kind == BoundKind.DiscardExpression); 1747(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; 1634if (boundIndexerAccess.LengthOrCountAccess.Kind == BoundKind.ArrayLength) 2271if (part.Kind == BoundKind.StringInsert) 2530if (variable == null && boundDeclarationPattern.VariableAccess?.Kind == BoundKind.DiscardExpression) 2744Debug.Assert(boundSwitchLabel.Pattern.Kind == BoundKind.DiscardPattern); 2748boundSwitchLabel.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)
1107case BoundKind.DefaultLiteral: 1108case BoundKind.DefaultExpression: 1110case BoundKind.ObjectCreationExpression: 1112case BoundKind.Conversion:
Symbols\Source\SourceComplexParameterSymbol.cs (1)
407if (convertedExpression.ConstantValueOpt == null && convertedExpression.Kind == BoundKind.Conversion &&
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (19)
Semantics\ConstantTests.cs (4)
592var actual = ParseAndGetConstantFoldingSteps(source, node => node.Kind == BoundKind.BinaryOperator); 641var actual = ParseAndGetConstantFoldingSteps(source, node => node.Kind == BoundKind.UnaryOperator); 1448return ParseAndGetConstantFoldingSteps(source, node => node.Kind != BoundKind.Literal && node.Kind != BoundKind.Local);
Semantics\FieldInitializerBindingTests.cs (1)
274Assert.Equal(BoundKind.FieldEqualsValue, boundInit.Kind);
Semantics\SemanticAnalyzerTests.cs (14)
1332Assert.Equal(BoundKind.LocalDeclaration, block.Statements[0].Kind); 1335Assert.Equal(BoundKind.ObjectCreationExpression, decl.InitializerOpt.Kind); 1360Assert.Equal(BoundKind.LocalDeclaration, block.Statements[0].Kind); 1363Assert.Equal(BoundKind.ObjectCreationExpression, decl.InitializerOpt.Kind); 1388Assert.Equal(BoundKind.LocalDeclaration, block.Statements[0].Kind); 1391Assert.Equal(BoundKind.ObjectCreationExpression, decl.InitializerOpt.Kind); 1425Assert.Equal(BoundKind.LocalDeclaration, block.Statements[0].Kind); 1428Assert.Equal(BoundKind.ObjectCreationExpression, decl.InitializerOpt.Kind); 1459Assert.Equal(BoundKind.LocalDeclaration, block.Statements[0].Kind); 1462Assert.Equal(BoundKind.ObjectCreationExpression, decl.InitializerOpt.Kind); 1494Assert.Equal(BoundKind.LocalDeclaration, block.Statements[0].Kind); 1497Assert.Equal(BoundKind.ObjectCreationExpression, decl.InitializerOpt.Kind); 1529Assert.Equal(BoundKind.LocalDeclaration, block.Statements[0].Kind); 1532Assert.Equal(BoundKind.ObjectCreationExpression, decl.InitializerOpt.Kind);