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