68 references to IsInterfaceType
Microsoft.CodeAnalysis.CSharp (68)
Binder\Binder_Expressions.cs (2)
6903Debug.Assert(interfaceType.IsInterfaceType()); 8095if (!type.IsInterfaceType())
Binder\Binder_Lookup.cs (1)
806Debug.Assert(!type.IsInterfaceType() && type.TypeKind != TypeKind.TypeParameter);
Binder\Semantics\AccessCheck.cs (1)
570if (baseTypeIsInterface == current.IsInterfaceType() &&
Binder\Semantics\Conversions\ConversionsBase.cs (17)
955if (!baseType.IsInterfaceType()) 2552if (!destination.IsInterfaceType()) 2688if (!destination.IsInterfaceType()) 2704if (source.IsInterfaceType()) 2947if (!destination.IsInterfaceType()) 2974if (!baseType.IsInterfaceType()) 3080if (!s.IsInterfaceType() || !d.IsInterfaceType()) 3485if (source.IsClassType() && destination.IsInterfaceType() && !source.IsSealed && !HasAnyBaseInterfaceConversion(source, destination, ref useSiteInfo)) 3493if (source.IsInterfaceType() && destination.IsClassType() && (!destination.IsSealed || HasAnyBaseInterfaceConversion(destination, source, ref useSiteInfo))) 3503if (source.IsInterfaceType() && destination.IsInterfaceType() && !HasImplicitConversionToInterface(source, destination, ref useSiteInfo)) 3561if ((object)t != null && source.IsInterfaceType() && t.IsReferenceType) 3567if ((object)s != null && s.IsReferenceType && destination.IsInterfaceType() && !HasImplicitReferenceTypeParameterConversion(s, destination, ref useSiteInfo)) 3613if (source.IsInterfaceType() && (object)t != null && !t.IsReferenceType) 3619if ((object)s != null && !s.IsReferenceType && destination.IsInterfaceType() && !HasImplicitReferenceTypeParameterConversion(s, destination, ref useSiteInfo)) 3844if (source.IsInterfaceType() &&
Binder\Semantics\Conversions\UserDefinedExplicitConversions.cs (2)
210if ((object)source != null && source.IsInterfaceType() || target.IsInterfaceType())
Binder\Semantics\Conversions\UserDefinedImplicitConversions.cs (2)
243if ((object)source != null && source.IsInterfaceType() || (object)target != null && target.IsInterfaceType())
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (2)
69bool leftSourceIsInterface = leftOperatorSourceOpt?.IsInterfaceType() == true; 70bool rightSourceIsInterface = rightOperatorSourceOpt?.IsInterfaceType() == true;
Binder\Semantics\Operators\UnaryOperatorOverloadResolution.cs (1)
420if (type0.IsInterfaceType())
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
1634if (currentType.IsInterfaceType() && type.IsInterfaceType() && currentType.AllInterfacesWithDefinitionUseSiteDiagnostics(ref useSiteInfo).Contains((NamedTypeSymbol)type))
CodeGen\EmitExpression.cs (6)
3793else if (expr.Type.IsInterfaceType() && !TypeSymbol.Equals(expr.Type, mergeTypeOfAlternative, TypeCompareKind.ConsiderEverything2)) 3817else if (expr.Type.IsInterfaceType() && !TypeSymbol.Equals(expr.Type, mergeTypeOfConsequence, TypeCompareKind.ConsiderEverything2)) 3854else if (expr.Type.IsInterfaceType() && !TypeSymbol.Equals(expr.Type, mergeTypeOfLeftValue, TypeCompareKind.ConsiderEverything2)) 3907if (!(expr.Type.IsInterfaceType() || expr.Type.IsDelegateType())) 3983(to.IsInterfaceType() && from.IsInterfaceType() && !from.InterfacesAndTheirBaseInterfacesNoUseSiteDiagnostics.ContainsKey((NamedTypeSymbol)to));
Compilation\CSharpSemanticModel.cs (1)
4037var instanceConstructors = typeSymbolOpt.IsInterfaceType() && (object)typeSymbolOpt.ComImportCoClass != null ?
FlowAnalysis\NullableWalker.cs (1)
3943if (constructor is not null && !type.IsInterfaceType())
Lowering\LocalRewriter\LocalRewriter_Event.cs (1)
24if (rewrittenReceiverOpt != null && node.Event.ContainingAssembly.IsLinked && node.Event.ContainingType.IsInterfaceType())
Lowering\LocalRewriter\LocalRewriter_ObjectCreationExpression.cs (2)
79if (node.Type.IsInterfaceType()) 112if (node.Type.IsInterfaceType())
Symbols\ConstraintsHelper.cs (3)
225if (constraintType.Type.IsInterfaceType()) 1170errorCode = constraintType.Type.IsInterfaceType() ? ErrorCode.ERR_GenericConstraintNotSatisfiedNullableInterface : ErrorCode.ERR_GenericConstraintNotSatisfiedNullableEnum; 1383Debug.Assert(iface.IsInterfaceType());
Symbols\Metadata\PE\MetadataDecoder.cs (1)
549!(targetTypeSymbol.IsInterfaceType()
Symbols\Metadata\PE\PENamedTypeSymbol.cs (2)
1067if (!this.IsInterfaceType()) 2347if (!this.IsInterfaceType())
Symbols\OverriddenOrHiddenMembersHelpers.cs (1)
414Debug.Assert(containingType.IsInterfaceType());
Symbols\Retargeting\RetargetingNamedTypeSymbol.cs (1)
145bool isInterface = _underlyingType.IsInterfaceType();
Symbols\Source\ExplicitInterfaceHelpers.cs (1)
203if (!explicitInterfaceType.IsInterfaceType())
Symbols\Source\ParameterHelpers.cs (1)
681ErrorFacts.GetStaticClassParameterCode(containingSymbol?.ContainingType?.IsInterfaceType() ?? false),
Symbols\Source\SourceEventSymbol.cs (1)
681if (this.containingType.IsInterfaceType())
Symbols\Source\SourceFieldLikeEventSymbol.cs (1)
64bool inInterfaceType = containingType.IsInterfaceType();
Symbols\Source\SourceMemberContainerSymbol.cs (1)
2575if (this.IsInterfaceType())
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
719else if (this.ContainingType.IsInterfaceType())
Symbols\Source\SourceNamedTypeSymbol.cs (1)
1333if (this.IsInterfaceType() && (!arguments.HasDecodedData || (object)((TypeWellKnownAttributeData)arguments.DecodedData).ComImportCoClass == null))
Symbols\Source\SourceOrdinaryMethodSymbol.cs (1)
845diagnostics.Add(ErrorFacts.GetStaticClassReturnCode(ContainingType.IsInterfaceType()), location, ReturnType);
Symbols\Source\SourcePropertySymbolBase.cs (2)
1847diagnostics.Add(ErrorFacts.GetStaticClassReturnCode(ContainingType.IsInterfaceType()), TypeLocation, type); 1852diagnostics.Add(ErrorFacts.GetStaticClassParameterCode(ContainingType.IsInterfaceType()), TypeLocation, type);
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (2)
453if (source0.IsInterfaceType() || target0.IsInterfaceType())
Symbols\TypeSymbol.cs (6)
454if (this.IsInterfaceType()) 723Debug.Assert(!this.IsInterfaceType()); 725if (this.IsInterfaceType()) 805Debug.Assert(!implementingType.IsInterfaceType()); 1052Debug.Assert(!implementingType.IsInterfaceType()); 1541Debug.Assert(!implementingType.IsInterfaceType());
Symbols\VarianceSafety.cs (2)
90Debug.Assert(container.IsInterfaceType()); 100if (!container.IsInterfaceType())