53 references to IsDelegateType
Microsoft.CodeAnalysis.CSharp (46)
Binder\Binder_Expressions.cs (1)
9299if (!possibleDelegateType.IsDelegateType())
Binder\Binder_Invocation.cs (1)
1582if (((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)
275NamedTypeSymbol namedType when namedType.IsDelegateType() => getDelegateParameters(namedType), 304case NamedTypeSymbol namedType when namedType.IsDelegateType(): 314Debug.Assert(delegateType.IsDelegateType());
Binder\Semantics\Conversions\Conversions.cs (1)
47if (!destination.IsDelegateType())
Binder\Semantics\Conversions\ConversionsBase.cs (8)
1528if (!delegateType.IsDelegateType()) 1553if (type.IsDelegateType()) 2614if (!source.IsDelegateType()) 2875if (!s.IsDelegateType() || !d.IsDelegateType()) 3401if (destination.IsDelegateType()) 3420if (!source.IsDelegateType() || !destination.IsDelegateType())
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (4)
361var leftDelegate = (object)leftType != null && leftType.IsDelegateType(); 363var rightDelegate = (object)rightType != null && rightType.IsDelegateType(); 750((object)left.Type == null || (!left.Type.IsDelegateType() && left.Type.SpecialType != SpecialType.System_String && left.Type.SpecialType != SpecialType.System_Delegate)) && 751((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)
534Debug.Assert(delegateOrFunctionPointerType.IsDelegateType() || delegateOrFunctionPointerType is FunctionPointerTypeSymbol); 1999if (constructedSource.IsInterface || constructedSource.IsDelegateType()) 2399if (constructedTarget.IsInterface || constructedTarget.IsDelegateType()) 2857Debug.Assert(target.IsDelegateType());
CodeGen\EmitConversion.cs (1)
353if (!method.IsStatic && method.IsMetadataVirtual() && !method.ContainingType.IsDelegateType() && !receiver.SuppressVirtualCalls)
CodeGen\EmitExpression.cs (2)
3633if (!(expr.Type.IsInterfaceType() || expr.Type.IsDelegateType())) 3708return (to.IsDelegateType() && !TypeSymbol.Equals(to, from, TypeCompareKind.ConsiderEverything2)) ||
Compilation\CSharpSemanticModel.cs (1)
3369else if (expr.Type.IsDelegateType())
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (1)
571if (typeSymbol.IsDelegateType())
Compiler\MethodCompiler.cs (2)
946if (methodSymbol.IsAbstract || methodSymbol.ContainingType?.IsDelegateType() == true) 2273Debug.Assert(!method.ContainingType.IsDelegateType());
Emitter\Model\NamedTypeSymbolAdapter.cs (1)
560return AdaptedNamedTypeSymbol.IsDelegateType();
Emitter\NoPia\EmbeddedType.cs (1)
191return UnderlyingNamedType.AdaptedNamedTypeSymbol.IsDelegateType();
FlowAnalysis\NullableWalker.cs (3)
3390(LambdaSymbol l, NamedTypeSymbol n) _ when n.IsDelegateType() => AreLambdaAndNewDelegateSimilar(l, n), 8695Debug.Assert(node.Type.IsDelegateType()); 8968Debug.Assert(delegateTypeOpt?.IsDelegateType() != false);
Lowering\LocalRewriter\DelegateCacheContainer.cs (1)
59Debug.Assert(delegateType.IsDelegateType());
Operations\CSharpOperationFactory.cs (1)
1115boundConversion.Type.IsDelegateType())
Symbols\Metadata\PE\PEEventSymbol.cs (1)
419(eventType.IsDelegateType() || eventType.IsErrorType()) &&
Symbols\Source\SourceEventSymbol.cs (1)
590else if (!this.Type.IsDelegateType() && !this.Type.IsErrorType())
Symbols\Source\SourceMemberContainerSymbol.cs (1)
3229Debug.Assert(!this.IsDelegateType());
Symbols\TypeSymbolExtensions.cs (3)
386return type.IsDelegateType() ? (NamedTypeSymbol)type : null; 521Debug.Assert(type is FunctionPointerTypeSymbol || type.IsDelegateType()); 548RoslynDebug.Assert(type.IsDelegateType() || type.IsExpressionTree());
Symbols\VarianceSafety.cs (1)
102Debug.Assert(!container.IsDelegateType());
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\WinMdDelegateTests.cs (1)
232if (!fieldType.IsDelegateType())
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
Attributes\AttributeTests_Tuples.cs (1)
345Assert.True(delegate1.IsDelegateType());
FlowAnalysis\FlowTestBase.cs (1)
26if (sourceSymbol == null || sourceSymbol.ContainingType.IsDelegateType())
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Semantics\OperatorTests.cs (3)
8171if (leftType.IsDelegateType() && rightType.IsDelegateType()) 8268leftType.IsDelegateType() && TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2))
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\TypeTests.cs (1)
1614Assert.True(deleType.IsDelegateType());