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