1 write to ReceiverOpt
Microsoft.CodeAnalysis.CSharp (1)
Generated\BoundNodes.xml.Generated.cs (1)
5726this.ReceiverOpt = receiverOpt;
59 references to ReceiverOpt
Microsoft.CodeAnalysis.CSharp (59)
Binder\Binder.ValueChecks.cs (1)
636var receiver = methodGroup.ReceiverOpt;
Binder\Binder_Expressions.cs (11)
8021this.BindMemberAccessReportError(syntax, nameSyntax, node.Name, node.ReceiverOpt, node.LookupError, diagnostics); 8112return this.BindMemberAccessBadResult(syntax, node.Name, node.ReceiverOpt, node.LookupError, StaticCast<Symbol>.From(node.Methods), node.ResultKind); 8982Debug.Assert(propertyGroup.ReceiverOpt is not null); 8983return BindIndexedPropertyAccess(node, propertyGroup.ReceiverOpt, propertyGroup.Properties, analyzedArguments, diagnostics); 9651var receiver = propertyGroup.ReceiverOpt; 10327expression, methodName, analyzedArguments, methodGroup.ReceiverOpt, methodGroup.TypeArgumentsOpt, options, 10417methodGroup.PopulateWithNonExtensionMethods(node.ReceiverOpt, methods, node.TypeArgumentsOpt, node.ResultKind, node.LookupError); 10485switch (node.ReceiverOpt) 10520var receiver = node.ReceiverOpt!; 10630switch (node.ReceiverOpt) 10686var receiver = node.ReceiverOpt!;
Binder\Binder_Invocation.cs (3)
405receiver = methodGroup.ReceiverOpt; 743methodGroup.ReceiverOpt, 783methodGroup.ReceiverOpt,
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
3580bool 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); 4598var 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)
7918if (_walker.TryGetMethodGroupReceiverNullability(group.ReceiverOpt, out TypeWithState receiverType)) 9773var receiverOpt = node.ReceiverOpt; 9810var receiverOpt = group.ReceiverOpt; 11668var receiverOpt = (expr as BoundMethodGroup)?.ReceiverOpt;
Generated\BoundNodes.xml.Generated.cs (10)
6103if (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) 6131if (properties != this.Properties || receiverOpt != this.ReceiverOpt || resultKind != this.ResultKind) 10450this.Visit(node.ReceiverOpt); 10455this.Visit(node.ReceiverOpt); 11727BoundExpression? receiverOpt = (BoundExpression?)this.Visit(node.ReceiverOpt); 11733BoundExpression? receiverOpt = (BoundExpression?)this.Visit(node.ReceiverOpt); 13895BoundExpression? receiverOpt = (BoundExpression?)this.Visit(node.ReceiverOpt); 13913BoundExpression? receiverOpt = (BoundExpression?)this.Visit(node.ReceiverOpt); 16366new TreeDumperNode("receiverOpt", null, new TreeDumperNode[] { Visit(node.ReceiverOpt, null) }), 16376new 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)
44Debug.Assert(methodGroup.ReceiverOpt == null || methodGroup.ReceiverOpt.Kind != BoundKind.TypeOrValueExpression); 46if (methodGroup.ReceiverOpt == null) 62loweredReceiver = 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);