2 overrides of RequiresInstanceReceiver
Microsoft.CodeAnalysis.CSharp (2)
Symbols\Source\LocalFunctionSymbol.cs (1)
162
public override bool
RequiresInstanceReceiver
=> false;
Symbols\Wrapped\WrappedMethodSymbol.cs (1)
125
public override bool
RequiresInstanceReceiver
33 references to RequiresInstanceReceiver
Microsoft.CodeAnalysis.CSharp (33)
Binder\Binder.ValueChecks.cs (1)
2038
if (methodInfo.Method?.
RequiresInstanceReceiver
== true && receiver?.Type?.IsRefLikeOrAllowsRefLikeType() == true)
Binder\Binder_Invocation.cs (5)
1195
var receiver = ReplaceTypeOrValueReceiver(methodGroup.Receiver, !method.
RequiresInstanceReceiver
&& !invokedAsExtensionMethod, diagnostics);
1256
if (invokedAsExtensionMethod || (!method.
RequiresInstanceReceiver
&& receiver != null && receiver.WasCompilerGenerated))
1265
if (!gotError && method.
RequiresInstanceReceiver
&& receiver != null && receiver.Kind == BoundKind.ThisReference && receiver.WasCompilerGenerated)
1304
if (method.
RequiresInstanceReceiver
)
1791
method.
RequiresInstanceReceiver
)
Binder\PatternExplainer.cs (1)
542
int extensionExtra = method.
RequiresInstanceReceiver
? 0 : 1;
Binder\Semantics\Conversions\Conversions.cs (1)
458
if (method.
RequiresInstanceReceiver
&& methodGroup.Receiver?.Type?.IsRestrictedType() == true)
CodeGen\EmitExpression.cs (4)
1624
else if (!call.Method.
RequiresInstanceReceiver
)
1827
Debug.Assert(!method.IsStatic && !method.IsDefaultValueTypeConstructor() && method.
RequiresInstanceReceiver
);
2073
if (call.ReceiverOpt is BoundCall { Method: {
RequiresInstanceReceiver
: true } method } receiver && !method.IsDefaultValueTypeConstructor())
2245
if (method.
RequiresInstanceReceiver
)
CodeGen\Optimizer.cs (2)
1162
if (method.
RequiresInstanceReceiver
)
2255
if (node.Method.
RequiresInstanceReceiver
)
FlowAnalysis\AbstractFlowPass.cs (1)
1738
if (node.IsExtensionMethod || ((object)node.SymbolOpt != null && node.SymbolOpt.
RequiresInstanceReceiver
))
FlowAnalysis\NullableWalker.cs (2)
636
if (method.
RequiresInstanceReceiver
)
6550
if (method.
RequiresInstanceReceiver
&&
FlowAnalysis\NullableWalker_Patterns.cs (1)
448
int extensionExtra = method.
RequiresInstanceReceiver
? 0 : 1;
Lowering\ClosureConversion\ClosureConversion.cs (2)
1366
Debug.Assert(node.TargetMethod is {
RequiresInstanceReceiver
: false, IsStatic: true });
1381
remappedMethod is {
RequiresInstanceReceiver
: false, IsStatic: true });
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (3)
649
method.
RequiresInstanceReceiver
? Visit(node.ReceiverOpt) : _bound.Null(ExpressionType),
693
return DelegateCreation(mg.ReceiverOpt, node.SymbolOpt, node.Type, !node.SymbolOpt.
RequiresInstanceReceiver
&& !node.IsExtensionMethod);
794
bool staticMember = !node.MethodOpt.
RequiresInstanceReceiver
&& !node.IsExtensionMethod;
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
897
if (method is null || method.
RequiresInstanceReceiver
|| isExtensionMethod)
Lowering\LocalRewriter\LocalRewriter_Call.cs (2)
49
Debug.Assert(node.ApplicableMethods.All(m => !m.
RequiresInstanceReceiver
&& TypeSymbol.Equals(m.ContainingType, firstContainer, TypeCompareKind.ConsiderEverything2)));
53
else if (hasImplicitReceiver && _factory.TopLevelMethod is {
RequiresInstanceReceiver
: false })
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (1)
570
var receiver = (!method.
RequiresInstanceReceiver
&& !oldNodeOpt.IsExtensionMethod && !method.IsAbstract && !method.IsVirtual) ? _factory.Type(method.ContainingType) : mg.ReceiverOpt;
Lowering\LocalRewriter\LocalRewriter_DelegateCreationExpression.cs (1)
35
var receiver = (!method.
RequiresInstanceReceiver
&& !node.IsExtensionMethod && !method.IsAbstract && !method.IsVirtual) ? _factory.Type(method.ContainingType) : VisitExpression(mg.ReceiverOpt)!;
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (1)
207
if (hasImplicitReceiver && _factory.TopLevelMethod.
RequiresInstanceReceiver
)
Lowering\SpillSequenceSpiller.cs (1)
1026
else if (node.Method.
RequiresInstanceReceiver
)
Symbols\MethodSymbol.cs (1)
1146
RequiresInstanceReceiver
? CodeAnalysis.NullableAnnotation.NotAnnotated : CodeAnalysis.NullableAnnotation.None;
Symbols\SymbolExtensions.cs (1)
547
SymbolKind.Method => ((MethodSymbol)symbol).
RequiresInstanceReceiver
,
Symbols\Wrapped\WrappedMethodSymbol.cs (1)
129
return UnderlyingMethod.
RequiresInstanceReceiver
;