8 instantiations of FunctionTypeSymbol
Microsoft.CodeAnalysis.CSharp (2)
Symbols\FunctionTypeSymbol.cs (2)
48new FunctionTypeSymbol(binder, calculateDelegate) : 194new FunctionTypeSymbol(delegateType);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (6)
Semantics\DelegateTypeTests.cs (6)
11450return new FunctionTypeSymbol_PublicModel(new FunctionTypeSymbol(delegateType)); 12260var functionTypeObjectNullable = new FunctionTypeSymbol(funcOfObjectNullable); 12261var functionTypeStringNullable = new FunctionTypeSymbol(funcOfStringNullable); 12262var functionTypeStringNotNullable = new FunctionTypeSymbol(funcOfStringNotNullable); 12263var functionTypeNullA = new FunctionTypeSymbol(null!); 12264var functionTypeNullB = new FunctionTypeSymbol(null!);
49 references to FunctionTypeSymbol
Microsoft.CodeAnalysis.CSharp (42)
Binder\Semantics\BestTypeInferrer.cs (5)
92if (result is FunctionTypeSymbol functionType) 243type is FunctionTypeSymbol functionType && functionType.GetInternalDelegateType() is null ? 269if (type1 is FunctionTypeSymbol) 271if (!(type2 is FunctionTypeSymbol)) 276else if (type2 is FunctionTypeSymbol)
Binder\Semantics\Conversions\ConversionsBase.cs (10)
192/// types are <see cref="FunctionTypeSymbol"/> instances. 197var sourceFunctionType = source as FunctionTypeSymbol; 198var destinationFunctionType = destination as FunctionTypeSymbol; 700if (source is FunctionTypeSymbol) 2648private bool HasImplicitFunctionTypeConversion(FunctionTypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2650if (destination is FunctionTypeSymbol destinationFunctionType) 2681private bool HasImplicitFunctionTypeToFunctionTypeConversion(FunctionTypeSymbol sourceType, FunctionTypeSymbol destinationType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (5)
1313Debug.Assert(inferredReturnType.Type is not FunctionTypeSymbol); 2670lower = removeTypes(lower, static type => isFunctionType(type, out var functionType) && functionType.GetInternalDelegateType() is null); 2760if (isFunctionType(best, out var functionType)) 2786static bool isFunctionType(TypeWithAnnotations type, [NotNullWhen(true)] out FunctionTypeSymbol? functionType) 2788functionType = type.Type as FunctionTypeSymbol;
BoundTree\BoundExpressionExtensions.cs (1)
135public 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) 412var functionType = FunctionTypeSymbol.CreateIfFeatureEnabled(syntax, binder, static (binder, expr) => ((UnboundLambda)expr).Data.InferDelegateType()); 421private UnboundLambda(SyntaxNode syntax, UnboundLambdaState state, FunctionTypeSymbol? functionType, bool withDependencies, NullableWalker.VariableState? nullableState, bool hasErrors) :
Generated\BoundNodes.xml.Generated.cs (9)
5963public 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) 5985public FunctionTypeSymbol? FunctionType { get; } 5990public BoundMethodGroup Update(ImmutableArray<TypeWithAnnotations> typeArgumentsOpt, string name, ImmutableArray<MethodSymbol> methods, Symbol? lookupSymbolOpt, DiagnosticInfo? lookupError, BoundMethodGroupFlags? flags, FunctionTypeSymbol? functionType, BoundExpression? receiverOpt, LookupResultKind resultKind) 7314public UnboundLambda(SyntaxNode syntax, UnboundLambdaState data, FunctionTypeSymbol? functionType, Boolean withDependencies, bool hasErrors) 7325public UnboundLambda(SyntaxNode syntax, UnboundLambdaState data, FunctionTypeSymbol? functionType, Boolean withDependencies) 7338public FunctionTypeSymbol? FunctionType { get; } 7344public UnboundLambda Update(UnboundLambdaState data, FunctionTypeSymbol? functionType, Boolean withDependencies) 13427FunctionTypeSymbol? functionType = GetUpdatedSymbol(node, node.FunctionType); 14024FunctionTypeSymbol? 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) 206if (t2 is FunctionTypeSymbol otherType)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (7)
Semantics\DelegateTypeTests.cs (7)
11462private readonly FunctionTypeSymbol _underlying; 11464internal FunctionTypeSymbol_PublicModel(FunctionTypeSymbol underlying) : 12260var functionTypeObjectNullable = new FunctionTypeSymbol(funcOfObjectNullable); 12261var functionTypeStringNullable = new FunctionTypeSymbol(funcOfStringNullable); 12262var functionTypeStringNotNullable = new FunctionTypeSymbol(funcOfStringNotNullable); 12263var functionTypeNullA = new FunctionTypeSymbol(null!); 12264var functionTypeNullB = new FunctionTypeSymbol(null!);