1 write to ReceiverOpt
Microsoft.CodeAnalysis.CSharp (1)
Generated\BoundNodes.xml.Generated.cs (1)
6151this.ReceiverOpt = receiverOpt;
92 references to ReceiverOpt
Microsoft.CodeAnalysis.CSharp (92)
Binder\Binder.ValueChecks.cs (4)
3453call.ReceiverOpt, 3771call.ReceiverOpt, 4162call.ReceiverOpt, 4874call.ReceiverOpt,
Binder\Binder_Expressions.cs (1)
6472boundCall.ReceiverOpt,
Binder\Binder_Invocation.cs (8)
1045if (!call.HasAnyErrors && call.ReceiverOpt != null && (object)call.ReceiverOpt.Type != null) 1050if (call.ReceiverOpt.Type.IsRestrictedType() && !call.Method.ContainingType.IsInterface && !TypeSymbol.Equals(call.Method.ContainingType, call.ReceiverOpt.Type, TypeCompareKind.ConsiderEverything2)) 1052SymbolDistinguisher distinguisher = new SymbolDistinguisher(compilation, call.ReceiverOpt.Type, call.Method.ContainingType); 1053Error(diagnostics, ErrorCode.ERR_NoImplicitConv, call.ReceiverOpt.Syntax, distinguisher.First, distinguisher.Second); 1056else if (call.ReceiverOpt.Kind == BoundKind.BaseReference && this.ContainingType.IsRestrictedType()) 1059Error(diagnostics, ErrorCode.ERR_NoImplicitConv, call.ReceiverOpt.Syntax, distinguisher.First, distinguisher.Second);
Binder\Binder_Query.cs (4)
328result.ReceiverOpt, result.InitialBindingReceiverIsSubjectToCloning, result.Method, arguments.ToImmutableAndFree(), argumentNamesOpt: default, 472invocation = invocation.Update(invocation.ReceiverOpt, invocation.InitialBindingReceiverIsSubjectToCloning, invocation.Method, arguments); 541invocation = invocation.Update(invocation.ReceiverOpt, invocation.InitialBindingReceiverIsSubjectToCloning, invocation.Method, arguments); 630invocation.ReceiverOpt,
Binder\RefSafetyAnalysis.cs (3)
654VisitArgumentsAndGetArgumentPlaceholders(node.ReceiverOpt, node.Arguments); 662node.ReceiverOpt, 969invocation.ReceiverOpt,
BoundTree\BoundNode_Source.cs (1)
214var receiver = call.ReceiverOpt;
BoundTree\BoundNodeExtensions.cs (1)
61BoundExpression? receiverOpt = call!.ReceiverOpt;
BoundTree\BoundTreeWalker.cs (3)
181if (node.ReceiverOpt is BoundCall receiver1) 188while (node.ReceiverOpt is BoundCall receiver2) 225this.Visit(node.ReceiverOpt);
BoundTree\Constructors.cs (1)
160return this.Update(ReceiverOpt, InitialBindingReceiverIsSubjectToCloning, Method, arguments, ArgumentNamesOpt, ArgumentRefKindsOpt, IsDelegateCall, Expanded, InvokedAsExtensionMethod, ArgsToParamsOpt, DefaultArguments, ResultKind, OriginalMethodsOpt, Type);
BoundTree\Expression.cs (1)
56ImmutableArray<BoundNode> IBoundInvalidNode.InvalidNodeChildren => CSharpOperationFactory.CreateInvalidChildrenFromArgumentsExpression(ReceiverOpt, Arguments);
CodeGen\EmitExpression.cs (8)
632if (node.ReceiverOpt is BoundConditionalReceiver { Id: var id } && id == _conditionalAccess.Id) 1638var receiver = call.ReceiverOpt; 1658var receiver = call.ReceiverOpt; 1826var receiver = call.ReceiverOpt; 1916var receiver = call.ReceiverOpt; 1943var receiver = call.ReceiverOpt; 2022var receiver = call.ReceiverOpt; 2073if (call.ReceiverOpt is BoundCall { Method: { RequiresInstanceReceiver: true } method } receiver && !method.IsDefaultValueTypeConstructor())
CodeGen\Optimizer.cs (6)
1110if (node.ReceiverOpt is BoundCall receiver) 1118while (node.ReceiverOpt is BoundCall receiver2) 1156var receiver = node.ReceiverOpt; 2213if (node.ReceiverOpt is BoundCall receiver1) 2220while (node.ReceiverOpt is BoundCall receiver2) 2253BoundExpression? receiverOpt = node.ReceiverOpt;
Compilation\CSharpSemanticModel.cs (2)
4750if (call.ReceiverOpt != null) 4752extensionThisType = call.ReceiverOpt.Type;
Compilation\MemberSemanticModel.cs (2)
1055var operation = call.IsDelegateCall ? call.ReceiverOpt : call; 1785BoundExpression receiver = call.ReceiverOpt;
FlowAnalysis\AbstractFlowPass.cs (5)
1345if (node.ReceiverOpt is BoundCall receiver1) 1352while (node.ReceiverOpt is BoundCall receiver2) 1358VisitReceiverBeforeCall(node.ReceiverOpt, node.Method); 1370VisitReceiverBeforeCall(node.ReceiverOpt, node.Method); 1391VisitReceiverAfterCall(node.ReceiverOpt, node.Method);
FlowAnalysis\NullableWalker.cs (6)
6210if (node.ReceiverOpt is not null) 6243if (node.ReceiverOpt is BoundCall instanceReceiver) 6253Debug.Assert(node.ReceiverOpt is null); 6266if (node.ReceiverOpt is { } receiver) 6290ApplyMemberPostConditions(node.ReceiverOpt, method); 6334if (node.ReceiverOpt is BoundExpression receiver &&
Generated\BoundNodes.xml.Generated.cs (5)
6186if (receiverOpt != this.ReceiverOpt || initialBindingReceiverIsSubjectToCloning != this.InitialBindingReceiverIsSubjectToCloning || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(method, this.Method) || arguments != this.Arguments || argumentNamesOpt != this.ArgumentNamesOpt || argumentRefKindsOpt != this.ArgumentRefKindsOpt || isDelegateCall != this.IsDelegateCall || expanded != this.Expanded || invokedAsExtensionMethod != this.InvokedAsExtensionMethod || argsToParamsOpt != this.ArgsToParamsOpt || defaultArguments != this.DefaultArguments || resultKind != this.ResultKind || originalMethodsOpt != this.OriginalMethodsOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 10460this.Visit(node.ReceiverOpt); 11739BoundExpression? receiverOpt = (BoundExpression?)this.Visit(node.ReceiverOpt); 13932BoundExpression? receiverOpt = (BoundExpression?)this.Visit(node.ReceiverOpt); 16385new TreeDumperNode("receiverOpt", null, new TreeDumperNode[] { Visit(node.ReceiverOpt, null) }),
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (2)
641return _bound.StaticCall(WellKnownMember.System_Linq_Expressions_Expression__Invoke, Visit(node.ReceiverOpt), Expressions(node.Arguments)); 649method.RequiresInstanceReceiver ? Visit(node.ReceiverOpt) : _bound.Null(ExpressionType),
Lowering\DiagnosticsPass_ExpressionTrees.cs (6)
452if (node.ReceiverOpt is BoundCall receiver1) 459while (node.ReceiverOpt is BoundCall receiver2) 465CheckReceiverIfField(node.ReceiverOpt); 466this.Visit(node.ReceiverOpt); 481CheckReceiverIfField(node.ReceiverOpt); 483this.Visit(node.ReceiverOpt);
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (1)
159MethodMayMutateReceiver(node.ReceiverOpt, node.Method);
Lowering\LocalRewriter\LocalRewriter_Call.cs (5)
342BoundExpression? rewrittenReceiver = VisitExpression(node.ReceiverOpt); 356BoundExpression? rewrittenReceiver = VisitExpression(node.ReceiverOpt); 365if (node.ReceiverOpt is BoundCall instanceReceiver) 373Debug.Assert(node.ReceiverOpt is null); 392if (rewrittenReceiver is not null && node.ReceiverOpt is null)
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (2)
925Debug.Assert(call.ReceiverOpt is { }); 926return ReadIsSideeffecting(call.ReceiverOpt);
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (3)
434if (arg is BoundCall { ReceiverOpt: { Type: NamedTypeSymbol { SpecialType: SpecialType.System_Char } receiverCharType } receiver } potentialToStringCall && 626if (expr is BoundCall { Type.SpecialType: SpecialType.System_String, Method: { Name: "ToString" } method, ReceiverOpt: { Type: NamedTypeSymbol { SpecialType: SpecialType.System_Char } charType, ConstantValueOpt.IsChar: true } } call && 629expr = call.ReceiverOpt;
Lowering\MethodToClassRewriter.cs (2)
232var rewrittenReceiver = (BoundExpression?)this.Visit(node.ReceiverOpt); 244if (BaseReferenceInReceiverWasRewritten(node.ReceiverOpt, rewrittenReceiver) && node.Method.IsMetadataVirtual())
Lowering\SpillSequenceSpiller.cs (7)
452return call.Update(Spill(builder, call.ReceiverOpt, ReceiverSpillRefKind(call.ReceiverOpt)), 466return call.Update(Spill(builder, call.ReceiverOpt, ReceiverSpillRefKind(call.ReceiverOpt)), 1022if (builder == null || node.ReceiverOpt is BoundTypeExpression) 1024receiver = VisitExpression(ref builder, node.ReceiverOpt); 1031receiver = node.ReceiverOpt;
Operations\CSharpOperationFactory.cs (3)
454TypeParameterSymbol? constrainedToType = GetConstrainedToType(targetMethod, boundCall.ReceiverOpt); 455bool isVirtual = constrainedToType is not null || IsCallVirtual(targetMethod, boundCall.ReceiverOpt); 456IOperation? receiver = CreateReceiverOperation(boundCall.ReceiverOpt, targetMethod);