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