46 references to IsDelegateType
Microsoft.CodeAnalysis.CSharp (46)
Binder\Binder_Expressions.cs (1)
10906
if (!possibleDelegateType.
IsDelegateType
())
Binder\Binder_Invocation.cs (1)
1904
if (((object)type != null) && type.
IsDelegateType
())
Binder\Binder_Lookup.cs (1)
1745
return (object)type != null && (type.
IsDelegateType
() || type.IsDynamic() || type.IsFunctionPointer());
Binder\Binder_Operators.cs (1)
275
if (delegateType.
IsDelegateType
()) // Otherwise, suppress cascading.
Binder\Binder_WithExpression.cs (1)
34
else if (receiverType.IsAnonymousType && !receiverType.
IsDelegateType
())
Binder\LocalBinderFactory.cs (3)
316
NamedTypeSymbol namedType when namedType.
IsDelegateType
() => getDelegateParameters(namedType),
345
case NamedTypeSymbol namedType when namedType.
IsDelegateType
():
355
Debug.Assert(delegateType.
IsDelegateType
());
Binder\Semantics\Conversions\Conversions.cs (1)
47
if (!destination.
IsDelegateType
())
Binder\Semantics\Conversions\ConversionsBase.cs (8)
1606
if (!delegateType.
IsDelegateType
())
1631
if (type.
IsDelegateType
())
2763
if (!source.
IsDelegateType
())
3099
if (!s.
IsDelegateType
() || !d.
IsDelegateType
())
3640
if (destination.
IsDelegateType
())
3659
if (!source.
IsDelegateType
() || !destination.
IsDelegateType
())
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (4)
361
var leftDelegate = (object)leftType != null && leftType.
IsDelegateType
();
363
var rightDelegate = (object)rightType != null && rightType.
IsDelegateType
();
768
((object)left.Type == null || (!left.Type.
IsDelegateType
() && left.Type.SpecialType != SpecialType.System_String && left.Type.SpecialType != SpecialType.System_Delegate)) &&
769
((object)right.Type == null || (!right.Type.
IsDelegateType
() && right.Type.SpecialType != SpecialType.System_String && right.Type.SpecialType != SpecialType.System_Delegate));
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (4)
535
Debug.Assert(delegateOrFunctionPointerType.
IsDelegateType
() || delegateOrFunctionPointerType is FunctionPointerTypeSymbol);
2193
if (constructedSource.IsInterface || constructedSource.
IsDelegateType
())
2593
if (constructedTarget.IsInterface || constructedTarget.
IsDelegateType
())
3036
Debug.Assert(target.
IsDelegateType
());
CodeGen\EmitConversion.cs (1)
354
if (!method.IsStatic && method.IsMetadataVirtual() && !method.ContainingType.
IsDelegateType
() && !receiver.SuppressVirtualCalls)
CodeGen\EmitExpression.cs (2)
3907
if (!(expr.Type.IsInterfaceType() || expr.Type.
IsDelegateType
()))
3982
return (to.
IsDelegateType
() && !TypeSymbol.Equals(to, from, TypeCompareKind.ConsiderEverything2)) ||
Compilation\CSharpSemanticModel.cs (1)
3376
else if (expr.Type.
IsDelegateType
())
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (1)
571
if (typeSymbol.
IsDelegateType
())
Compiler\MethodCompiler.cs (2)
895
if (methodSymbol.IsAbstract || methodSymbol.ContainingType?.
IsDelegateType
() == true)
2335
Debug.Assert(!method.ContainingType.
IsDelegateType
());
Emitter\Model\NamedTypeSymbolAdapter.cs (1)
570
return AdaptedNamedTypeSymbol.
IsDelegateType
();
FlowAnalysis\NullableWalker.cs (3)
3602
(LambdaSymbol l, NamedTypeSymbol n) _ when n.
IsDelegateType
() => AreLambdaAndNewDelegateSimilar(l, n),
9595
Debug.Assert(node.Type.
IsDelegateType
());
9868
Debug.Assert(delegateTypeOpt?.
IsDelegateType
() != false);
Lowering\LocalRewriter\DelegateCacheContainer.cs (1)
59
Debug.Assert(delegateType.
IsDelegateType
());
Operations\CSharpOperationFactory.cs (1)
1121
boundConversion.Type.
IsDelegateType
())
Symbols\Metadata\PE\PEEventSymbol.cs (1)
419
(eventType.
IsDelegateType
() || eventType.IsErrorType()) &&
Symbols\Source\SourceEventSymbol.cs (1)
598
else if (!this.Type.
IsDelegateType
() && !this.Type.IsErrorType())
Symbols\Source\SourceMemberContainerSymbol.cs (1)
3375
Debug.Assert(!this.
IsDelegateType
());
Symbols\Synthesized\SynthesizedEventAccessorSymbol.cs (1)
128
if (fieldLikeEvent.Type.
IsDelegateType
())
Symbols\TypeSymbolExtensions.cs (3)
445
return type.
IsDelegateType
() ? (NamedTypeSymbol)type : null;
585
Debug.Assert(type is FunctionPointerTypeSymbol || type.
IsDelegateType
());
612
RoslynDebug.Assert(type.
IsDelegateType
() || type.IsExpressionTree());
Symbols\VarianceSafety.cs (1)
102
Debug.Assert(!container.
IsDelegateType
());