1 write to ReceiverOpt
Microsoft.CodeAnalysis.CSharp (1)
Generated\BoundNodes.xml.Generated.cs (1)
5727this.ReceiverOpt = receiverOpt;
59 references to ReceiverOpt
Microsoft.CodeAnalysis.CSharp (59)
Binder\Binder.ValueChecks.cs (1)
613var receiver = methodGroup.ReceiverOpt;
Binder\Binder_Expressions.cs (11)
8024this.BindMemberAccessReportError(syntax, nameSyntax, node.Name, node.ReceiverOpt, node.LookupError, diagnostics); 8115return this.BindMemberAccessBadResult(syntax, node.Name, node.ReceiverOpt, node.LookupError, StaticCast<Symbol>.From(node.Methods), node.ResultKind); 8985Debug.Assert(propertyGroup.ReceiverOpt is not null); 8986return BindIndexedPropertyAccess(node, propertyGroup.ReceiverOpt, propertyGroup.Properties, analyzedArguments, diagnostics); 9654var receiver = propertyGroup.ReceiverOpt; 10330expression, methodName, analyzedArguments, methodGroup.ReceiverOpt, methodGroup.TypeArgumentsOpt, options, 10420methodGroup.PopulateWithNonExtensionMethods(node.ReceiverOpt, methods, node.TypeArgumentsOpt, node.ResultKind, node.LookupError); 10488switch (node.ReceiverOpt) 10523var receiver = node.ReceiverOpt!; 10633switch (node.ReceiverOpt) 10689var receiver = node.ReceiverOpt!;
Binder\Binder_Invocation.cs (3)
405receiver = methodGroup.ReceiverOpt; 743methodGroup.ReceiverOpt, 783methodGroup.ReceiverOpt,
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
3601bool result = !_binder.MethodIsCompatibleWithDelegateOrFunctionPointer(node.ReceiverOpt, conv.IsExtensionMethod, conv.Method, delegateType, Location.None, BindingDiagnosticBag.Discarded);
BoundTree\BoundMethodGroup.cs (3)
61if (this.ReceiverOpt == null || this.ReceiverOpt.Kind == BoundKind.TypeExpression) 67return this.ReceiverOpt;
BoundTree\Expression.cs (1)
159protected override ImmutableArray<BoundNode?> Children => ImmutableArray.Create<BoundNode?>(this.ReceiverOpt);
CodeGen\EmitExpression.cs (1)
800var receiver = mg != null ? mg.ReceiverOpt : expression.Argument;
Compilation\CSharpSemanticModel.cs (2)
4288symbols = CreateReducedExtensionMethodIfPossible(delegateCreation, boundNode.ReceiverOpt); 4605var receiver = node.ReceiverOpt;
Compilation\MemberSemanticModel.cs (1)
1791receiver = ((BoundMethodGroup)receiver).ReceiverOpt;
FlowAnalysis\AbstractFlowPass.cs (4)
1621else if (node.MethodOpt is { } method && methodGroup.ReceiverOpt is { } receiver && !ignoreReceiver(method)) 1740BoundExpression receiver = ((BoundMethodGroup)node.Operand).ReceiverOpt; 2918if (node.ReceiverOpt != null) 2921VisitRvalue(node.ReceiverOpt);
FlowAnalysis\NullableWalker.cs (4)
7915if (_walker.TryGetMethodGroupReceiverNullability(group.ReceiverOpt, out TypeWithState receiverType)) 9770var receiverOpt = node.ReceiverOpt; 9807var receiverOpt = group.ReceiverOpt; 11665var receiverOpt = (expr as BoundMethodGroup)?.ReceiverOpt;
Generated\BoundNodes.xml.Generated.cs (10)
6104if (typeArgumentsOpt != this.TypeArgumentsOpt || name != this.Name || methods != this.Methods || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(lookupSymbolOpt, this.LookupSymbolOpt) || lookupError != this.LookupError || flags != this.Flags || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(functionType, this.FunctionType) || receiverOpt != this.ReceiverOpt || resultKind != this.ResultKind) 6132if (properties != this.Properties || receiverOpt != this.ReceiverOpt || resultKind != this.ResultKind) 10451this.Visit(node.ReceiverOpt); 10456this.Visit(node.ReceiverOpt); 11728BoundExpression? receiverOpt = (BoundExpression?)this.Visit(node.ReceiverOpt); 11734BoundExpression? receiverOpt = (BoundExpression?)this.Visit(node.ReceiverOpt); 13896BoundExpression? receiverOpt = (BoundExpression?)this.Visit(node.ReceiverOpt); 13914BoundExpression? receiverOpt = (BoundExpression?)this.Visit(node.ReceiverOpt); 16367new TreeDumperNode("receiverOpt", null, new TreeDumperNode[] { Visit(node.ReceiverOpt, null) }), 16377new TreeDumperNode("receiverOpt", null, new TreeDumperNode[] { Visit(node.ReceiverOpt, null) }),
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
693return DelegateCreation(mg.ReceiverOpt, node.SymbolOpt, node.Type, !node.SymbolOpt.RequiresInstanceReceiver && !node.IsExtensionMethod);
Lowering\DiagnosticsPass_ExpressionTrees.cs (2)
894CheckReceiverIfField(node.ReceiverOpt); 899Visit(node.ReceiverOpt);
Lowering\DiagnosticsPass_Warnings.cs (1)
938CheckReceiverIfField(node.ReceiverOpt);
Lowering\LocalRewriter\LocalRewriter_Call.cs (4)
43Debug.Assert(methodGroup.ReceiverOpt == null || methodGroup.ReceiverOpt.Kind != BoundKind.TypeOrValueExpression); 45if (methodGroup.ReceiverOpt == null) 61loweredReceiver = VisitExpression(methodGroup.ReceiverOpt);
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (3)
557(symbolOpt.IsAbstract || symbolOpt.IsVirtual) ? mg.ReceiverOpt?.Type : null, 569_factory.Syntax = (mg.ReceiverOpt ?? mg).Syntax; 570var receiver = (!method.RequiresInstanceReceiver && !oldNodeOpt.IsExtensionMethod && !method.IsAbstract && !method.IsVirtual) ? _factory.Type(method.ContainingType) : mg.ReceiverOpt;
Lowering\LocalRewriter\LocalRewriter_DelegateCreationExpression.cs (2)
34_factory.Syntax = (mg.ReceiverOpt ?? mg).Syntax; 35var receiver = (!method.RequiresInstanceReceiver && !node.IsExtensionMethod && !method.IsAbstract && !method.IsVirtual) ? _factory.Type(method.ContainingType) : VisitExpression(mg.ReceiverOpt)!;
Lowering\LocalRewriter\LocalRewriter_IsOperator.cs (1)
36BoundExpression? receiver = methodGroup.ReceiverOpt;
Operations\CSharpOperationFactory.cs (3)
768return CreateBoundDynamicMemberAccessOperation(methodGroup.ReceiverOpt, TypeMap.AsTypeSymbols(methodGroup.TypeArgumentsOpt), methodGroup.Name, 1162TypeParameterSymbol? constrainedToType = GetConstrainedToType(methodSymbol, boundMethodGroup.ReceiverOpt); 1164IOperation? instance = CreateReceiverOperation(boundMethodGroup.ReceiverOpt, methodSymbol);