2 instantiations of FunctionTypeSymbol
Microsoft.CodeAnalysis.CSharp (2)
Symbols\FunctionTypeSymbol.cs (2)
48new FunctionTypeSymbol(binder, calculateDelegate) : 194new FunctionTypeSymbol(delegateType);
44 references to FunctionTypeSymbol
Microsoft.CodeAnalysis.CSharp (44)
Binder\Semantics\BestTypeInferrer.cs (6)
79if (type is FunctionTypeSymbol function) 101if (result is FunctionTypeSymbol functionType) 251type is FunctionTypeSymbol functionType && functionType.GetInternalDelegateType() is null ? 277if (type1 is FunctionTypeSymbol) 279if (!(type2 is FunctionTypeSymbol)) 284else if (type2 is FunctionTypeSymbol)
Binder\Semantics\Conversions\ConversionsBase.cs (10)
201/// types are <see cref="FunctionTypeSymbol"/> instances. 206var sourceFunctionType = source as FunctionTypeSymbol; 207var destinationFunctionType = destination as FunctionTypeSymbol; 722if (source is FunctionTypeSymbol) 2797private bool HasImplicitFunctionTypeConversion(FunctionTypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2799if (destination is FunctionTypeSymbol destinationFunctionType) 2830private bool HasImplicitFunctionTypeToFunctionTypeConversion(FunctionTypeSymbol sourceType, FunctionTypeSymbol destinationType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (5)
1404Debug.Assert(inferredReturnType.Type is not FunctionTypeSymbol); 2866lowerPredicate = static type => !isFunctionType(type, out var functionType) || functionType.GetInternalDelegateType() is not null; 2957if (isFunctionType(best, out var functionType)) 2983static bool isFunctionType(TypeWithAnnotations type, [NotNullWhen(true)] out FunctionTypeSymbol? functionType) 2985functionType = type.Type as FunctionTypeSymbol;
BoundTree\BoundExpressionExtensions.cs (1)
153public static FunctionTypeSymbol? GetFunctionType(this BoundExpression expr)
BoundTree\BoundMethodGroup.cs (2)
28private static FunctionTypeSymbol? GetFunctionType(Binder binder, SyntaxNode syntax) 30return FunctionTypeSymbol.CreateIfFeatureEnabled(syntax, binder, static (binder, expr) => binder.GetMethodGroupDelegateType((BoundMethodGroup)expr));
BoundTree\UnboundLambda.cs (5)
228Debug.Assert(bestType.Type is not FunctionTypeSymbol); 269if (bestType is FunctionTypeSymbol functionType) 411var functionType = FunctionTypeSymbol.CreateIfFeatureEnabled(syntax, binder, static (binder, expr) => ((UnboundLambda)expr).Data.InferDelegateType()); 420private UnboundLambda(SyntaxNode syntax, UnboundLambdaState state, FunctionTypeSymbol? functionType, bool withDependencies, NullableWalker.VariableState? nullableState, bool hasErrors) :
Generated\BoundNodes.xml.Generated.cs (9)
6075public BoundMethodGroup(SyntaxNode syntax, ImmutableArray<TypeWithAnnotations> typeArgumentsOpt, string name, ImmutableArray<MethodSymbol> methods, Symbol? lookupSymbolOpt, DiagnosticInfo? lookupError, BoundMethodGroupFlags? flags, FunctionTypeSymbol? functionType, BoundExpression? receiverOpt, LookupResultKind resultKind, bool hasErrors = false) 6097public FunctionTypeSymbol? FunctionType { get; } 6102public BoundMethodGroup Update(ImmutableArray<TypeWithAnnotations> typeArgumentsOpt, string name, ImmutableArray<MethodSymbol> methods, Symbol? lookupSymbolOpt, DiagnosticInfo? lookupError, BoundMethodGroupFlags? flags, FunctionTypeSymbol? functionType, BoundExpression? receiverOpt, LookupResultKind resultKind) 7633public UnboundLambda(SyntaxNode syntax, UnboundLambdaState data, FunctionTypeSymbol? functionType, Boolean withDependencies, bool hasErrors) 7644public UnboundLambda(SyntaxNode syntax, UnboundLambdaState data, FunctionTypeSymbol? functionType, Boolean withDependencies) 7657public FunctionTypeSymbol? FunctionType { get; } 7663public UnboundLambda Update(UnboundLambdaState data, FunctionTypeSymbol? functionType, Boolean withDependencies) 13931FunctionTypeSymbol? functionType = GetUpdatedSymbol(node, node.FunctionType); 14598FunctionTypeSymbol? functionType = GetUpdatedSymbol(node, node.FunctionType);
Symbols\FunctionTypeSymbol.cs (5)
45internal static FunctionTypeSymbol? CreateIfFeatureEnabled(SyntaxNode syntax, Binder binder, Func<Binder, BoundExpression, NamedTypeSymbol?> calculateDelegate) 165var otherType = (FunctionTypeSymbol)other; 189private FunctionTypeSymbol WithDelegateType(NamedTypeSymbol delegateType) 212if (t2 is FunctionTypeSymbol otherType)
Symbols\TypeSymbolExtensions.cs (1)
841if (((FunctionTypeSymbol)current).GetInternalDelegateType() is not { } delegateType)