26 overrides of TypeKind
Microsoft.CodeAnalysis.CSharp (25)
Lowering\AsyncRewriter\AsyncStateMachine.cs (1)
64public override TypeKind TypeKind
Lowering\ClosureConversion\SynthesizedClosureEnvironment.cs (1)
39public override TypeKind TypeKind { get; }
Lowering\IteratorRewriter\IteratorStateMachine.cs (1)
46public override TypeKind TypeKind
Lowering\LocalRewriter\DelegateCacheContainer.cs (1)
50public override TypeKind TypeKind => TypeKind.Class;
Lowering\LocalRewriter\DynamicSiteContainer.cs (1)
40public override TypeKind TypeKind
Symbols\AnonymousTypes\PublicSymbols\AnonymousManager.TypeOrDelegatePublicSymbol.cs (1)
175public abstract override TypeKind TypeKind { get; }
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.DelegateTemplateSymbol.cs (1)
227public override TypeKind TypeKind => TypeKind.Delegate;
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TemplateSymbol.cs (1)
101public override TypeKind TypeKind
Symbols\ArrayTypeSymbol.cs (1)
297public override TypeKind TypeKind
Symbols\DynamicTypeSymbol.cs (1)
63public override TypeKind TypeKind
Symbols\ErrorTypeSymbol.cs (1)
234public sealed override TypeKind TypeKind
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (1)
77public override TypeKind TypeKind => TypeKind.FunctionPointer;
Symbols\FunctionTypeSymbol.cs (1)
104public override TypeKind TypeKind => TypeKindInternal.FunctionType;
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
2013public override TypeKind TypeKind
Symbols\PointerTypeSymbol.cs (1)
168public override TypeKind TypeKind
Symbols\Source\SourceFixedFieldSymbol.cs (1)
169public override TypeKind TypeKind
Symbols\Source\SourceMemberContainerSymbol.cs (1)
804public override TypeKind TypeKind
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorTypeSymbol.cs (1)
139public override TypeKind TypeKind => TypeKind.Class;
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (1)
816public override TypeKind TypeKind => TypeKind.Class;
Symbols\Synthesized\SynthesizedEmbeddedAttributeSymbol.cs (1)
75public override TypeKind TypeKind => TypeKind.Class;
Symbols\Synthesized\SynthesizedHotReloadExceptionSymbol.cs (1)
92public override TypeKind TypeKind => TypeKind.Class;
Symbols\Synthesized\SynthesizedInlineArrayTypeSymbol.cs (1)
64public override TypeKind TypeKind => TypeKind.Struct;
Symbols\Synthesized\SynthesizedPrivateImplementationDetailsType.cs (1)
57public override TypeKind TypeKind => TypeKind.Class;
Symbols\TypeParameterSymbol.cs (1)
196public sealed override TypeKind TypeKind
Symbols\Wrapped\WrappedNamedTypeSymbol.cs (1)
111public override TypeKind TypeKind
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\MockNamedTypeSymbol.cs (1)
146public override TypeKind TypeKind
650 references to TypeKind
Microsoft.CodeAnalysis.CSharp (312)
Binder\Binder_Attributes.cs (2)
58if (boundTypeSymbol.TypeKind != TypeKind.Error) 728parameter.Type.TypeKind == TypeKind.Array &&
Binder\Binder_Constraints.cs (2)
583switch (type.TypeKind) 628throw ExceptionUtilities.UnexpectedValue(type.TypeKind);
Binder\Binder_Conversions.cs (9)
778switch (type.TypeKind) 2828Debug.Assert(delegateType is NamedTypeSymbol { TypeKind: TypeKind.Delegate, DelegateInvokeMethod: { HasUseSiteError: false } } 2829|| delegateType.TypeKind == TypeKind.FunctionPointer, 2875delegateType.TypeKind, 2885Error(diagnostics, getMethodMismatchErrorCode(delegateType.TypeKind), errorLocation, method, delegateType); 2893Error(diagnostics, getRefMismatchErrorCode(delegateType.TypeKind), errorLocation, method, delegateType); 2904delegateType.TypeKind, 3019Debug.Assert(Conversions.IsAssignableFromMulticastDelegate(delegateOrFuncPtrType, ref discardedUseSiteInfo) || delegateOrFuncPtrType.TypeKind == TypeKind.Delegate || delegateOrFuncPtrType.TypeKind == TypeKind.FunctionPointer);
Binder\Binder_Crefs.cs (3)
737switch (type.TypeKind) 784throw ExceptionUtilities.UnexpectedValue(type.TypeKind); 1177Debug.Assert(type.TypeKind != TypeKind.Error || typeSyntax.ContainsDiagnostics || !typeSyntax.SyntaxTree.ReportDocumentationCommentDiagnostics(), "Why wasn't there a diagnostic?");
Binder\Binder_Expressions.cs (18)
2370if (this.ContainingType.TypeKind == TypeKind.Submission 2374if (memberDeclaringType.TypeKind == TypeKind.Submission) 2825if (targetType.TypeKind != TypeKind.Delegate || 2876var errorCode = targetType.TypeKind switch 4841if ((containingType.TypeKind == TypeKind.Enum || containingType.TypeKind == TypeKind.Struct) && initializerArgumentListOpt == null) 4892else if (initializerArgumentListOpt != null && containingType.TypeKind == TypeKind.Struct) 5213switch (type.TypeKind) 5232throw ExceptionUtilities.UnexpectedValue(type.TypeKind); 5249throw ExceptionUtilities.UnexpectedValue(type.TypeKind); 5462else if (argument.Type.TypeKind == TypeKind.Delegate) 5562Debug.Assert(type.TypeKind is TypeKind.Class or TypeKind.Struct); 6971Debug.Assert(coClassType.TypeKind == TypeKind.Class || coClassType.TypeKind == TypeKind.Error); 7318if (type.TypeKind == TypeKind.Enum) 7900if (leftType.TypeKind == TypeKind.TypeParameter) 9048if (receiverOpt is not BoundTypeExpression { Type: { TypeKind: TypeKind.TypeParameter } }) 9626switch (exprType.TypeKind)
Binder\Binder_InterpolatedString.cs (2)
397if (value.Type?.TypeKind == TypeKind.Dynamic) 433&& unconvertedInterpolatedString.Parts.All(p => p is not BoundStringInsert { Value.Type.TypeKind: TypeKind.Dynamic });
Binder\Binder_Lookup.cs (4)
255switch (type.TypeKind) 287throw ExceptionUtilities.UnexpectedValue(type.TypeKind); 872Debug.Assert(!type.IsInterfaceType() && type.TypeKind != TypeKind.TypeParameter); 1935switch (type.TypeKind)
Binder\Binder_Operators.cs (10)
1005leftType?.TypeKind == TypeKind.FunctionPointer && rightType?.TypeKind == TypeKind.FunctionPointer) 1269(object)left.Type != null && left.Type.TypeKind == TypeKind.Delegate) 4638return targetType.TypeKind == TypeKind.Error; 4695var targetTypeKind = targetType.TypeKind; 4749if (operandType.TypeKind == TypeKind.Dynamic) 5122var targetTypeKind = targetType.TypeKind; 5226var operandTypeKind = operandType.TypeKind; 5240operandTypeKind = operandType.TypeKind; 5247targetTypeKind = targetType.TypeKind;
Binder\Binder_Patterns.cs (1)
1253if (iTupleType.TypeKind != TypeKind.Interface)
Binder\Binder_Query.cs (1)
963if (ultimateReceiver.Type.TypeKind == TypeKind.TypeParameter)
Binder\Binder_QueryErrors.cs (1)
82if (instanceType.TypeKind == TypeKind.Array || name == "Cast" && HasCastToQueryProvider(instanceType, ref useSiteInfo))
Binder\Binder_Statements.cs (3)
2348if (targetType.TypeKind == TypeKind.Error) 2408if (targetType.TypeKind == TypeKind.TypeParameter) 2505switch (targetType.TypeKind)
Binder\ForEachLoopBinder.cs (3)
1650switch (enumeratorType.TypeKind) 1661throw ExceptionUtilities.UnexpectedValue(enumeratorType.TypeKind); 1845if (type.TypeKind == TypeKind.TypeParameter)
Binder\PatternExplainer.cs (1)
649if (type is NamedTypeSymbol { TypeKind: TypeKind.Enum } e)
Binder\Semantics\AccessCheck.cs (3)
368if (containingType.TypeKind == TypeKind.Submission) 430if (originalContainingType.TypeKind == TypeKind.Submission) 700: containingType.TypeKind == TypeKind.Struct ? ErrorCode.ERR_ProtectedInStruct
Binder\Semantics\Conversions\Conversions.cs (1)
524if (spanType.TypeKind == TypeKind.Struct && spanType.IsRefLikeType)
Binder\Semantics\Conversions\ConversionsBase.cs (3)
2179if (otherType.TypeKind == TypeKind.Enum) 2648switch (source.TypeKind) 3308if ((source.TypeKind == TypeKind.TypeParameter) &&
Binder\Semantics\Conversions\UserDefinedExplicitConversions.cs (1)
266if (op.ReturnsVoid || op.ParameterCount != 1 || op.ReturnType.TypeKind == TypeKind.Error)
Binder\Semantics\Operators\OperatorFacts.cs (1)
19switch (type.TypeKind)
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (7)
2261if (target.TypeKind != TypeKind.Class) 2280if (source.TypeKind == TypeKind.Class) 2284else if (source.TypeKind == TypeKind.TypeParameter) 2320switch (source.TypeKind) 2658if (source.TypeKind != TypeKind.Class || target.TypeKind != TypeKind.Class) 2697switch (target.TypeKind)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (3)
2496if (m1.Member.ContainingType.TypeKind == TypeKind.Submission && m2.Member.ContainingType.TypeKind == TypeKind.Submission) 2803if (t1.TypeKind == TypeKind.Pointer)
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (2)
1222else if (argument.Kind == BoundKind.MethodGroup && parameterType.TypeKind == TypeKind.Delegate && 1227else if (argument.Kind == BoundKind.MethodGroup && parameterType.TypeKind == TypeKind.FunctionPointer)
BoundTree\BoundDagTest.cs (1)
83var typeName = b.Type.TypeKind == TypeKind.Error ? "<error type>" : b.Type.ToString();
CodeGen\EmitAddress.cs (3)
420Debug.Assert(arrayAccess.Type.TypeKind == TypeKind.TypeParameter, "constrained call should only be used with type parameter types"); 530Debug.Assert(receiverType.TypeKind == TypeKind.TypeParameter || receiverType.IsValueType); 537return receiverType.TypeKind == TypeKind.TypeParameter && addressKind != AddressKind.Constrained;
CodeGen\EmitConversion.cs (1)
331if (receiver is not BoundTypeExpression { Type: { TypeKind: TypeKind.TypeParameter } })
CodeGen\EmitExpression.cs (8)
443(receiverType.IsReferenceType && receiverType.TypeKind == TypeKind.TypeParameter) || 820Debug.Assert(thisType.TypeKind != TypeKind.TypeParameter); 1097if (elementType.TypeKind == TypeKind.TypeParameter) 1685if (receiver is not BoundTypeExpression { Type: { TypeKind: TypeKind.TypeParameter } }) 2686if (left.Kind == BoundKind.ArrayAccess && left.Type.TypeKind == TypeKind.TypeParameter && !left.Type.IsValueType) 3523if (type is { TypeKind: TypeKind.TypeParameter } && constantValue.IsNull) 4145Debug.Assert(load.Type is { TypeKind: TypeKind.FunctionPointer }); 4151if (load.ConstrainedToTypeOpt is not { TypeKind: TypeKind.TypeParameter })
CodeGen\EmitStackAllocInitializer.cs (1)
27var elementType = (type.TypeKind == TypeKind.Pointer
CodeGen\EmitStatement.cs (1)
180if (exprType?.TypeKind == TypeKind.TypeParameter)
CodeGen\Optimizer.cs (2)
1181if ((method.IsAbstract || method.IsVirtual) && receiver is BoundTypeExpression { Type: { TypeKind: TypeKind.TypeParameter } } typeExpression) 2272if (receiverOpt is BoundTypeExpression { AliasOpt: null, BoundContainingTypeOpt: null, BoundDimensionsOpt: { IsEmpty: true }, Type: { TypeKind: TypeKind.TypeParameter } } typeExpression)
Compilation\CSharpCompilation.cs (8)
1958if (mainType is null || mainType.IsGenericType || (mainType.TypeKind != TypeKind.Class && mainType.TypeKind != TypeKind.Struct && !mainType.IsInterface)) 4303if (csharpReturnType.TypeKind is TypeKind.Dynamic || 4304csharpLeftType.TypeKind is TypeKind.Dynamic || 4305csharpRightType.TypeKind is TypeKind.Dynamic) 4347if (csharpLeftType.TypeKind is TypeKind.Delegate && 4529if (csharpReturnType.TypeKind is TypeKind.Dynamic || 4530csharpOperandType.TypeKind is TypeKind.Dynamic)
Compilation\CSharpSemanticModel.cs (3)
549if (varTypeInfo.Type is { TypeKind: not TypeKind.Error }) 979if (varTypeInfo.Type is { TypeKind: not TypeKind.Error }) 2253else if (boundExpr is BoundConversion { ConversionKind: ConversionKind.MethodGroup, Conversion: var exprConversion, Type: { TypeKind: TypeKind.FunctionPointer }, SymbolOpt: var symbol })
Compiler\ClsComplianceChecker.cs (8)
254if (symbol.TypeKind == TypeKind.Delegate) 474if (type.TypeKind == TypeKind.Delegate) 738System.Diagnostics.Debug.Assert(method.ContainingType.TypeKind == TypeKind.Delegate); 983switch (type.TypeKind) 1008throw ExceptionUtilities.UnexpectedValue(type.TypeKind); 1032if (type.TypeKind == TypeKind.Error) 1372TypeKind typeKind = xType.TypeKind; 1373if (yType.TypeKind != typeKind)
Compiler\MethodCompiler.cs (1)
643containingType is { IsImplicitlyDeclared: false, TypeKind: TypeKind.Class or TypeKind.Struct or TypeKind.Interface } &&
Emitter\Model\MethodSymbolAdapter.cs (1)
636return this.IsExtern || (object)ContainingType != null && ContainingType.TypeKind == TypeKind.Delegate;
Emitter\Model\NamedTypeSymbolAdapter.cs (2)
45get { return AdaptedNamedTypeSymbol.TypeKind == TypeKind.Enum; } 521switch (AdaptedNamedTypeSymbol.TypeKind)
Emitter\NoPia\EmbeddedType.cs (1)
156switch (UnderlyingNamedType.AdaptedNamedTypeSymbol.TypeKind)
Emitter\NoPia\EmbeddedTypesManager.cs (8)
266switch (namedType.TypeKind) 400Debug.Assert(namedType.TypeKind == TypeKind.Struct || namedType.TypeKind == TypeKind.Enum || namedType.TypeKind == TypeKind.Delegate); 403if (namedType.TypeKind == TypeKind.Struct || namedType.TypeKind == TypeKind.Enum) 453var containerKind = field.AdaptedFieldSymbol.ContainingType.TypeKind; 490switch (type.UnderlyingNamedType.AdaptedNamedTypeSymbol.TypeKind)
FlowAnalysis\AbstractFlowPass.cs (1)
2242fieldSymbol.ContainingType.TypeKind == TypeKind.Struct &&
FlowAnalysis\DefiniteAssignment.cs (5)
103&& CurrentSymbol is MethodSymbol { MethodKind: MethodKind.Constructor, ContainingType.TypeKind: TypeKind.Struct }; 1132(_trackClassFields || type.TypeKind == TypeKind.Struct); 1259Debug.Assert(CurrentSymbol is MethodSymbol { MethodKind: MethodKind.Constructor, ContainingType.TypeKind: TypeKind.Struct }); 1312if (CurrentSymbol is not MethodSymbol { MethodKind: MethodKind.Constructor, ContainingType.TypeKind: TypeKind.Struct }) 2637switch (type.TypeKind)
FlowAnalysis\EmptyStructTypeCache.cs (1)
233switch (type.TypeKind)
FlowAnalysis\NullableWalker.cs (7)
2460return valueType.Type?.TypeKind == TypeKind.TypeParameter && 4648if (type.TypeKind != TypeKind.Struct) 4801_ => throw ExceptionUtilities.UnexpectedValue(type.TypeKind) 4878_ => throw ExceptionUtilities.UnexpectedValue(type.TypeKind) 5800{ TypeKind: TypeKind.Interface } => type.AllInterfacesNoUseSiteDiagnostics, 9362NamedTypeSymbol { TypeKind: TypeKind.Delegate, DelegateInvokeMethod: { Parameters: { } parameters } signature } => (signature, parameters), 10121case BoundExpression arg when arg.Type is { TypeKind: TypeKind.Delegate }:
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (2)
562LocalSymbol thisTemp = (F.CurrentType.TypeKind == TypeKind.Class) ? F.SynthesizedLocal(F.CurrentType) : null; 623LocalSymbol thisTemp = (F.CurrentType.TypeKind == TypeKind.Class) ? F.SynthesizedLocal(F.CurrentType) : null;
Lowering\AsyncRewriter\AsyncRewriter.cs (3)
172if (F.CurrentType.TypeKind == TypeKind.Class) 195if (stateMachineType.TypeKind == TypeKind.Class) 204if (frameType.TypeKind == TypeKind.Class)
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (2)
603if (e.StrippedType().TypeKind == TypeKind.Enum) 799if ((object)d != null && d.TypeKind == TypeKind.Delegate)
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (1)
241_ when variableType.TypeKind is TypeKind.Struct
Lowering\LocalRewriter\LocalRewriter.cs (1)
843Debug.Assert(node.Expression.Type is { TypeKind: TypeKind.Array });
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (4)
2278Debug.Assert(loweredLeft.Type is { TypeKind: TypeKind.Pointer }); 2283Debug.Assert(loweredRight.Type is { TypeKind: TypeKind.Pointer }); 2470Debug.Assert(loweredLeft.Type is { TypeKind: TypeKind.Pointer }); 2471Debug.Assert(loweredRight.Type is { TypeKind: TypeKind.Pointer });
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (1)
548case ConversionKind.MethodGroup when oldNodeOpt is { Type: { TypeKind: TypeKind.FunctionPointer } funcPtrType }:
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (2)
213else if (fixedCollectionInitializer.Expression.Type is { TypeKind: TypeKind.Array }) 241Debug.Assert(initializerExpr.Type is { TypeKind: TypeKind.Pointer });
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (4)
864Debug.Assert(collectionExpression.Type is { TypeKind: TypeKind.Array }); 892Debug.Assert(collectionExpression.Type is { TypeKind: TypeKind.Array }); 1013Debug.Assert(collectionExpression.Type is { TypeKind: TypeKind.Array }); 1041Debug.Assert(collectionExpression.Type is { TypeKind: TypeKind.Array });
Lowering\LocalRewriter\LocalRewriter_PropertyAccess.cs (1)
37if (rewrittenReceiverOpt is { Type: { TypeKind: TypeKind.Array } } && !isLeftOfAssignment)
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (1)
931Debug.Assert(binaryOperand.Type is { TypeKind: TypeKind.Pointer });
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (1)
64if (!method.IsStatic && method.ContainingType.TypeKind == TypeKind.Struct)
Lowering\SyntheticBoundNodeFactory.cs (3)
1178Debug.Assert(array.Type is { TypeKind: TypeKind.Array }); 1184Debug.Assert(array.Type is { TypeKind: TypeKind.Array }); 1197Debug.Assert(array.Type is { TypeKind: TypeKind.Array });
Symbols\ArrayTypeSymbol.cs (1)
379while (current.TypeKind == TypeKind.Array)
Symbols\AssemblySymbol.cs (3)
501return GetSpecialType(SpecialType.System_Runtime_CompilerServices_RuntimeFeature) is { TypeKind: TypeKind.Class, IsStatic: true } && 524GetSpecialType(SpecialType.System_Runtime_CompilerServices_PreserveBaseOverridesAttribute) is { TypeKind: TypeKind.Class }; 1029if (result is null || result.TypeKind == TypeKind.Error)
Symbols\BaseTypeAnalysis.cs (1)
118if (fieldType is null || fieldType.TypeKind != TypeKind.Struct || field.IsStatic)
Symbols\Compilation_WellKnownMembers.cs (2)
223if (type.Kind != SymbolKind.NamedType || type.TypeKind != TypeKind.Class) 954switch (type.TypeKind)
Symbols\ConstantValueUtils.cs (1)
89if (typeSymbol.TypeKind == TypeKind.TypeParameter)
Symbols\ConstraintsHelper.cs (5)
242if (underlyingType.TypeKind == TypeKind.TypeParameter) 1483switch (typeArgument.TypeKind) 1508throw ExceptionUtilities.UnexpectedValue(typeArgument.TypeKind); 1517Debug.Assert(type.TypeKind is TypeKind.Class or TypeKind.Struct); 1565switch (type.TypeKind)
Symbols\DynamicTypeSymbol.cs (1)
205if (ReferenceEquals(this, t2) || t2.TypeKind == TypeKind.Dynamic)
Symbols\ExtendedErrorTypeSymbol.cs (6)
224if ((object?)oldSymbol == null || oldSymbol.TypeKind != TypeKind.Error) 252if (oldSymbol.TypeKind != TypeKind.Error) 254return oldSymbol.TypeKind; 273if ((object?)type != null && type.TypeKind != TypeKind.Error) 276commonTypeKind = type.TypeKind; 277else if (commonTypeKind != type.TypeKind)
Symbols\Extensions\SynthesizedExtensionMarker.cs (1)
104else if (parameterRefKind is RefKind.In or RefKind.RefReadOnlyParameter && parameterType.TypeKind != TypeKind.Struct)
Symbols\Metadata\PE\MetadataDecoder.cs (1)
395switch (candidate.TypeKind)
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (2)
84switch (type.TypeKind) 102Debug.Assert(type.TypeKind == TypeKind.Error);
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
1313if ((this.ContainingType.TypeKind == TypeKind.Class && this.IsRuntimeFinalizer(skipFirstMethodKindCheck: true)) ||
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
2771var coClassType = ((object)type != null && (type.TypeKind == TypeKind.Class || type.IsErrorType())) ? (NamedTypeSymbol)type : null;
Symbols\Metadata\PE\TupleTypeDecoder.cs (1)
200throw ExceptionUtilities.UnexpectedValue(type.TypeKind);
Symbols\MissingMetadataTypeSymbol.cs (1)
376t2.TypeKind == TypeKind.Dynamic &&
Symbols\NamedTypeSymbol.cs (8)
178if (TypeKind != TypeKind.Delegate) 364(thisParam.RefKind is RefKind.In or RefKind.RefReadOnlyParameter && thisParam.Type.TypeKind != TypeKind.Struct)) 398var kind = TypeKind; 412var kind = TypeKind; 446return TypeKind == TypeKind.Submission; 465var name = (TypeKind == TypeKind.Submission) ? SynthesizedEntryPointSymbol.FactoryName : SynthesizedEntryPointSymbol.MainName; 815if (t2.TypeKind == TypeKind.Dynamic) 1641/// Requires less computation than <see cref="TypeSymbol.TypeKind"/> == <see cref="TypeKind.Interface"/>.
Symbols\PointerTypeSymbol.cs (1)
222while (current.TypeKind == TypeKind.Pointer)
Symbols\PublicModel\TypeSymbol.cs (1)
144return UnderlyingTypeSymbol.TypeKind;
Symbols\Retargeting\RetargetingSymbolTranslator.cs (2)
842Debug.Assert(nts.TypeKind == TypeKind.Error || nts.PrimitiveTypeCode == Cci.PrimitiveTypeCode.NotPrimitive); 854Debug.Assert(ts.TypeKind == TypeKind.Error || ts.PrimitiveTypeCode == Cci.PrimitiveTypeCode.NotPrimitive);
Symbols\Source\ExplicitInterfaceHelpers.cs (1)
191switch (containingType.TypeKind)
Symbols\Source\SourceAssemblySymbol.cs (1)
2224Debug.Assert(forwardedType.TypeKind != TypeKind.Error);
Symbols\Source\SourceDelegateMethodSymbol.cs (2)
80if (binder.Compilation.GetSpecialType(SpecialType.System_IAsyncResult).TypeKind != TypeKind.Error && 81binder.Compilation.GetSpecialType(SpecialType.System_AsyncCallback).TypeKind != TypeKind.Error &&
Symbols\Source\SourceEventSymbol.cs (4)
628else if (IsAbstract && ContainingType.TypeKind == TypeKind.Struct) 633else if (IsVirtual && ContainingType.TypeKind == TypeKind.Struct) 674else if (IsAbstract && !ContainingType.IsAbstract && (ContainingType.TypeKind == TypeKind.Class || ContainingType.TypeKind == TypeKind.Submission))
Symbols\Source\SourceMemberContainerSymbol.cs (4)
2662(type.TypeKind == TypeKind.Struct) && 2993if (f is null || !f.IsStatic || f.Type.TypeKind != TypeKind.Struct) continue; 3022if (f is null || !f.IsStatic || f.Type.TypeKind != TypeKind.Struct) continue; 3853if (type.TypeKind == TypeKind.Extension)
Symbols\Source\SourceMemberFieldSymbol.cs (1)
574if (ContainingType.TypeKind != TypeKind.Struct)
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1473if (ContainingSymbol is NamedTypeSymbol { IsComImport: true, TypeKind: TypeKind.Class or TypeKind.Interface })
Symbols\Source\SourceNamedTypeSymbol.cs (2)
1242return builderType is NamedTypeSymbol { TypeKind: TypeKind.Class or TypeKind.Struct, IsGenericType: false }; 1349if ((object)coClassType != null && coClassType.TypeKind == TypeKind.Class)
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (9)
312else if (baseType.TypeKind == TypeKind.Error && (object)partBase != null) 319else if ((object)partBase != null && !TypeSymbol.Equals(partBase, baseType, TypeCompareKind.ConsiderEverything) && partBase.TypeKind != TypeKind.Error) 508if (baseType.TypeKind == TypeKind.Error) 520if ((baseType.TypeKind == TypeKind.Class || 521baseType.TypeKind == TypeKind.Delegate || 522baseType.TypeKind == TypeKind.Struct || 548switch (baseType.TypeKind) 614throw ExceptionUtilities.UnexpectedValue(baseType.TypeKind); 633(TypeKind != TypeKind.Class || baseType.TypeKind == TypeKind.Interface || ((TypeDeclarationSyntax)decl.SyntaxReference.GetSyntax()).ParameterList is null))
Symbols\Source\SourceOrdinaryMethodSymbol.cs (5)
864else if (IsSealed && ContainingType.TypeKind == TypeKind.Struct) 886else if (IsAbstract && ContainingType.TypeKind == TypeKind.Struct) 891else if (IsVirtual && ContainingType.TypeKind == TypeKind.Struct) 901else if (IsAbstract && !ContainingType.IsAbstract && (ContainingType.TypeKind == TypeKind.Class || ContainingType.TypeKind == TypeKind.Submission))
Symbols\Source\SourcePropertyAccessorSymbol.cs (3)
530if (IsAbstract && !ContainingType.IsAbstract && (ContainingType.TypeKind == TypeKind.Class || ContainingType.TypeKind == TypeKind.Submission)) 535else if (IsVirtual && ContainingType.IsSealed && ContainingType.TypeKind != TypeKind.Struct) // error CS0106 on struct already
Symbols\Source\SourcePropertySymbolBase.cs (2)
1117else if (IsAbstract && ContainingType.TypeKind == TypeKind.Struct) 1122else if (IsVirtual && ContainingType.TypeKind == TypeKind.Struct)
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (1)
422case { TypeKind: TypeKind.TypeParameter, IsReferenceType: false }:
Symbols\Source\ThisParameterSymbol.cs (1)
152if (ContainingType?.TypeKind != TypeKind.Struct)
Symbols\Symbol.cs (3)
257if (ContainingType?.TypeKind == TypeKind.Submission) 279if (ContainingType.TypeKind == TypeKind.Submission) 290Debug.Assert(ContainingType.TypeKind != TypeKind.Submission);
Symbols\Symbol_Attributes.cs (2)
68switch (namedType.TypeKind) 90throw ExceptionUtilities.UnexpectedValue(namedType.TypeKind);
Symbols\SymbolExtensions.cs (3)
84return superType.TypeKind == TypeKind.Submission && subType.TypeKind == TypeKind.Submission; 238if (type.TypeKind == TypeKind.TypeParameter)
Symbols\Synthesized\SynthesizedContainer.cs (3)
48internal sealed override bool IsInterface => this.TypeKind == TypeKind.Interface; 90public override bool IsAbstract => (object)Constructor == null && this.TypeKind != TypeKind.Struct; 164internal override NamedTypeSymbol BaseTypeNoUseSiteDiagnostics => ContainingAssembly.GetSpecialType(this.TypeKind == TypeKind.Struct ? SpecialType.System_ValueType : SpecialType.System_Object);
Symbols\Synthesized\SynthesizedInstanceConstructor.cs (2)
84Debug.Assert(_containingType.TypeKind == TypeKind.Class); 88if (_containingType.TypeKind == TypeKind.Delegate)
Symbols\Synthesized\SynthesizedSubmissionConstructor.cs (1)
19Debug.Assert(containingType.TypeKind == TypeKind.Submission);
Symbols\TypeParameterSymbol.cs (3)
394if (constraint.TypeKind == TypeKind.TypeParameter) 404Debug.Assert(constraint.TypeKind != TypeKind.TypeParameter); 412switch (constraint.TypeKind)
Symbols\TypeSymbol.cs (6)
108var interfaces = (baseType.TypeKind == TypeKind.TypeParameter) ? ((TypeParameterSymbol)baseType).EffectiveInterfacesNoUseSiteDiagnostics : baseType.InterfacesNoUseSiteDiagnostics(); 344var interfaces = (baseType.TypeKind == TypeKind.TypeParameter) ? ((TypeParameterSymbol)baseType).EffectiveInterfacesNoUseSiteDiagnostics : baseType.InterfacesNoUseSiteDiagnostics(); 507=> TypeKind switch 560=> TypeKind == TypeKind.Extension; 2519TypeKind ITypeSymbolInternal.TypeKind => this.TypeKind; 2545if (this.TypeKind == TypeKind.Struct)
Symbols\TypeSymbolExtensions.cs (31)
72if (type.TypeKind != TypeKind.TypeParameter) 118if (type.TypeKind == TypeKind.TypeParameter) 223return type.TypeKind == TypeKind.Enum; 316switch (type.TypeKind) 336return type.TypeKind == TypeKind.Class; 342return type.TypeKind == TypeKind.Struct; 358return type.TypeKind == TypeKind.Dynamic; 364return type.TypeKind == TypeKind.TypeParameter; 370return type.TypeKind == TypeKind.Array; 376return type.TypeKind == TypeKind.Array && ((ArrayTypeSymbol)type).IsSZArray; 401return type.TypeKind == TypeKind.FunctionPointer; 406switch (type.TypeKind) 419switch (type.TypeKind) 571return type.TypeKind == TypeKind.Delegate; 700switch (type.TypeKind) 775switch (current.TypeKind) 833switch (current.TypeKind) 943throw ExceptionUtilities.UnexpectedValue(current.TypeKind); 1166if (ReferenceEquals(parent2.OriginalDefinition, parent1OriginalDefinition) || parent1OriginalDefinition.TypeKind == TypeKind.Submission && parent2.TypeKind == TypeKind.Submission) 1206(type, parameter, unused) => type.TypeKind == TypeKind.TypeParameter && (parameter is null || TypeSymbol.Equals(type, parameter, TypeCompareKind.ConsiderEverything2)); 1217(type, parameterContainer, unused) => type.TypeKind == TypeKind.TypeParameter && (object)type.ContainingSymbol == (object)parameterContainer; 1226(type, parameters, unused) => type.TypeKind == TypeKind.TypeParameter && parameters.Contains((TypeParameterSymbol)type); 1235(type, _, _) => type.TypeKind == TypeKind.TypeParameter && type.ContainingSymbol is MethodSymbol; 1246private static readonly Func<TypeSymbol, object?, bool, bool> s_containsDynamicPredicate = (type, unused1, unused2) => type.TypeKind == TypeKind.Dynamic; 1284type.VisitType((TypeSymbol t, object? _, bool _) => t.TypeKind is TypeKind.Pointer or TypeKind.FunctionPointer, null) is object; 1509switch (type.TypeKind) 1531throw ExceptionUtilities.UnexpectedValue(type.TypeKind); 1671return type.IsReferenceType && type.TypeKind != TypeKind.TypeParameter; 1679return type.IsValueType && type.TypeKind != TypeKind.TypeParameter; 2004if (taskType.TypeKind == TypeKind.Error)
Symbols\TypeWithAnnotations.cs (3)
200if (typeSymbol.TypeKind != TypeKind.TypeParameter) 271public TypeKind TypeKind => Type.TypeKind; 650if (type.TypeKind != TypeKind.Array)
Symbols\VarianceSafety.cs (3)
73switch (member.TypeKind) 86throw ExceptionUtilities.UnexpectedValue(member.TypeKind); 371switch (namedType.TypeKind)
Symbols\Wrapped\WrappedNamedTypeSymbol.cs (1)
115return _underlyingType.TypeKind;
Utilities\TypeSymbolExtensions.cs (4)
181switch (type.TypeKind) 206throw ExceptionUtilities.UnexpectedValue(type.TypeKind); 276switch (type.TypeKind) 286throw ExceptionUtilities.UnexpectedValue(type.TypeKind);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (27)
CodeGen\CodeGenAsyncTests.cs (3)
71Assert.Equal(TypeKind.Struct, stateMachine.TypeKind); 80Assert.Equal(TypeKind.Struct, stateMachine.TypeKind); 89Assert.Equal(TypeKind.Class, stateMachine.TypeKind);
CodeGen\CodeGenAwaitUsingTests.cs (1)
3057Assert.Equal(TypeKind.Error, comp.GetWellKnownType(WellKnownType.System_IAsyncDisposable).TypeKind);
CodeGen\CodeGenFunctionPointersTests.cs (2)
302Assert.Equal(TypeKind.FunctionPointer, field.Type.TypeKind); 378Assert.Equal(TypeKind.FunctionPointer, field.Type.TypeKind);
CodeGen\CodeGenTupleTest.cs (6)
3350Assert.Equal(TypeKind.Error, mTuple.TupleUnderlyingType.TypeKind); 3353Assert.Equal(TypeKind.Error, mTuple.TypeKind); 11154Assert.Equal(TypeKind.Struct, m1Tuple.TypeKind); 11418Assert.Equal(TypeKind.Struct, m1Tuple.TypeKind); 12736Assert.Equal(TypeKind.Struct, m1Tuple.TypeKind); 23928Assert.Equal(TypeKind.Class, compilation.GetWellKnownType(WellKnownType.System_ValueTuple_T2).TypeKind);
Emit\EmitMetadataTests.cs (6)
318Assert.Equal(TypeKind.Interface, i1.TypeKind); 319Assert.Equal(TypeKind.Interface, i2.TypeKind); 320Assert.Equal(TypeKind.Interface, i3.TypeKind); 321Assert.Equal(TypeKind.Class, classA.TypeKind); 322Assert.Equal(TypeKind.Class, classB.TypeKind); 2076Assert.Equal(TypeKind.Interface, beginInvoke.ReturnType.TypeKind);
Emit\NoPiaEmbedTypes.cs (9)
1218Assert.Equal(TypeKind.Interface, itest3.TypeKind); 1231Assert.Equal(TypeKind.Struct, test5.TypeKind); 1249Assert.Equal(TypeKind.Interface, itest6.TypeKind); 1252Assert.Equal(TypeKind.Interface, itest7.TypeKind); 1255Assert.Equal(TypeKind.Interface, itest8.TypeKind); 1314Assert.Equal(TypeKind.Struct, test10.TypeKind); 1417Assert.Equal(TypeKind.Interface, itest13.TypeKind); 1438Assert.Equal(TypeKind.Interface, itest14.TypeKind); 1448Assert.Equal(TypeKind.Interface, itest16.TypeKind);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (9)
Semantics\PrimaryConstructorTests.cs (8)
438if (c.TypeKind == TypeKind.Struct) 524Assert.Equal(c.TypeKind != TypeKind.Struct ? 1 : 2, c.InstanceConstructors.Length); 533if (c.TypeKind == TypeKind.Struct) 628if (c.TypeKind == TypeKind.Struct) 825switch (c.TypeKind) 864switch (c.TypeKind) 900switch (c.TypeKind) 932switch (c.TypeKind)
Semantics\RecordTests.cs (1)
119Assert.Equal(TypeKind.Class, point.TypeKind);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (81)
Semantics\ForEachTests.cs (2)
1682Assert.Equal(TypeKind.Dynamic, ((BoundConversion)boundNode.Expression).Operand.Type.TypeKind); 1702Assert.Equal(TypeKind.Dynamic, info.ElementType.TypeKind); //NB: differs from explicit case
Semantics\NativeIntegerTests.cs (2)
229Assert.Equal(TypeKind.Struct, type.TypeKind); 732Assert.Equal(TypeKind.Error, type.TypeKind);
Semantics\NullableReferenceTypesTests.cs (30)
116661Assert.Equal(TypeKind.Struct, compilation1.GetTypeByMetadataName("A").TypeKind); 116662Assert.Equal(TypeKind.Enum, compilation1.GetTypeByMetadataName("B").TypeKind); 116663Assert.Equal(TypeKind.Class, compilation1.GetTypeByMetadataName("C").TypeKind); 116664Assert.Equal(TypeKind.Delegate, compilation1.GetTypeByMetadataName("D").TypeKind); 116665Assert.Equal(TypeKind.Interface, compilation1.GetTypeByMetadataName("I1").TypeKind); 116681Assert.Equal(TypeKind.Struct, compilation2.GetTypeByMetadataName("A").TypeKind); 116682Assert.Equal(TypeKind.Enum, compilation2.GetTypeByMetadataName("B").TypeKind); 116683Assert.Equal(TypeKind.Class, compilation2.GetTypeByMetadataName("C").TypeKind); 116684Assert.Equal(TypeKind.Delegate, compilation2.GetTypeByMetadataName("D").TypeKind); 116685Assert.Equal(TypeKind.Interface, compilation2.GetTypeByMetadataName("I1").TypeKind); 116692Assert.Equal(TypeKind.Struct, compilation3.GetTypeByMetadataName("A").TypeKind); 116693Assert.Equal(TypeKind.Enum, compilation3.GetTypeByMetadataName("B").TypeKind); 116694Assert.Equal(TypeKind.Class, compilation3.GetTypeByMetadataName("C").TypeKind); 116695Assert.Equal(TypeKind.Delegate, compilation3.GetTypeByMetadataName("D").TypeKind); 116696Assert.Equal(TypeKind.Interface, compilation3.GetTypeByMetadataName("I1").TypeKind); 116717Assert.Equal(TypeKind.Class, a.TypeKind); 116719Assert.Equal(TypeKind.Class, b.TypeKind); 116721Assert.Equal(TypeKind.Class, c.TypeKind); 116723Assert.Equal(TypeKind.Class, d.TypeKind); 116725Assert.Equal(TypeKind.Interface, i1.TypeKind); 116785Assert.Equal(TypeKind.Class, a.TypeKind); 116787Assert.Equal(TypeKind.Class, b.TypeKind); 116789Assert.Equal(TypeKind.Class, c.TypeKind); 116791Assert.Equal(TypeKind.Class, d.TypeKind); 116793Assert.Equal(TypeKind.Interface, i1.TypeKind); 116801Assert.Equal(TypeKind.Struct, compilation7.GetTypeByMetadataName("A").TypeKind); 116802Assert.Equal(TypeKind.Enum, compilation7.GetTypeByMetadataName("B").TypeKind); 116803Assert.Equal(TypeKind.Class, compilation7.GetTypeByMetadataName("C").TypeKind); 116804Assert.Equal(TypeKind.Delegate, compilation7.GetTypeByMetadataName("D").TypeKind); 116805Assert.Equal(TypeKind.Interface, compilation7.GetTypeByMetadataName("I1").TypeKind);
Semantics\OverloadResolutionTests.cs (2)
976Assert.Equal(TypeKind.Error, type.TypeKind); 982Assert.Equal(TypeKind.Error, ((NamedTypeSymbol)type).TypeArguments()[0].TypeKind);
Semantics\RecordStructTests.cs (2)
394Assert.Equal(TypeKind.Struct, point.TypeKind); 484Assert.Equal(TypeKind.Struct, point.TypeKind);
Semantics\ScriptSemanticsTests.cs (7)
454Assert.Equal(TypeKind.Class, members[0].TypeKind); 459Assert.Equal(TypeKind.Class, members[0].TypeKind); 463Assert.Equal(TypeKind.Interface, members[0].TypeKind); 467Assert.Equal(TypeKind.Struct, members[0].TypeKind); 471Assert.Equal(TypeKind.Enum, members[0].TypeKind); 475Assert.Equal(TypeKind.Delegate, members[0].TypeKind); 602Assert.NotEqual(TypeKind.Submission, type.TypeKind);
Semantics\UnsafeTests.cs (1)
8859Assert.Equal(TypeKind.Pointer, pointerType.TypeKind);
Semantics\UseSiteErrorTests.cs (35)
2309Assert.Equal(TypeKind.Struct, compilation1.GetTypeByMetadataName("A").TypeKind); 2310Assert.Equal(TypeKind.Enum, compilation1.GetTypeByMetadataName("B").TypeKind); 2311Assert.Equal(TypeKind.Class, compilation1.GetTypeByMetadataName("C").TypeKind); 2312Assert.Equal(TypeKind.Delegate, compilation1.GetTypeByMetadataName("D").TypeKind); 2313Assert.Equal(TypeKind.Interface, compilation1.GetTypeByMetadataName("I1").TypeKind); 2327Assert.Equal(TypeKind.Struct, compilation2.GetTypeByMetadataName("A").TypeKind); 2328Assert.Equal(TypeKind.Enum, compilation2.GetTypeByMetadataName("B").TypeKind); 2329Assert.Equal(TypeKind.Class, compilation2.GetTypeByMetadataName("C").TypeKind); 2330Assert.Equal(TypeKind.Delegate, compilation2.GetTypeByMetadataName("D").TypeKind); 2331Assert.Equal(TypeKind.Interface, compilation2.GetTypeByMetadataName("I1").TypeKind); 2338Assert.Equal(TypeKind.Struct, compilation3.GetTypeByMetadataName("A").TypeKind); 2339Assert.Equal(TypeKind.Enum, compilation3.GetTypeByMetadataName("B").TypeKind); 2340Assert.Equal(TypeKind.Class, compilation3.GetTypeByMetadataName("C").TypeKind); 2341Assert.Equal(TypeKind.Delegate, compilation3.GetTypeByMetadataName("D").TypeKind); 2342Assert.Equal(TypeKind.Interface, compilation3.GetTypeByMetadataName("I1").TypeKind); 2363Assert.Equal(TypeKind.Class, a.TypeKind); 2365Assert.Equal(TypeKind.Class, b.TypeKind); 2367Assert.Equal(TypeKind.Class, c.TypeKind); 2369Assert.Equal(TypeKind.Class, d.TypeKind); 2371Assert.Equal(TypeKind.Interface, i1.TypeKind); 2383Assert.Equal(TypeKind.Struct, compilation5.GetTypeByMetadataName("A").TypeKind); 2384Assert.Equal(TypeKind.Enum, compilation5.GetTypeByMetadataName("B").TypeKind); 2385Assert.Equal(TypeKind.Class, compilation5.GetTypeByMetadataName("C").TypeKind); 2386Assert.Equal(TypeKind.Delegate, compilation5.GetTypeByMetadataName("D").TypeKind); 2387Assert.Equal(TypeKind.Interface, compilation5.GetTypeByMetadataName("I1").TypeKind); 2408Assert.Equal(TypeKind.Class, a.TypeKind); 2410Assert.Equal(TypeKind.Class, b.TypeKind); 2412Assert.Equal(TypeKind.Class, c.TypeKind); 2414Assert.Equal(TypeKind.Class, d.TypeKind); 2416Assert.Equal(TypeKind.Interface, i1.TypeKind); 2424Assert.Equal(TypeKind.Struct, compilation7.GetTypeByMetadataName("A").TypeKind); 2425Assert.Equal(TypeKind.Enum, compilation7.GetTypeByMetadataName("B").TypeKind); 2426Assert.Equal(TypeKind.Class, compilation7.GetTypeByMetadataName("C").TypeKind); 2427Assert.Equal(TypeKind.Delegate, compilation7.GetTypeByMetadataName("D").TypeKind); 2428Assert.Equal(TypeKind.Interface, compilation7.GetTypeByMetadataName("I1").TypeKind);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (204)
DocumentationComments\CrefTests.cs (5)
1602.Single(method => method.Parameters.Single().Type.TypeKind == TypeKind.TypeParameter); 1735Single(method => method.Parameters.Single().Type.TypeKind == TypeKind.TypeParameter); 1739Assert.Equal(TypeKind.TypeParameter, actualSymbol.GetParameterTypes().Single().Type.TypeKind); 1761Single(method => method.Parameters.Single().Type.TypeKind == TypeKind.TypeParameter); 1765Assert.Equal(TypeKind.TypeParameter, actualSymbol.GetParameterTypes().Single().Type.TypeKind);
Symbols\AssemblyAndNamespaceTests.cs (2)
382Assert.Equal(TypeKind.Class, objectType.TypeKind); 434Assert.Equal(TypeKind.Class, taskType.TypeKind);
Symbols\CompilationCreationTests.cs (3)
2460Assert.Equal(TypeKind.Class, type3.TypeKind); 2461Assert.Equal(TypeKind.Interface, asm5[1].GlobalNamespace.GetTypeMembers("I1").Single().TypeKind); 2608return current is TypeSymbol type && type.TypeKind == kind;
Symbols\CorLibrary\CorTypes.cs (11)
38Assert.Equal(TypeKind.Error, t.TypeKind); 47Assert.Equal(TypeKind.Error, p.Type.TypeKind); 72Assert.Equal(TypeKind.Error, t.TypeKind); 76Assert.NotEqual(TypeKind.Error, t.TypeKind); 89Assert.Equal(TypeKind.Error, t.TypeKind); 93Assert.NotEqual(TypeKind.Error, t.TypeKind); 151Assert.NotEqual(TypeKind.Error, t.TypeKind); 155Assert.Equal(TypeKind.Error, t.TypeKind); 168Assert.Equal(TypeKind.Error, t.TypeKind); 202Assert.Equal(TypeKind.Error, t.TypeKind); 214Assert.Equal(TypeKind.Error, t.TypeKind);
Symbols\ExtensionMethodTests.cs (1)
55Assert.Equal(TypeKind.TypeParameter, parameter.Type.TypeKind);
Symbols\GenericConstraintTests.cs (1)
4973if (t.TypeKind == TypeKind.TypeParameter)
Symbols\Metadata\MetadataTypeTests.cs (4)
89Assert.Equal(TypeKind.Class, class1.TypeKind); 139Assert.Equal(TypeKind.Class, type1.TypeKind); 187Assert.Equal(TypeKind.Interface, type1.TypeKind); 237Assert.Equal(TypeKind.Struct, type1.TypeKind);
Symbols\Metadata\PE\LoadCustomModifiers.cs (1)
167Assert.Equal(TypeKind.Array, propertyType.TypeKind);
Symbols\Metadata\PE\LoadingEvents.cs (13)
196Assert.Equal(TypeKind.Interface, @interface.TypeKind); 201Assert.Equal(TypeKind.Class, @class.TypeKind); 223Assert.Equal(TypeKind.Interface, @interface.TypeKind); 228Assert.Equal(TypeKind.Class, @class.TypeKind); 255Assert.Equal(TypeKind.Interface, @interface.TypeKind); 260Assert.Equal(TypeKind.Class, @class.TypeKind); 291Assert.Equal(TypeKind.Interface, defInterface.TypeKind); 296Assert.Equal(TypeKind.Interface, defInterface.TypeKind); 300Assert.Equal(TypeKind.Class, @class.TypeKind); 332Assert.Equal(TypeKind.Interface, outerInterface.TypeKind); 338Assert.Equal(TypeKind.Class, outerClass.TypeKind); 342Assert.Equal(TypeKind.Interface, innerInterface.TypeKind); 364Assert.Equal(TypeKind.Class, innerClass.TypeKind);
Symbols\Metadata\PE\LoadingMethods.cs (28)
377Assert.Equal(TypeKind.Struct, byrefReturnMethod.ReturnType.TypeKind); 389Assert.Equal(TypeKind.Interface, @interface.TypeKind); 394Assert.Equal(TypeKind.Class, @class.TypeKind); 413Assert.Equal(TypeKind.Interface, interface1.TypeKind); 418Assert.Equal(TypeKind.Interface, interface2.TypeKind); 423Assert.Equal(TypeKind.Class, @class.TypeKind); 449Assert.Equal(TypeKind.Interface, @interface.TypeKind); 455Assert.Equal(TypeKind.Class, @class.TypeKind); 485Assert.Equal(TypeKind.Interface, @interface.TypeKind); 491Assert.Equal(TypeKind.Class, @class.TypeKind); 517Assert.Equal(TypeKind.Interface, cyclicInterface.TypeKind); 520Assert.Equal(TypeKind.Interface, implementedInterface.TypeKind); 525Assert.Equal(TypeKind.Class, @class.TypeKind); 545Assert.Equal(TypeKind.Interface, cyclicInterface.TypeKind); 548Assert.Equal(TypeKind.Class, @class.TypeKind); 576Assert.Equal(TypeKind.Interface, defInterface.TypeKind); 581Assert.Equal(TypeKind.Interface, defInterface.TypeKind); 585Assert.Equal(TypeKind.Class, @class.TypeKind); 612Assert.Equal(TypeKind.Class, baseClass.TypeKind); 615Assert.Equal(TypeKind.Class, derivedClass.TypeKind); 637Assert.Equal(TypeKind.Interface, @interface.TypeKind); 640Assert.Equal(TypeKind.Class, @class.TypeKind); 670Assert.Equal(TypeKind.Interface, @interface.TypeKind); 673Assert.Equal(TypeKind.Class, @class.TypeKind); 704Assert.Equal(TypeKind.Interface, outerInterface.TypeKind); 710Assert.Equal(TypeKind.Class, outerClass.TypeKind); 714Assert.Equal(TypeKind.Interface, innerInterface.TypeKind); 736Assert.Equal(TypeKind.Class, innerClass.TypeKind);
Symbols\Metadata\PE\LoadingProperties.cs (15)
30Assert.Equal(TypeKind.Interface, @interface.TypeKind); 35Assert.Equal(TypeKind.Class, @class.TypeKind); 57Assert.Equal(TypeKind.Interface, @interface.TypeKind); 62Assert.Equal(TypeKind.Class, @class.TypeKind); 89Assert.Equal(TypeKind.Interface, @interface.TypeKind); 94Assert.Equal(TypeKind.Class, @class.TypeKind); 125Assert.Equal(TypeKind.Interface, defInterface.TypeKind); 130Assert.Equal(TypeKind.Interface, defInterface.TypeKind); 134Assert.Equal(TypeKind.Class, @class.TypeKind); 166Assert.Equal(TypeKind.Interface, outerInterface.TypeKind); 172Assert.Equal(TypeKind.Class, outerClass.TypeKind); 176Assert.Equal(TypeKind.Interface, innerInterface.TypeKind); 198Assert.Equal(TypeKind.Class, innerClass.TypeKind); 228Assert.Equal(TypeKind.Interface, @interface.TypeKind); 252Assert.Equal(TypeKind.Class, @class.TypeKind);
Symbols\Metadata\PE\NoPia.cs (4)
268Assert.Equal(TypeKind.Interface, param[0].Type.TypeKind); 269Assert.Equal(TypeKind.Interface, param[1].Type.TypeKind); 602Assert.Equal(TypeKind.Interface, param[0].Type.TypeKind); 603Assert.Equal(TypeKind.Interface, param[1].Type.TypeKind);
Symbols\Metadata\PE\NoPiaInstantiationOfGenericClassAndStruct.cs (2)
143if (m.ReturnType.TypeKind != TypeKind.Struct) 448if (m.ReturnType.TypeKind != TypeKind.Struct)
Symbols\Metadata\PE\TypeForwarders.cs (3)
106Assert.NotEqual(TypeKind.Error, funcType.TypeKind); 1498Assert.NotEqual(TypeKind.Error, type.TypeKind); 1767Assert.NotEqual(TypeKind.Error, type.TypeKind);
Symbols\Metadata\PE\TypeKindTests.cs (6)
40Assert.Equal(TypeKind.Class, obj.TypeKind); 46Assert.Equal(TypeKind.Class, @enum.TypeKind); 52Assert.Equal(TypeKind.Struct, int32.TypeKind); 58Assert.Equal(TypeKind.Delegate, func.TypeKind); 68Assert.Equal(TypeKind.Interface, ienumerable.TypeKind); 75Assert.Equal(TypeKind.Enum, typeCode.TypeKind);
Symbols\MissingSpecialMember.cs (11)
158Assert.Equal(TypeKind.Error, specialType.TypeKind); 163Assert.Equal(TypeKind.Class, lookupType.TypeKind); 236Assert.Equal(TypeKind.Struct, specialType.TypeKind); 240Assert.Equal(TypeKind.Struct, lookupType.TypeKind); 272Assert.Equal(TypeKind.Class, wellKnownType.TypeKind); 276Assert.Equal(TypeKind.Class, lookupType.TypeKind); 305Assert.Equal(TypeKind.Error, wellKnownType.TypeKind); 309Assert.Equal(TypeKind.Enum, lookupType.TypeKind); 382Assert.Equal(TypeKind.Class, wellKnownType.TypeKind); 385Assert.Equal(TypeKind.Class, lookupType.TypeKind); 499Assert.Equal(TypeKind.Class, wellKnown.TypeKind);
Symbols\MockSymbolTests.cs (1)
140builder.AppendFormat("{0} {1}", (sym as NamedTypeSymbol).TypeKind.ToString().ToLower(), sym.Name);
Symbols\Retargeting\NoPia.cs (6)
571Assert.Equal(TypeKind.Interface, param[0].Type.TypeKind); 572Assert.Equal(TypeKind.Interface, param[1].Type.TypeKind); 872Assert.Equal(TypeKind.Interface, param[0].Type.TypeKind); 873Assert.Equal(TypeKind.Interface, param[1].Type.TypeKind); 1176Assert.Equal(TypeKind.Interface, param[0].Type.TypeKind); 1177Assert.Equal(TypeKind.Interface, param[1].Type.TypeKind);
Symbols\Retargeting\RetargetingTests.cs (18)
345Assert.Equal(TypeKind.Error, sourceType.BaseType().TypeKind); 347Assert.Equal(TypeKind.Error, sourceType.EnumUnderlyingType.TypeKind); 354Assert.Equal(TypeKind.Error, retargetingType.BaseType().TypeKind); 356Assert.Equal(TypeKind.Error, retargetingType.EnumUnderlyingType.TypeKind); 382Assert.Equal(TypeKind.Error, sourceType.BaseType().TypeKind); 384Assert.Equal(TypeKind.Error, sourceType.EnumUnderlyingType.TypeKind); 391Assert.Equal(TypeKind.Error, retargetingType.BaseType().TypeKind); 393Assert.Equal(TypeKind.Error, retargetingType.EnumUnderlyingType.TypeKind); 442Assert.Equal(TypeKind.Error, sourceType.BaseType().TypeKind); 448Assert.Equal(TypeKind.Error, retargetingType.BaseType().TypeKind); 523Assert.Equal(TypeKind.Error, sourceType.Interfaces().Single().TypeKind); 525Assert.Equal(TypeKind.Error, sourceType.BaseType().TypeKind); 530Assert.Equal(TypeKind.Error, retargetingType.Interfaces().Single().TypeKind); 532Assert.Equal(TypeKind.Error, retargetingType.BaseType().TypeKind); 581Assert.Equal(TypeKind.Error, sourceType.Interfaces().Single().TypeKind); 587Assert.Equal(TypeKind.Error, retargetingType.Interfaces().Single().TypeKind); 650Assert.Equal(TypeKind.Error, sourceTypeParameterConstraint.TypeKind); 657Assert.Equal(TypeKind.Error, retargetingTypeParameterConstraint.TypeKind);
Symbols\Source\BaseClassTests.cs (1)
1899Assert.Equal(TypeKind.Class, derived.TypeKind);
Symbols\Source\CustomModifierCopyTests.cs (4)
922Assert.Equal(TypeKind.Dynamic, classMethod.ParameterTypesWithAnnotations.Single().Type.TypeKind); 965Assert.Equal(TypeKind.Dynamic, interfaceMethod.ParameterTypesWithAnnotations.Single().Type.TypeKind); 1402Assert.Equal(TypeKind.Dynamic, interfaceMethod.ReturnType.TypeKind); 1443Assert.Equal(TypeKind.Dynamic, classMethod.ReturnType.TypeKind);
Symbols\Source\DelegateTests.cs (4)
110Assert.Equal(TypeKind.Delegate, fieldType.TypeKind); 130Assert.Equal(TypeKind.Delegate, v.TypeKind); 162Assert.Equal(TypeKind.Interface, beginInvoke.ReturnType.TypeKind); 208Assert.Equal(TypeKind.Delegate, d.TypeKind);
Symbols\Source\EnumTests.cs (1)
759Assert.Equal(TypeKind.Enum, member.Type.TypeKind);
Symbols\Source\FieldTests.cs (6)
65Assert.Equal(TypeKind.Class, sym.Type.TypeKind); 92Assert.Equal(TypeKind.Class, f.Type.TypeKind); 180Assert.Equal(TypeKind.Struct, sym.Type.TypeKind); 209Assert.Equal(TypeKind.Class, sym.Type.TypeKind); 214Assert.Equal(TypeKind.Interface, sym.Type.TypeKind); 219Assert.Equal(TypeKind.Struct, sym.Type.TypeKind);
Symbols\Source\MethodTests.cs (11)
368Assert.Equal(TypeKind.Class, refP.TypeKind); 376Assert.Equal(TypeKind.Struct, outP.TypeKind); 407Assert.Equal(TypeKind.Struct, m.ReturnType.TypeKind); 1668Assert.Equal(TypeKind.Interface, @interface.TypeKind); 1673Assert.Equal(TypeKind.Class, @class.TypeKind); 1712Assert.Equal(TypeKind.Interface, @interface.TypeKind); 1717Assert.Equal(TypeKind.Class, @class.TypeKind); 1757Assert.Equal(TypeKind.Interface, @interface.TypeKind); 1763Assert.Equal(TypeKind.Class, @class.TypeKind); 1808Assert.Equal(TypeKind.Interface, @interface.TypeKind); 1813Assert.Equal(TypeKind.Class, @class.TypeKind);
Symbols\Source\PropertyTests.cs (7)
1751Assert.Equal(TypeKind.Interface, @interface.TypeKind); 1756Assert.Equal(TypeKind.Class, @class.TypeKind); 1785Assert.Equal(TypeKind.Interface, @interface.TypeKind); 1790Assert.Equal(TypeKind.Class, @class.TypeKind); 1823Assert.Equal(TypeKind.Interface, @interface.TypeKind); 1828Assert.Equal(TypeKind.Class, @class.TypeKind); 1958Assert.Equal(TypeKind.Class, @class.TypeKind);
Symbols\SymbolDistinguisherTests.cs (2)
318Assert.NotEqual(TypeKind.Error, validType.TypeKind); 319Assert.Equal(TypeKind.Error, errorType.TypeKind);
Symbols\SymbolErrorTests.cs (15)
1578Assert.Equal(TypeKind.Struct, (n as FieldSymbol).Type.TypeKind); 1689Assert.Equal(TypeKind.Error, classCInterface.TypeKind); 1694Assert.Equal(TypeKind.Error, structSField.Type.TypeKind); 2338Assert.Equal(TypeKind.Error, baseType.TypeKind); 2344Assert.Equal(TypeKind.Error, mem1.Type.TypeKind); 2350Assert.Equal(TypeKind.Error, param.Type.TypeKind); 2589Assert.Equal(TypeKind.Error, baseType.TypeKind); 2594Assert.Equal(TypeKind.Error, baseType.TypeKind); 2599Assert.Equal(TypeKind.Error, baseType.TypeKind); 3376Assert.Equal(TypeKind.Error, ptype.Type.TypeKind); 3382Assert.Equal(TypeKind.Error, base1.TypeKind); 3387Assert.Equal(TypeKind.Error, mem2.Type.TypeKind); 3390Assert.Equal(TypeKind.Error, mem3.ReturnType.TypeKind); 3662Assert.Equal(TypeKind.Error, base1.TypeKind); 19440Assert.Equal(TypeKind.Class, Base.TypeKind);
Symbols\TypeTests.cs (18)
282Assert.Equal(TypeKind.Struct, type3.TypeKind); 289Assert.Equal(TypeKind.Interface, type4.TypeKind); 300Assert.Equal(TypeKind.Interface, type3.TypeKind); 308Assert.Equal(TypeKind.Class, type4.TypeKind); 474Assert.Equal(TypeKind.Array, elemType1.Type.TypeKind); 488Assert.Equal(TypeKind.Array, elemType2.TypeKind); 498Assert.Equal(TypeKind.Array, retType.TypeKind); 519Assert.Equal(TypeKind.Array, p3.Type.TypeKind); 856Assert.Equal(TypeKind.Interface, igoo.TypeKind); 869Assert.Equal(TypeKind.Class, classA.TypeKind); 881Assert.Equal(TypeKind.Struct, structS.TypeKind); 908Assert.Equal(TypeKind.Class, varA.Type.TypeKind); 1311Assert.Equal(TypeKind.Class, baseType.TypeKind); 1312Assert.Equal(TypeKind.Interface, interface1.TypeKind); 1313Assert.Equal(TypeKind.Interface, interface2.TypeKind); 1331Assert.Equal(TypeKind.Error, derived.BaseType().TypeKind); 1335Assert.Equal(TypeKind.Error, i.TypeKind); 1368Assert.Equal(TypeKind.Error, typeSymbol.TypeKind);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (8)
Parsing\ReadOnlyStructs.cs (8)
48Assert.Equal(TypeKind.Struct, s1.TypeKind); 54Assert.Equal(TypeKind.Struct, s2.TypeKind); 60Assert.Equal(TypeKind.Struct, s3.TypeKind); 122Assert.Equal(TypeKind.Class, s1.TypeKind); 128Assert.Equal(TypeKind.Delegate, s2.TypeKind); 134Assert.Equal(TypeKind.Interface, s3.TypeKind); 157Assert.Equal(TypeKind.Struct, s1.TypeKind); 163Assert.Equal(TypeKind.Struct, s2.TypeKind);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (8)
Extensions.cs (5)
473if ((typeSym.TypeKind == TypeKind.Interface || typeSym.TypeKind == TypeKind.Class || typeSym.TypeKind == TypeKind.Struct || typeSym.TypeKind == TypeKind.Delegate)) 515else if (typeSym.TypeKind == TypeKind.Array)
UsesIsNullableVisitor.cs (3)
168switch (type.TypeKind) 181switch (type.TypeKind) 207throw ExceptionUtilities.UnexpectedValue(type.TypeKind);
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (1)
Metadata\WinMdEventTests.cs (1)
3347Assert.Equal(TypeKind.Error, fieldType.TypeKind);