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