Binder\Binder_Conversions.cs (12)
288if (source is BoundMethodGroup methodGroup)
1332addMethodBinder, node, node, (BoundMethodGroup)boundExpression, analyzedArguments, diagnostics, out addMethods);
1343BoundMethodGroup boundExpression,
1358BoundMethodGroup methodGroup,
1466Binder addMethodBinder, SyntaxNode syntax, BoundMethodGroup methodGroup, AnalyzedArguments analyzedArguments, MethodGroupResolution resolution,
2210Error(diagnostics, ErrorCode.WRN_MethGrpToNonDel, syntax, ((BoundMethodGroup)source).Name, destination);
2248BoundMethodGroup m => (m, false),
2252BoundMethodGroup group = FixMethodGroupWithTypeOrValue(originalGroup, conversion, diagnostics);
2545return Binder.IsTypeOrValueExpression(((BoundMethodGroup)node).ReceiverOpt);
2548private BoundMethodGroup FixMethodGroupWithTypeOrValue(BoundMethodGroup group, Conversion conversion, BindingDiagnosticBag diagnostics)
3062BoundMethodGroup boundMethodGroup,
Binder\Binder_Expressions.cs (19)
176if (childNode is BoundMethodGroup methodGroup)
2883!MethodGroupConversionDoesNotExistOrHasErrors((BoundMethodGroup)operand, (NamedTypeSymbol)targetType, syntax.Location, diagnostics, out _))
5507BoundMethodGroup methodGroup = (BoundMethodGroup)argument;
5543var boundMethodGroup = new BoundMethodGroup(
8058var methodGroup = (BoundMethodGroup)expr;
8231private BoundMethodGroup MakeBoundMethodGroupAndCheckOmittedTypeArguments(BoundExpression boundLeft, string rightName,
8235var boundMethodGroup = new BoundMethodGroup(
8269private void BindMemberAccessReportError(BoundMethodGroup node, BindingDiagnosticBag diagnostics)
8359private BoundExpression BindMemberAccessBadResult(BoundMethodGroup node)
10602var boundMethodGroup = new BoundMethodGroup(
10725BoundMethodGroup node,
10747BoundMethodGroup node,
10779BoundMethodGroup methodGroup,
10853BoundMethodGroup node,
10934internal NamedTypeSymbol? GetMethodGroupDelegateType(BoundMethodGroup node)
10953private MethodSymbol? GetUniqueSignatureFromMethodGroup_CSharp10(BoundMethodGroup node, out bool useParams)
11134private MethodSymbol? GetUniqueSignatureFromMethodGroup(BoundMethodGroup node, out bool useParams)
Binder\Binder_Invocation.cs (10)
362node, expression, methodName, (BoundMethodGroup)boundExpression, analyzedArguments,
413BoundMethodGroup methodGroup = (BoundMethodGroup)expression;
702BoundMethodGroup methodGroup,
885private void ReportDynamicInvocationWarnings(SyntaxNode syntax, BoundMethodGroup methodGroup, BindingDiagnosticBag diagnostics, ImmutableArray<MemberResolutionResult<MethodSymbol>> finalApplicableCandidates)
922BoundMethodGroup boundMethodGroup,
977BoundMethodGroup boundMethodGroup,
2324var originalMethods = (expr.Kind == BoundKind.MethodGroup) ? ((BoundMethodGroup)expr).Methods : ImmutableArray<MethodSymbol>.Empty;
2372if (boundArgument is BoundMethodGroup methodGroup)
2426private void EnsureNameofExpressionSymbols(BoundMethodGroup methodGroup, BindingDiagnosticBag diagnostics)
Binder\Semantics\Conversions\Conversions.cs (4)
44public override Conversion GetMethodGroupDelegateConversion(BoundMethodGroup source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
115public override Conversion GetMethodGroupFunctionPointerConversion(BoundMethodGroup source, FunctionPointerTypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
251private static MethodGroupResolution ResolveDelegateOrFunctionPointerMethodGroup(Binder binder, BoundMethodGroup source, MethodSymbol delegateInvokeMethodOpt, bool isFunctionPointer, in CallingConventionInfo callingConventionInfo, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
300public static bool ReportDelegateOrFunctionPointerMethodGroupDiagnostics(Binder binder, BoundMethodGroup expr, TypeSymbol targetType, BindingDiagnosticBag diagnostics)
FlowAnalysis\NullableWalker.cs (10)
8515internal override TypeWithAnnotations GetMethodGroupResultType(BoundMethodGroup group, MethodSymbol method)
9478var group = conversionOperand as BoundMethodGroup;
10249case BoundMethodGroup group:
10305Action<NamedTypeSymbol>? visitMethodGroupArgument(BoundDelegateCreationExpression node, NamedTypeSymbol delegateType, BoundMethodGroup group)
10313Action<NamedTypeSymbol>? analyzeMethodGroupConversion(BoundDelegateCreationExpression node, NamedTypeSymbol delegateType, BoundMethodGroup group, bool isTargetTyped)
10334Action<NamedTypeSymbol>? analyzeMethodGroupConversionAsContinuation(BoundDelegateCreationExpression node, BoundMethodGroup group)
10411public override BoundNode? VisitMethodGroup(BoundMethodGroup node)
10450private MethodSymbol CheckMethodGroupReceiverNullability(BoundMethodGroup group, ImmutableArray<ParameterSymbol> parameters, MethodSymbol method, bool invokedAsExtensionMethod)
12623var receiverOpt = (expr as BoundMethodGroup)?.ReceiverOpt;
Generated\BoundNodes.xml.Generated.cs (17)
1299public BoundUnconvertedAddressOfOperator(SyntaxNode syntax, BoundMethodGroup operand, bool hasErrors = false)
1308public BoundMethodGroup Operand { get; }
1314public BoundUnconvertedAddressOfOperator Update(BoundMethodGroup operand)
6124public BoundMethodGroup Update(ImmutableArray<TypeWithAnnotations> typeArgumentsOpt, string name, ImmutableArray<MethodSymbol> methods, Symbol? lookupSymbolOpt, DiagnosticInfo? lookupError, BoundMethodGroupFlags? flags, FunctionTypeSymbol? functionType, BoundExpression? receiverOpt, LookupResultKind resultKind)
6128var result = new BoundMethodGroup(this.Syntax, typeArgumentsOpt, name, methods, lookupSymbolOpt, lookupError, flags, functionType, receiverOpt, resultKind, this.HasErrors);
9220return VisitMethodGroup((BoundMethodGroup)node, arg);
9531public virtual R VisitMethodGroup(BoundMethodGroup node, A arg) => this.DefaultVisit(node, arg);
9767public virtual BoundNode? VisitMethodGroup(BoundMethodGroup node) => this.DefaultVisit(node);
10516public override BoundNode? VisitMethodGroup(BoundMethodGroup node)
11039BoundMethodGroup operand = (BoundMethodGroup)this.Visit(node.Operand);
11901public override BoundNode? VisitMethodGroup(BoundMethodGroup node)
12794BoundMethodGroup operand = (BoundMethodGroup)this.Visit(node.Operand);
14099public override BoundNode? VisitMethodGroup(BoundMethodGroup node)
14105BoundMethodGroup updatedNode;
16559public override TreeDumperNode VisitMethodGroup(BoundMethodGroup node, object? arg) => new TreeDumperNode("methodGroup", null, new TreeDumperNode[]
Lowering\DiagnosticsPass_ExpressionTrees.cs (5)
851CheckMethodGroup((BoundMethodGroup)node.Operand, node.Conversion.Method, node.IsExtensionMethod, parentIsConversion: true, node.Type);
919CheckMethodGroup((BoundMethodGroup)node.Argument, node.MethodOpt, node.IsExtensionMethod, parentIsConversion: true, convertedToType: node.Type);
925public override BoundNode VisitMethodGroup(BoundMethodGroup node)
931private void CheckMethodGroup(BoundMethodGroup node, MethodSymbol method, bool isExtensionMethod, bool parentIsConversion, TypeSymbol convertedToType)
999return base.VisitMethodGroup((BoundMethodGroup)node.Expression);