5 implementations of TypeKind
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeSymbol.cs (1)
36public abstract TypeKind TypeKind { get; }
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\TypeSymbol.cs (1)
135TypeKind ITypeSymbol.TypeKind
Microsoft.CodeAnalysis.Features (1)
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
68public TypeKind TypeKind => _symbol.TypeKind;
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\TypeSymbol.vb (1)
581Private ReadOnly Property ITypeSymbol_TypeKind As TypeKind Implements ITypeSymbol.TypeKind, ITypeSymbolInternal.TypeKind
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeSymbol.cs (1)
36public abstract TypeKind TypeKind { get; }
1380 references to TypeKind
ConfigurationSchemaGenerator (5)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (4)
69type.TypeKind is TypeKind.TypeParameter or TypeKind.Pointer or TypeKind.Error || 192else if (type.TypeKind is TypeKind.Array) 602if (!(typeSymbol.IsAbstract || typeSymbol.TypeKind is TypeKind.Interface)) 841if (typeArg.TypeKind is TypeKind.TypeParameter or TypeKind.Error ||
RuntimeSource\SourceGenerators\TypeRef.cs (1)
21TypeKind = type.TypeKind;
ILLink.RoslynAnalyzer (5)
ISymbolExtensions.cs (1)
183 return typeSymbol.TypeKind == TypeKind.Interface;
TrimAnalysis\HandleCallAction.cs (1)
106 } else if (staticType.IsSealed || staticType.IsTypeOf ("System", "Delegate") || staticType.TypeKind == TypeKind.Array) {
TrimAnalysis\SingleValueExtensions.cs (1)
18 return underlyingType?.TypeKind switch {
TrimAnalysis\TrimAnalysisVisitor.cs (2)
188 (operation.Type?.TypeKind == TypeKind.Enum || operation.Type?.SpecialType == SpecialType.System_Int32)) { 432 } else if (operation.Type?.TypeKind == TypeKind.Enum && constantValue is int enumConstantValue) {
Microsoft.Analyzers.Extra (3)
CallAnalysis\Arrays.cs (2)
108if (keyType.TypeKind == TypeKind.Enum 112if (keyType.TypeKind == TypeKind.Enum)
CallAnalysis\CallAnalyzer.Handlers.cs (1)
42if (type.TypeKind == TypeKind.Interface)
Microsoft.Analyzers.Local (2)
ApiLifecycle\AssemblyAnalysis.cs (1)
195if (type.TypeKind != TypeKind.Delegate)
CallAnalysis\CallAnalyzer.Handlers.cs (1)
42if (type.TypeKind == TypeKind.Interface)
Microsoft.AspNetCore.App.Analyzers (3)
src\Shared\Roslyn\CodeAnalysisExtensions.cs (1)
107if (source.TypeKind == TypeKind.Interface)
src\Shared\Roslyn\MvcFacts.cs (1)
17if (type.TypeKind != TypeKind.Class)
src\Shared\RoslynUtils\ParsabilityHelper.cs (1)
26if (typeSymbol.TypeKind == TypeKind.Enum)
Microsoft.AspNetCore.App.SourceGenerators (1)
PublicTopLevelProgramGenerator.cs (1)
29.Select(static (symbol, _) => symbol is INamedTypeSymbol { TypeKind: TypeKind.Class } ? symbol : null)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (3)
src\Shared\RoslynUtils\ParsabilityHelper.cs (1)
26if (typeSymbol.TypeKind == TypeKind.Enum)
StaticRouteHandlerModel\Emitters\EndpointParameterEmitter.cs (1)
337var receiverType = endpointParameter.BindableMethodSymbol?.ReceiverType is { TypeKind: TypeKind.Interface } targetType
StaticRouteHandlerModel\EndpointParameter.cs (1)
311if (type.TypeKind == TypeKind.Array)
Microsoft.AspNetCore.Mvc.Analyzers (6)
AttributesShouldNotBeAppliedToPageModelAnalyzer.cs (2)
26if (typeCache.PageModelAttribute == null || typeCache.PageModelAttribute.TypeKind == TypeKind.Error) 77return type.TypeKind == TypeKind.Class &&
src\Shared\Roslyn\CodeAnalysisExtensions.cs (1)
107if (source.TypeKind == TypeKind.Interface)
src\Shared\Roslyn\MvcFacts.cs (1)
17if (type.TypeKind != TypeKind.Class)
TagHelpersInCodeBlocksAnalyzer.cs (1)
175return typeSymbol != null && typeSymbol.TypeKind != TypeKind.Error;
TopLevelParameterNameAnalyzer.cs (1)
301return typeSymbol != null && typeSymbol.TypeKind != TypeKind.Error;
Microsoft.AspNetCore.Mvc.Api.Analyzers (4)
ApiControllerFacts.cs (1)
18if (method.ReturnsVoid || method.ReturnType.TypeKind == TypeKind.Error)
ApiControllerSymbolCache.cs (1)
129return typeSymbol != null && typeSymbol.TypeKind != TypeKind.Error;
src\Shared\Roslyn\CodeAnalysisExtensions.cs (1)
107if (source.TypeKind == TypeKind.Interface)
src\Shared\Roslyn\MvcFacts.cs (1)
17if (type.TypeKind != TypeKind.Class)
Microsoft.CodeAnalysis (5)
Compilation\Compilation.cs (2)
3648return string.Format("{0}: {1} {2} -> {3} {4}", this.AssemblyName, source.TypeKind.ToString(), source.Name, destination.TypeKind.ToString(), destination.Name);
Compilation\Expression.cs (1)
41if (type.TypeKind == TypeKind.Enum)
SymbolDisplay\AbstractSymbolDisplayVisitor.cs (2)
142if (type.TypeKind == TypeKind.Enum) 185if (typeSymbol.TypeKind != TypeKind.Enum)
Microsoft.CodeAnalysis.CodeStyle (50)
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchDiagnosticAnalyzer.cs (2)
90else if (typeWithoutNullable.TypeKind == TypeKind.Enum) 119if (type.RemoveNullableIfPresent()?.TypeKind != TypeKind.Enum)
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchExpressionHelpers.cs (1)
27if (switchExpressionType?.TypeKind == TypeKind.Enum)
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchStatementHelpers.cs (1)
68if (switchExpressionType?.TypeKind == TypeKind.Enum)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
183if (value.Type.TypeKind == TypeKind.Dynamic)
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
184if (namedType.TypeKind is not TypeKind.Class and not TypeKind.Struct and not TypeKind.Module)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (8)
87if (member.ContainingType.TypeKind == TypeKind.Interface) 158if (implementation?.ContainingType.TypeKind == TypeKind.Interface) 196if (type.TypeKind == TypeKind.Interface) 297if (type.TypeKind == TypeKind.Interface) 335if (classOrStructType.TypeKind is not TypeKind.Class and not TypeKind.Struct) 345if (!interfacesOrAbstractClasses.All(i => i.TypeKind == TypeKind.Interface) && 362return interfacesOrAbstractClasses.First().TypeKind == TypeKind.Interface 541TypeKind: TypeKind.Class or TypeKind.Struct
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (8)
114return symbol?.ContainingType?.TypeKind == TypeKind.Class && 123symbol.ContainingType.TypeKind == TypeKind.Interface) 163=> symbol is ITypeSymbol { TypeKind: TypeKind.Error }; 166=> symbol is ITypeSymbol { TypeKind: TypeKind.Module }; 169=> symbol is ITypeSymbol { TypeKind: TypeKind.Interface }; 220=> symbol is { ContainingType.TypeKind: TypeKind.Module }; 244=> symbol is ITypeSymbol { TypeKind: TypeKind.Delegate }; 634if (!methods.Any(x => x.Name == WellKnownMemberNames.OnCompleted && x.ReturnsVoid && x.Parameters is [{ Type.TypeKind: TypeKind.Delegate }]))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (1)
193typeArg.TypeKind != TypeKind.Error &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (13)
42if (type is INamedTypeSymbol namedType && namedType.TypeKind == TypeKind.Interface && !allInterfaces.Contains(namedType)) 56=> symbol?.TypeKind == TypeKind.Class && symbol.IsAbstract; 82=> symbol?.TypeKind == TypeKind.Module; 85=> symbol?.TypeKind == TypeKind.Interface; 88=> symbol?.TypeKind == TypeKind.Delegate; 91=> symbol?.TypeKind == TypeKind.FunctionPointer; 94=> symbol?.TypeKind == TypeKind.Struct; 188IEnumerable<ITypeSymbol> baseTypes = (baseType.TypeKind == TypeKind.Interface) ? type.AllInterfaces : type.GetBaseTypes(); 263switch (typeSymbol.TypeKind) 541if (t1.TypeKind != t2.TypeKind) 635if (type != null && type.IsValueType && type.TypeKind == TypeKind.Enum) 687if (type.TypeKind != TypeKind.Struct)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (2)
83symbol = updatedContainingType.GetTypeMembers(symbol.Name, symbol.Arity).First(m => m.TypeKind == symbol.TypeKind);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (2)
162if (type.TypeKind == TypeKind.Array && typeArguments.IsEmpty) 171type.TypeKind == TypeKind.Pointer)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
411symbol.GetSymbolType()?.TypeKind != TypeKind.Delegate)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleRules.cs (1)
68if (containingType.TypeKind is not TypeKind.Class and not TypeKind.Struct)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
367SymbolCategory.Type => symbol is ITypeSymbol type && type.TypeKind == (TypeKind)_kind,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
404if (namedTypeSymbol.TypeKind == TypeKind.Error)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.TupleTypeSymbolKey.cs (1)
24var isError = symbol.TupleUnderlyingType!.TypeKind == TypeKind.Error;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SignatureComparer.cs (2)
176property1.ContainingType.TypeKind == TypeKind.Interface) 186property2.ContainingType.TypeKind == TypeKind.Interface)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.cs (1)
242=> x.TypeKind switch
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (1)
513if (x.TypeKind == TypeKind.Delegate)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
192if (x.TypeKind == TypeKind.Delegate)
Microsoft.CodeAnalysis.CodeStyle.Fixes (25)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (1)
405return TypeToGenerateIn?.TypeKind is (TypeKind?)TypeKind.Class or (TypeKind?)TypeKind.Struct;
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorsService.State.cs (2)
58baseType.TypeKind == TypeKind.Error) 109if (classType.TypeKind == TypeKind.Struct)
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberService.cs (2)
43if (!typeKinds.Contains(typeToGenerateIn.TypeKind)) 46if (typeToGenerateIn.TypeKind == TypeKind.Interface && isStatic)
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.CodeAction.cs (2)
78generateMethodBodies: _state.TypeToGenerateIn.TypeKind != TypeKind.Interface)), 94generateMethodBodies: _state.TypeToGenerateIn.TypeKind != TypeKind.Interface)),
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.cs (1)
51state.TypeToGenerateIn.TypeKind != TypeKind.Interface &&
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (2)
121return _state.TypeToGenerateIn.TypeKind != TypeKind.Interface && _refKind != RefKind.None 128if (state.TypeToGenerateIn.TypeKind == TypeKind.Interface)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (3)
104if (state.TypeToGenerateIn.TypeKind == TypeKind.Interface && state.IsStatic) 114var isOnlyReadAndIsInInterface = state.TypeToGenerateIn.TypeKind == TypeKind.Interface && !state.IsWrittenTo; 148if (state.TypeToGenerateIn.TypeKind != TypeKind.Interface)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
90if (this.TypeToGenerateIn.TypeKind == TypeKind.Interface)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementHelpers.cs (2)
227if (state.ClassOrStructType.TypeKind != TypeKind.Class) 250if (idisposable?.TypeKind == TypeKind.Interface)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (1)
270var condition1 = typeParameter.ConstraintTypes.Count(t => t.TypeKind == TypeKind.Class) >= 2;
src\Analyzers\Core\CodeFixes\UnsealClass\AbstractUnsealClassCodeFixProvider.cs (1)
40type.TypeKind == TypeKind.Class && type.IsSealed && !type.IsStatic)
src\Analyzers\Core\CodeFixes\UseConditionalExpression\AbstractUseConditionalExpressionCodeFixProvider.cs (2)
178conversion.Type.TypeKind != TypeKind.Error) 182if (conversion.Operand.Type == null || conversion.Operand.Type.TypeKind != TypeKind.Error)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (1)
36if (typeSymbol.TypeKind != TypeKind.Enum)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
152if (namedType.TypeKind != TypeKind.Enum)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\INamedTypeSymbolExtensions.cs (1)
25namedType.TypeKind,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
132member.ContainingType is { TypeKind: TypeKind.Interface } interfaceBeingImplemented)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
498if (containingType?.TypeKind == TypeKind.Struct)
Microsoft.CodeAnalysis.CSharp (21)
SymbolDisplay\SymbolDisplayVisitor.cs (3)
312if (type != null && type.TypeKind != TypeKind.Error) 368(containingType.TypeKind != TypeKind.Interface && !IsEnumMember(symbol) & !IsLocalFunction(symbol)))) 460&& symbol.ContainingType.TypeKind == TypeKind.Enum
SymbolDisplay\SymbolDisplayVisitor.Members.cs (3)
62if (symbol.ContainingType.TypeKind == TypeKind.Enum) 873if (type.TypeKind == TypeKind.Enum) 922(containingType.TypeKind != TypeKind.Interface && !IsEnumMember(symbol) && !IsLocalFunction(symbol))))
SymbolDisplay\SymbolDisplayVisitor.Types.cs (11)
224if (typeArg.TypeKind != TypeKind.Pointer) 279var shouldSkip = namespaceSymbol.IsGlobalNamespace && symbol.TypeKind == TypeKind.Error; 324if (symbol.IsAnonymousType && symbol.TypeKind != TypeKind.Delegate) 364if (symbolName is null && symbol.IsAnonymousType && symbol.TypeKind == TypeKind.Delegate) 502if (tupleSymbol.TypeKind == TypeKind.Error || 570if (symbol.TypeKind == TypeKind.Error && 589symbol.TypeKind == TypeKind.Delegate && 596switch (symbol.TypeKind) 617throw ExceptionUtilities.UnexpectedValue(symbol.TypeKind); 684if (symbol.IsAnonymousType && symbol.TypeKind != TypeKind.Delegate) 696switch (symbol.TypeKind)
SymbolDisplay\SymbolDisplayVisitor_Constants.cs (1)
18else if (type.IsReferenceType || type.TypeKind == TypeKind.Pointer || ITypeSymbolHelpers.IsNullableType(type))
SymbolDisplay\SymbolDisplayVisitor_Minimal.cs (1)
152if (symbol.TypeKind != TypeKind.Error)
Symbols\Source\SourceDelegateMethodSymbol.cs (2)
79if (binder.Compilation.GetSpecialType(SpecialType.System_IAsyncResult).TypeKind != TypeKind.Error && 80binder.Compilation.GetSpecialType(SpecialType.System_AsyncCallback).TypeKind != TypeKind.Error &&
Microsoft.CodeAnalysis.CSharp.CodeStyle (23)
src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (1)
92if (syntaxContext.SemanticModel.GetTypeInfo(invocationExpression.Expression, syntaxContext.CancellationToken).Type is { TypeKind: TypeKind.FunctionPointer })
src\Analyzers\CSharp\Analyzers\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
57if (namedTypeSymbol.TypeKind != TypeKind.Struct)
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (2)
60TypeKind: TypeKind.Struct, 259return instance is { Type.TypeKind: TypeKind.Struct } ||
src\Analyzers\CSharp\Analyzers\MakeStructReadOnly\CSharpMakeStructReadOnlyDiagnosticAnalyzer.cs (1)
83if (typeSymbol.TypeKind is not TypeKind.Struct)
src\Analyzers\CSharp\Analyzers\UseAutoProperty\CSharpUseAutoPropertyAnalyzer.cs (1)
133if (symbolInfo.GetAnySymbol() is not IFieldSymbol { ContainingType.TypeKind: TypeKind.Struct })
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (2)
118if (operation?.Parent is IAssignmentOperation { Type.TypeKind: TypeKind.Dynamic }) 340if (!(namedType.TypeKind == TypeKind.Struct && noArgConstructor.IsImplicitlyDeclared))
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (1)
137if (asType?.TypeKind == TypeKind.Dynamic)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
121if (isType?.TypeKind == TypeKind.Dynamic)
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
274if (namedType.TypeKind is not (TypeKind.Class or TypeKind.Struct))
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (1)
80if (namedType is not { TypeKind: TypeKind.Class or TypeKind.Struct })
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
42if (typeSymbol.TypeKind is TypeKind.Class or TypeKind.Struct)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
442if (parameter.Type.OriginalDefinition.TypeKind != TypeKind.TypeParameter)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (8)
245if (originalDelegateCreationOperation.Type?.TypeKind != TypeKind.Delegate) 262if (rewrittenDelegateCreationOperation.Type?.TypeKind != TypeKind.Delegate) 308if (originalConvertedType is null || originalConvertedType.TypeKind == TypeKind.Error) 349if (rewrittenConvertedType is null || rewrittenConvertedType.TypeKind == TypeKind.Error || !rewrittenConversion.Exists) 523originalConvertedType.IsReferenceType && rewrittenConvertedType.TypeKind == TypeKind.Dynamic) 911if (!original.IsReferenceType || original.TypeKind == TypeKind.Interface) 1235if (originalMemberSymbol.ContainingType.TypeKind == TypeKind.Interface) 1275rewrittenType.TypeKind == TypeKind.Array ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
294if (declaredType != null && declaredType.TypeKind == TypeKind.Dynamic)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (32)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (4)
44TypeKind: TypeKind.Class or TypeKind.Struct, 268recordKeyword = type.TypeKind == TypeKind.Class 413type.TypeKind == TypeKind.Class 419type.TypeKind == TypeKind.Class
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\PositionalParameterInfo.cs (1)
179if (containingType.TypeKind == TypeKind.Struct && !containingType.IsReadOnly)
src\Analyzers\CSharp\CodeFixes\GenerateDefaultConstructors\CSharpGenerateDefaultConstructorsService.cs (1)
39return classType?.TypeKind is TypeKind.Class or TypeKind.Struct;
src\Analyzers\CSharp\CodeFixes\ImplementInterface\CSharpImplementInterfaceService.cs (1)
62if (interfaceSymbolInfo.GetAnySymbol() is INamedTypeSymbol interfaceType && interfaceType.TypeKind == TypeKind.Interface)
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (2)
85if (type != null && type.TypeKind != TypeKind.Error) 124return type.TypeKind == TypeKind.Enum &&
src\Analyzers\CSharp\CodeFixes\UseExplicitTypeForConst\UseExplicitTypeForConstCodeFixProvider.cs (1)
47if (type == null || type.TypeKind == TypeKind.Error || type.IsAnonymousType)
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
349semanticModel.GetSymbolInfo(baseType.Type, cancellationToken).GetAnySymbol() is INamedTypeSymbol { TypeKind: TypeKind.Class })
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (1)
62if (type is INamedTypeSymbol { TypeKind: TypeKind.Enum } enumType)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (8)
94if (info.Context.GenerateMembers && namedType.TypeKind != TypeKind.Delegate) 186if (namedType.TypeKind == TypeKind.Enum) 190else if (namedType.TypeKind == TypeKind.Delegate) 198var isRecordClass = namedType.TypeKind is TypeKind.Class; 209var kind = namedType.TypeKind == TypeKind.Struct ? SyntaxKind.StructDeclaration : 210namedType.TypeKind == TypeKind.Interface ? SyntaxKind.InterfaceDeclaration : SyntaxKind.ClassDeclaration; 291if (namedType.TypeKind == TypeKind.Class) 319if (namedType.TypeKind == TypeKind.Class && namedType.BaseType != null && namedType.BaseType.SpecialType != Microsoft.CodeAnalysis.SpecialType.System_Object)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
3046return ((INamedTypeSymbol)symbol).TypeKind == TypeKind.Enum; 3049return target.IsType && ((ITypeSymbol)target).TypeKind == TypeKind.Enum;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeParameterSymbolExtensions.cs (3)
60typeParameter.ConstraintTypes.Where(t => t.TypeKind == TypeKind.Class).Concat( 61typeParameter.ConstraintTypes.Where(t => t.TypeKind == TypeKind.Interface).Concat( 62typeParameter.ConstraintTypes.Where(t => t.TypeKind is not TypeKind.Class and not TypeKind.Interface)));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.ExpressionSyntaxGeneratorVisitor.cs (2)
53if (symbol.ContainingType.TypeKind == TypeKind.Submission) 67if (symbol.TypeKind != TypeKind.Error)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (4)
195if (symbol.TypeKind == TypeKind.Error && symbol.Name == "var") 240if (innerType.TypeKind != TypeKind.Pointer) 275if (symbol.ContainingType.TypeKind != TypeKind.Submission) 294if (symbol.TypeKind != TypeKind.Error)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
439if (type.TypeKind == TypeKind.Delegate)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (8)
SymbolKey\SymbolKeyTestBase.cs (1)
408else if (tinfo.Type != null && tinfo.Type.TypeKind != TypeKind.Delegate)
Workspaces\WorkspaceTests_EditorFeatures.cs (7)
502Assert.NotEqual(TypeKind.Error, classC.TypeKind); 524Assert.Equal(TypeKind.Error, classCz.TypeKind); 526Assert.Equal(TypeKind.Class, classCz.TypeKind); 556Assert.NotEqual(TypeKind.Error, classCy.TypeKind); 624Assert.NotEqual(TypeKind.Error, classCy.TypeKind); 655if (classCz.TypeKind == TypeKind.Error) 676if (classCz.TypeKind == TypeKind.Error)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (14)
Semantics\OutVarTests.cs (9)
19689Assert.True(compilation.GetSemanticModel(tree).GetTypeInfo(x1Ref).Type.TypeKind == TypeKind.Error); 19732Assert.True(compilation.GetSemanticModel(tree).GetTypeInfo(x1Ref).Type.TypeKind == TypeKind.Error); 20662Assert.True(compilation.GetSemanticModel(tree).GetTypeInfo(x4Ref).Type.TypeKind == TypeKind.Error); 20777Assert.True(model.GetTypeInfo(x1Ref).Type.TypeKind == TypeKind.Error); 20780Assert.True(model.GetTypeInfo(x2Ref).Type.TypeKind == TypeKind.Error); 20783Assert.True(model.GetTypeInfo(x3Ref).Type.TypeKind == TypeKind.Error); 20786Assert.True(model.GetTypeInfo(x4Ref).Type.TypeKind == TypeKind.Error); 33215Assert.Equal(TypeKind.Class, model.GetTypeInfo(declaration2).Type.TypeKind); 33222Assert.Equal(TypeKind.Class, typeInfo.Type.TypeKind);
Semantics\PatternMatchingTests2.cs (5)
2352Assert.Equal(TypeKind.Error, ti.Type.TypeKind); 2358Assert.Equal(TypeKind.Error, ti.Type.TypeKind); 2364Assert.Equal(TypeKind.Error, ti.Type.TypeKind); 2366Assert.Equal(TypeKind.Error, ti.ConvertedType.TypeKind); 2372Assert.Equal(TypeKind.Error, ti.ConvertedType.TypeKind);
Microsoft.CodeAnalysis.CSharp.Features (44)
ChangeSignature\CSharpChangeSignatureService.cs (1)
166if (typeSymbol != null && typeSymbol.IsKind(SymbolKind.NamedType) && ((ITypeSymbol)typeSymbol).TypeKind == TypeKind.Delegate)
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.NameGenerator.cs (2)
104if (type.TypeKind == TypeKind.Interface) 112if (type.TypeKind == TypeKind.TypeParameter)
Completion\CompletionProviders\EnumAndCompletionListTagCompletionProvider.cs (3)
129if (type.TypeKind != TypeKind.Enum) 184if (type.TypeKind == TypeKind.Enum) 349if (type.TypeKind is TypeKind.Struct or TypeKind.Class)
Completion\CompletionProviders\ExplicitInterfaceMemberCompletionProvider.cs (1)
73if (symbol?.TypeKind != TypeKind.Interface)
Completion\CompletionProviders\NamedParameterCompletionProvider.cs (1)
174if (semanticModel.GetTypeInfo(objectCreationExpression, cancellationToken).Type is INamedTypeSymbol type && within != null && type.TypeKind != TypeKind.Delegate)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (5)
974return method.ContainingType.TypeKind != TypeKind.Struct; 978if (method.ContainingType.TypeKind == TypeKind.Struct) 1968=> symbol.TypeKind switch 2549{ ContainingType.TypeKind: TypeKind.Interface } 2554IFieldSymbol { ContainingType.TypeKind: TypeKind.Enum }
ExtractMethod\CSharpMethodExtractor.PostProcessor.cs (1)
187semanticInfo.TypeKind is TypeKind.Error or TypeKind.Unknown)
ExtractMethod\CSharpSelectionResult.ExpressionResult.cs (1)
135info.ConvertedType.TypeKind != TypeKind.Interface)
NavigationBar\CSharpNavigationBarItemService.cs (1)
213return symbol.ContainingType.TypeKind == TypeKind.Enum
SignatureHelp\InvocationExpressionSignatureHelpProvider.cs (2)
83if (invokedType is INamedTypeSymbol { TypeKind: TypeKind.Delegate } or IFunctionPointerTypeSymbol) 131if (invokedType is INamedTypeSymbol { TypeKind: TypeKind.Delegate } expressionType)
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider.cs (2)
78if (type.TypeKind == TypeKind.Delegate) 115Debug.Assert(type.TypeKind == TypeKind.Delegate);
Snippets\CSharpConsoleSnippetProvider.cs (1)
42if (lambdaSymbol is IMethodSymbol { ReturnType: { SpecialType: SpecialType.System_Void } or { TypeKind: TypeKind.Error } })
src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (1)
92if (syntaxContext.SemanticModel.GetTypeInfo(invocationExpression.Expression, syntaxContext.CancellationToken).Type is { TypeKind: TypeKind.FunctionPointer })
src\Analyzers\CSharp\Analyzers\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
57if (namedTypeSymbol.TypeKind != TypeKind.Struct)
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (2)
60TypeKind: TypeKind.Struct, 259return instance is { Type.TypeKind: TypeKind.Struct } ||
src\Analyzers\CSharp\Analyzers\MakeStructReadOnly\CSharpMakeStructReadOnlyDiagnosticAnalyzer.cs (1)
83if (typeSymbol.TypeKind is not TypeKind.Struct)
src\Analyzers\CSharp\Analyzers\UseAutoProperty\CSharpUseAutoPropertyAnalyzer.cs (1)
133if (symbolInfo.GetAnySymbol() is not IFieldSymbol { ContainingType.TypeKind: TypeKind.Struct })
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (2)
118if (operation?.Parent is IAssignmentOperation { Type.TypeKind: TypeKind.Dynamic }) 340if (!(namedType.TypeKind == TypeKind.Struct && noArgConstructor.IsImplicitlyDeclared))
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (1)
137if (asType?.TypeKind == TypeKind.Dynamic)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
121if (isType?.TypeKind == TypeKind.Dynamic)
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
274if (namedType.TypeKind is not (TypeKind.Class or TypeKind.Struct))
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (1)
80if (namedType is not { TypeKind: TypeKind.Class or TypeKind.Struct })
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (4)
44TypeKind: TypeKind.Class or TypeKind.Struct, 268recordKeyword = type.TypeKind == TypeKind.Class 413type.TypeKind == TypeKind.Class 419type.TypeKind == TypeKind.Class
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\PositionalParameterInfo.cs (1)
179if (containingType.TypeKind == TypeKind.Struct && !containingType.IsReadOnly)
src\Analyzers\CSharp\CodeFixes\GenerateDefaultConstructors\CSharpGenerateDefaultConstructorsService.cs (1)
39return classType?.TypeKind is TypeKind.Class or TypeKind.Struct;
src\Analyzers\CSharp\CodeFixes\ImplementInterface\CSharpImplementInterfaceService.cs (1)
62if (interfaceSymbolInfo.GetAnySymbol() is INamedTypeSymbol interfaceType && interfaceType.TypeKind == TypeKind.Interface)
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (2)
85if (type != null && type.TypeKind != TypeKind.Error) 124return type.TypeKind == TypeKind.Enum &&
src\Analyzers\CSharp\CodeFixes\UseExplicitTypeForConst\UseExplicitTypeForConstCodeFixProvider.cs (1)
47if (type == null || type.TypeKind == TypeKind.Error || type.IsAnonymousType)
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
349semanticModel.GetSymbolInfo(baseType.Type, cancellationToken).GetAnySymbol() is INamedTypeSymbol { TypeKind: TypeKind.Class })
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (125)
Semantics\DeconstructionTests.cs (6)
4272Assert.Equal(TypeKind.Struct, typeInfo.Type.TypeKind); 4273Assert.Equal(TypeKind.Error, ((INamedTypeSymbol)typeInfo.Type).TypeArguments[0].TypeKind); 4274Assert.Equal(TypeKind.Error, ((INamedTypeSymbol)typeInfo.Type).TypeArguments[1].TypeKind); 4531Assert.Equal(TypeKind.Struct, typeInfo.Type.TypeKind); 4532Assert.Equal(TypeKind.Error, ((INamedTypeSymbol)typeInfo.Type).TypeArguments[0].TypeKind); 4533Assert.Equal(TypeKind.Error, ((INamedTypeSymbol)typeInfo.Type).TypeArguments[1].TypeKind);
Semantics\ExpressionBodiedMemberTests.cs (1)
259Assert.Equal(TypeKind.TypeParameter, semanticInfo.Type.TypeKind);
Semantics\ForEachTests.cs (1)
2891Assert.NotEqual(TypeKind.Error, localSymbolType.TypeKind);
Semantics\FunctionPointerTests.cs (5)
212Assert.Equal(TypeKind.FunctionPointer, typeInfo.Type!.TypeKind); 298Assert.Equal(TypeKind.FunctionPointer, typeInfo.ConvertedType!.TypeKind); 1940Assert.Equal(TypeKind.TypeParameter, m1InvocationSymbol.TypeArguments[0].TypeKind); 1942Assert.Equal(TypeKind.TypeParameter, functionPointer.Signature.ReturnType.TypeKind); 1943Assert.Equal(TypeKind.TypeParameter, functionPointer.Signature.Parameters[0].Type.TypeKind);
Semantics\InteractiveSemanticModelTests.cs (9)
46Assert.Equal(TypeKind.Error, baseType.TypeKind); 158Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 160Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 183Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 185Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 209Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 211Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 237Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 239Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind);
Semantics\IteratorTests.cs (1)
466Assert.Equal(TypeKind.Error, typeInfo.Type.TypeKind);
Semantics\LambdaTests.cs (15)
2125Assert.Equal(TypeKind.Class, typeInfo.Type.TypeKind); 2170Assert.Equal(TypeKind.Class, typeInfo.Type.TypeKind); 2216Assert.Equal(TypeKind.Class, typeInfo.Type.TypeKind); 2262Assert.Equal(TypeKind.Class, typeInfo.Type.TypeKind); 2308Assert.Equal(TypeKind.Class, typeInfo.Type.TypeKind); 2338Assert.Equal(TypeKind.Struct, typeInfo.Type.TypeKind); 2365Assert.Equal(TypeKind.Class, typeInfo.Type.TypeKind); 2420Assert.Equal(TypeKind.Class, typeInfo.Type.TypeKind); 2466Assert.Equal(TypeKind.Class, typeInfo.Type.TypeKind); 2512Assert.Equal(TypeKind.Class, typeInfo.Type.TypeKind); 2545Assert.Equal(TypeKind.Class, typeInfo.Type.TypeKind); 2578Assert.Equal(TypeKind.Class, typeInfo.Type.TypeKind); 2615Assert.Equal(TypeKind.Class, typeInfo.Type.TypeKind); 3002Assert.Equal(TypeKind.Error, model.GetTypeInfo(contentType).Type.TypeKind); 3011Assert.Equal(TypeKind.Error, model.GetTypeInfo(b).Type.TypeKind);
Semantics\LocalFunctionTests.cs (2)
1779Assert.Equal(TypeKind.Error, aTypeInfo.Type.TypeKind); 1854Assert.Equal(TypeKind.Error, aTypeInfo.Type.TypeKind);
Semantics\NativeIntegerTests.cs (4)
239Assert.Equal(TypeKind.Struct, type.TypeKind); 735Assert.Equal(TypeKind.Error, type.TypeKind); 15419Assert.Equal(TypeKind.Interface, symbol.TypeKind); 15449Assert.Equal(TypeKind.TypeParameter, symbol.TypeKind);
Semantics\NullableReferenceTypesTests.cs (30)
116619Assert.Equal(TypeKind.Struct, compilation1.GetTypeByMetadataName("A").TypeKind); 116620Assert.Equal(TypeKind.Enum, compilation1.GetTypeByMetadataName("B").TypeKind); 116621Assert.Equal(TypeKind.Class, compilation1.GetTypeByMetadataName("C").TypeKind); 116622Assert.Equal(TypeKind.Delegate, compilation1.GetTypeByMetadataName("D").TypeKind); 116623Assert.Equal(TypeKind.Interface, compilation1.GetTypeByMetadataName("I1").TypeKind); 116639Assert.Equal(TypeKind.Struct, compilation2.GetTypeByMetadataName("A").TypeKind); 116640Assert.Equal(TypeKind.Enum, compilation2.GetTypeByMetadataName("B").TypeKind); 116641Assert.Equal(TypeKind.Class, compilation2.GetTypeByMetadataName("C").TypeKind); 116642Assert.Equal(TypeKind.Delegate, compilation2.GetTypeByMetadataName("D").TypeKind); 116643Assert.Equal(TypeKind.Interface, compilation2.GetTypeByMetadataName("I1").TypeKind); 116650Assert.Equal(TypeKind.Struct, compilation3.GetTypeByMetadataName("A").TypeKind); 116651Assert.Equal(TypeKind.Enum, compilation3.GetTypeByMetadataName("B").TypeKind); 116652Assert.Equal(TypeKind.Class, compilation3.GetTypeByMetadataName("C").TypeKind); 116653Assert.Equal(TypeKind.Delegate, compilation3.GetTypeByMetadataName("D").TypeKind); 116654Assert.Equal(TypeKind.Interface, compilation3.GetTypeByMetadataName("I1").TypeKind); 116675Assert.Equal(TypeKind.Class, a.TypeKind); 116677Assert.Equal(TypeKind.Class, b.TypeKind); 116679Assert.Equal(TypeKind.Class, c.TypeKind); 116681Assert.Equal(TypeKind.Class, d.TypeKind); 116683Assert.Equal(TypeKind.Interface, i1.TypeKind); 116743Assert.Equal(TypeKind.Class, a.TypeKind); 116745Assert.Equal(TypeKind.Class, b.TypeKind); 116747Assert.Equal(TypeKind.Class, c.TypeKind); 116749Assert.Equal(TypeKind.Class, d.TypeKind); 116751Assert.Equal(TypeKind.Interface, i1.TypeKind); 116759Assert.Equal(TypeKind.Struct, compilation7.GetTypeByMetadataName("A").TypeKind); 116760Assert.Equal(TypeKind.Enum, compilation7.GetTypeByMetadataName("B").TypeKind); 116761Assert.Equal(TypeKind.Class, compilation7.GetTypeByMetadataName("C").TypeKind); 116762Assert.Equal(TypeKind.Delegate, compilation7.GetTypeByMetadataName("D").TypeKind); 116763Assert.Equal(TypeKind.Interface, compilation7.GetTypeByMetadataName("I1").TypeKind);
Semantics\QueryTests.cs (2)
3382Assert.NotEqual(TypeKind.Error, typeInfo2.Type.TypeKind); 3391Assert.NotEqual(TypeKind.Error, typeInfo1.Type.TypeKind);
Semantics\ScriptSemanticsTests.cs (4)
251Assert.Equal(TypeKind.Error, summary.Type.TypeKind); 252Assert.Equal(TypeKind.Error, summary.ConvertedType.TypeKind); 568Assert.Equal(TypeKind.Error, summary.Type.TypeKind); 569Assert.Equal(TypeKind.Error, summary.ConvertedType.TypeKind);
Semantics\UnsafeTests.cs (10)
7271Assert.Equal(TypeKind.Pointer, type.TypeKind); 7340Assert.Equal(TypeKind.Pointer, typeInfo.Type.TypeKind); 7341Assert.Equal(TypeKind.Error, ((IPointerTypeSymbol)typeInfo.Type).PointedAtType.TypeKind); 7378Assert.Equal(TypeKind.Pointer, typeInfo.Type.TypeKind); 7379Assert.Equal(TypeKind.Error, ((IPointerTypeSymbol)typeInfo.Type).PointedAtType.TypeKind); 8351Assert.Equal(TypeKind.Pointer, typeInfo.ConvertedType.TypeKind); 8387Assert.Equal(TypeKind.Pointer, type.TypeKind); 8391Assert.Equal(TypeKind.Pointer, convertedType.TypeKind); 10186Assert.Equal(TypeKind.Pointer, type.TypeKind); 10698Assert.Equal(TypeKind.Enum, type.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 (562)
Compilation\GetSemanticInfoTests.cs (5)
1497Assert.Equal(TypeKind.Error, bindInfo.Type.TypeKind); 1498Assert.Equal(TypeKind.Struct, bindInfo.ConvertedType.TypeKind); 1818Assert.Equal(TypeKind.Array, candidate.Parameters.Last().Type.TypeKind); 1819Assert.Equal(TypeKind.TypeParameter, ((IMethodSymbol)candidate.OriginalDefinition).Parameters.Last().Type.TypeKind); 4381Assert.Equal(TypeKind.Enum, info.Type.TypeKind);
Compilation\SemanticModelAPITests.cs (8)
2277Assert.Equal(TypeKind.Pointer, typeInfo.Type.TypeKind); 2279Assert.Equal(TypeKind.Pointer, typeInfo.ConvertedType.TypeKind); 3134Assert.Equal(TypeKind.Error, ((IParameterSymbol)symbol).Type.TypeKind); 3167Assert.Equal(TypeKind.Error, info.ConvertedType.TypeKind); 4331Assert.Equal(TypeKind.Dynamic, dynamicType.Type.TypeKind); 4566Assert.Equal(TypeKind.Class, type.TypeKind); 4582Assert.Equal(TypeKind.Class, type.TupleElements[0].Type.TypeKind); 4583Assert.Equal(TypeKind.Class, type.TupleElements[1].Type.TypeKind);
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (7)
1012Assert.Equal(TypeKind.Class, symbol.TypeKind); 2330Assert.Equal(TypeKind.Error, info.Type.TypeKind); 2983Assert.Equal(TypeKind.Interface, dsym2.TypeKind); 2989Assert.Equal(TypeKind.Struct, dsym3.TypeKind); 4748Assert.Equal(TypeKind.Enum, enumSymbol.TypeKind); 4778Assert.Equal(TypeKind.Struct, structSymbol.TypeKind); 4779Assert.Equal(TypeKind.Interface, interfaceSymbol.TypeKind);
Compilation\SemanticModelGetSemanticInfoTests.cs (527)
85Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 87Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 116Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 118Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 150Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 152Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 191Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 193Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 232Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 234Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 272Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 274Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 309Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 311Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 462Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 464Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 502Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 504Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 545Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 547Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 593Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 595Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 641Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 643Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 694Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 696Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 725Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 727Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 761Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 763Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 1643Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 1645Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 1719Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 1721Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 1750Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 1779Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 1781Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 1808Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 1810Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 1838Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 1840Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 1868Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 1870Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 1898Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 1900Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 1927Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 1929Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 1957Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 1959Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 1987Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 1989Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 2017Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 2019Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 2049Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 2051Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 2081Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 2083Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 2118Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 2120Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 2151Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 2153Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 2191Assert.Equal(TypeKind.Interface, semanticInfo.Type.TypeKind); 2193Assert.Equal(TypeKind.Interface, semanticInfo.ConvertedType.TypeKind); 2263Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 2265Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 2298Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 2300Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 2348Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 2350Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 2394Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 2396Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 2437Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 2439Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 2492Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 2494Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 2544Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 2546Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 2576Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 2578Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 2649Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 2651Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 2690Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 2692Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 2870Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 2872Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 2946Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 2948Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 2982Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 2984Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3072Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 3074Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3117Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 3119Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3394Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 3396Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 3425Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 3427Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3457Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 3459Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 3492Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 3494Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 3523Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 3525Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 3589Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 3591Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3627Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 3629Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3671Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 3673Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3705Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 3707Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3739Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 3741Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3773Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 3775Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3803Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 3805Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 3835Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 3837Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 3864Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 3866Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3899Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 3901Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3938Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 3972Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 3974Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 4007Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 4009Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 4038Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 4040Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 4069Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 4071Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 4135Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 4137Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 4159Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 4161Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 4185Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 4187Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 4246Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 4248Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 4280Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 4282Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 4318Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 4320Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 4372Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 4374Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 4443Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 4445Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 4474Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 4476Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 4569Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 4571Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 4607Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 4609Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 4643Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 4645Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 4673Assert.Equal(TypeKind.Enum, semanticInfo.Type.TypeKind); 4675Assert.Equal(TypeKind.Enum, semanticInfo.ConvertedType.TypeKind); 4711Assert.Equal(TypeKind.Enum, semanticInfo.Type.TypeKind); 4713Assert.Equal(TypeKind.Enum, semanticInfo.ConvertedType.TypeKind); 4747Assert.Equal(TypeKind.Enum, semanticInfo.Type.TypeKind); 4749Assert.Equal(TypeKind.Enum, semanticInfo.ConvertedType.TypeKind); 4783Assert.Equal(TypeKind.Enum, semanticInfo.Type.TypeKind); 4785Assert.Equal(TypeKind.Enum, semanticInfo.ConvertedType.TypeKind); 4814Assert.Equal(TypeKind.Enum, semanticInfo.Type.TypeKind); 4816Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 4851Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 4853Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 4878Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 4880Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 4964Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 4966Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 5016Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 5018Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 5106Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 5108Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 5153Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 5155Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 5199Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 5201Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 5278Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 5280Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 5320Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 5322Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 5444Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 5446Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 5480Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 5482Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 5509Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 5511Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 5542Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 5544Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 5574Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 5576Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 5606Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 5608Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 5658Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind); 5694Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 5704Assert.Equal(TypeKind.Error, lambdaSym.Parameters[0].Type.TypeKind); 5728Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 5730Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 5761Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 5763Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 5795Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 5797Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 5828Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 5830Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 5862Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 5864Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 5896Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 5898Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 5931Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 5933Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 5964Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 5966Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 5998Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 6000Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 6031Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 6033Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 6059Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 6061Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 6091Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 6093Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 6117Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 6119Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 6144Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 6146Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 6177Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 6179Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 6329Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 6331Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 6344Assert.Equal(TypeKind.Error, param.Type.TypeKind); 6365Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 6367Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 6437Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind); 6519Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 6521Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 6554Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 6556Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 6591Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 6593Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 6675Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 6677Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 6806Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 6808Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 6875Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 6877Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 6920Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 6922Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 6965Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 6967Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 7078Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 7080Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 7106Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 7108Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 7137Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 7139Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 7169Assert.Equal(TypeKind.Delegate, semanticInfo.Type.TypeKind); 7171Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind); 7201Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 7203Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 7233Assert.Equal(TypeKind.Delegate, semanticInfo.Type.TypeKind); 7235Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind); 7288Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 7290Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 7316Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 7318Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 7343Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 7345Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 7378Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 7380Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 7399Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 7401Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 7482Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 7484Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 7526Assert.Equal(TypeKind.Enum, semanticInfo.Type.TypeKind); 7698Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 7700Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 7727Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 7729Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 7851Assert.Equal(TypeKind.Delegate, semanticInfo.Type.TypeKind); 7853Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind); 7917Assert.Equal(TypeKind.Delegate, semanticInfo.Type.TypeKind); 7919Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind); 7983Assert.Equal(TypeKind.Delegate, semanticInfo.Type.TypeKind); 7985Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind); 8303Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 8369Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 8371Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 8403Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 8405Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 8514Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 8516Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 8560Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 8562Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 8605Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 8607Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 8646Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 8686Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 8726Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 8728Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 8770Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 8809Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 8811Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 8851Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 8853Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 8893Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 8895Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 8933Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 8935Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 9064Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 9123Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 9125Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 9358Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 9360Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 9417Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 9419Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 9456Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 9458Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 9614Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 9616Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 9669Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 9671Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 9720Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 9722Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 9780Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 9782Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 9831Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 9833Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 9886Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 9888Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 9917Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 9919Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 9951Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 9953Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 9987Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 9989Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10023Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10025Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10059Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10061Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10103Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10105Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10140Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10142Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10177Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10179Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10216Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10218Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10247Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10249Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10282Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10284Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10317Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 10319Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 10351Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 10353Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 10385Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 10387Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 10466Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 10468Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 10494Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10523Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10558Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 10560Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 10600Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 10602Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 10637Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 10639Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 10674Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 10676Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 10713Assert.Equal(TypeKind.Delegate, semanticInfo.Type.TypeKind); 10715Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind); 10756Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 10758Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 10798Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10800Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10835Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 10837Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 10904Assert.Equal(TypeKind.Array, semanticInfo.Type.TypeKind); 10906Assert.Equal(TypeKind.Array, semanticInfo.ConvertedType.TypeKind); 11011Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 11013Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 11042Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 11044Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 11075Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 11077Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 11108Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 11110Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 11144Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 11146Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 11222Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 11224Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 11266Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 11268Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 11303Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 11305Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 11340Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 11342Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 11380Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 11382Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 11427Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 11429Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 11460Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 11462Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 11497Assert.Equal(TypeKind.TypeParameter, semanticInfo.Type.TypeKind); 11499Assert.Equal(TypeKind.TypeParameter, semanticInfo.ConvertedType.TypeKind); 11572Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 11574Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 11710Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 11712Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 11795Assert.Equal(TypeKind.Array, semanticInfo.Type.TypeKind); 11797Assert.Equal(TypeKind.Array, semanticInfo.ConvertedType.TypeKind); 11831Assert.Equal(TypeKind.Array, semanticInfo.Type.TypeKind); 11833Assert.Equal(TypeKind.Array, semanticInfo.ConvertedType.TypeKind); 11866Assert.Equal(TypeKind.Array, semanticInfo.Type.TypeKind); 11868Assert.Equal(TypeKind.Array, semanticInfo.ConvertedType.TypeKind); 11901Assert.Equal(TypeKind.Array, semanticInfo.Type.TypeKind); 11903Assert.Equal(TypeKind.Array, semanticInfo.ConvertedType.TypeKind); 11937Assert.Equal(TypeKind.Array, semanticInfo.Type.TypeKind); 11939Assert.Equal(TypeKind.Array, semanticInfo.ConvertedType.TypeKind); 11973Assert.Equal(TypeKind.Array, semanticInfo.Type.TypeKind); 11975Assert.Equal(TypeKind.Array, semanticInfo.ConvertedType.TypeKind); 12008Assert.Equal(TypeKind.Array, semanticInfo.Type.TypeKind); 12010Assert.Equal(TypeKind.Array, semanticInfo.ConvertedType.TypeKind); 12043Assert.Equal(TypeKind.Array, semanticInfo.Type.TypeKind); 12045Assert.Equal(TypeKind.Array, semanticInfo.ConvertedType.TypeKind); 12079Assert.Equal(TypeKind.Array, semanticInfo.Type.TypeKind); 12081Assert.Equal(TypeKind.Array, semanticInfo.ConvertedType.TypeKind); 12186Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 12188Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 12256Assert.Equal(TypeKind.Interface, semanticInfo.Type.TypeKind); 12258Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 12322Assert.Equal(TypeKind.TypeParameter, semanticInfo.Type.TypeKind); 12324Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 12426Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 12428Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 12484Assert.Equal(TypeKind.Dynamic, semanticInfo.Type.TypeKind); 12486Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 12526Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 12528Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 12572Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 12610Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 12612Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 12644Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 12646Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 12676Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 12678Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 12739Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 12741Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 12771Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 12773Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 12803Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 12805Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 12846Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 12848Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 12922Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 12924Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 12958Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 12960Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 12996Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 12998Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 13037Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 13039Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 13070Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 13098Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 13100Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 13129Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 13131Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 13163Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 13165Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 13197Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 13199Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 13263Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 13265Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 13323Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 13325Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 13442Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 13444Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 13503Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 13505Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 13804Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 13806Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 13839Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 13841Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 13873Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 13875Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 13912Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 13914Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 13951Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 13953Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 13978Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 13980Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 14005Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 14007Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 14081Assert.Equal(TypeKind.Interface, semanticInfo.Type.TypeKind); 14083Assert.Equal(TypeKind.Interface, semanticInfo.ConvertedType.TypeKind); 14119Assert.Equal(TypeKind.Interface, semanticInfo.Type.TypeKind); 14121Assert.Equal(TypeKind.Interface, semanticInfo.ConvertedType.TypeKind); 14159Assert.Equal(TypeKind.Array, semanticInfo.Type.TypeKind); 14161Assert.Equal(TypeKind.Array, semanticInfo.ConvertedType.TypeKind); 14245Assert.Equal(TypeKind.Interface, semanticInfo.Type.TypeKind); 14247Assert.Equal(TypeKind.Interface, semanticInfo.ConvertedType.TypeKind); 14337Assert.Equal(TypeKind.Interface, semanticInfo.Type.TypeKind); 14339Assert.Equal(TypeKind.Interface, semanticInfo.ConvertedType.TypeKind); 14380Assert.Equal(TypeKind.Interface, semanticInfo.Type.TypeKind); 14382Assert.Equal(TypeKind.Interface, semanticInfo.ConvertedType.TypeKind); 14541Assert.Equal(TypeKind.Interface, semanticInfo.Type.TypeKind); 14543Assert.Equal(TypeKind.Interface, semanticInfo.ConvertedType.TypeKind); 14626Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 14628Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 15084Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 15086Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 15152Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 15154Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind); 15183Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 15185Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 15214Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 15216Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 15245Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 15247Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 15276Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind); 15278Assert.Equal(TypeKind.Struct, semanticInfo.ConvertedType.TypeKind); 15338Assert.Equal(TypeKind.Dynamic, semanticInfo.Type.TypeKind); 15340Assert.Equal(TypeKind.Dynamic, semanticInfo.ConvertedType.TypeKind); 15405Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind); 15407Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind);
DocumentationComments\CrefTests.cs (1)
6540Assert.Equal(TypeKind.Error, ((INamedTypeSymbol)actualSymbol1).TypeArguments.Single().TypeKind);
Symbols\AssemblyAndNamespaceTests.cs (1)
382Assert.Equal(TypeKind.Class, objectType.TypeKind);
Symbols\CorLibrary\CorTypes.cs (2)
202Assert.Equal(TypeKind.Error, t.TypeKind); 214Assert.Equal(TypeKind.Error, t.TypeKind);
Symbols\MissingSpecialMember.cs (7)
158Assert.Equal(TypeKind.Error, specialType.TypeKind); 163Assert.Equal(TypeKind.Class, lookupType.TypeKind); 236Assert.Equal(TypeKind.Struct, specialType.TypeKind); 240Assert.Equal(TypeKind.Struct, lookupType.TypeKind); 276Assert.Equal(TypeKind.Class, lookupType.TypeKind); 309Assert.Equal(TypeKind.Enum, lookupType.TypeKind); 385Assert.Equal(TypeKind.Class, lookupType.TypeKind);
Symbols\Source\DelegateTests.cs (1)
130Assert.Equal(TypeKind.Delegate, v.TypeKind);
Symbols\SymbolDistinguisherTests.cs (2)
318Assert.NotEqual(TypeKind.Error, validType.TypeKind); 319Assert.Equal(TypeKind.Error, errorType.TypeKind);
Symbols\TypeTests.cs (1)
1776Assert.Equal(TypeKind.Interface, ((ITypeSymbol)tinfo.Type).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 (3)
Extensions.cs (3)
713return type.TypeKind == TypeKind.Dynamic; 718return type.TypeKind == TypeKind.Delegate; 835return type.TypeKind == TypeKind.Enum ? ((INamedTypeSymbol)type).EnumUnderlyingType : type;
Microsoft.CodeAnalysis.CSharp.Workspaces (36)
Classification\SyntaxClassification\SyntaxTokenClassifier.cs (1)
24private static readonly Func<ITypeSymbol, bool> s_shouldInclude = t => t.TypeKind != TypeKind.Error && t.GetArity() > 0;
Rename\CSharpRenameRewriterLanguageService.cs (2)
802if (renamedSymbol is INamedTypeSymbol { TypeKind: not TypeKind.Enum } namedType) 807if (renamedSymbol.ContainingSymbol is INamedTypeSymbol { TypeKind: not TypeKind.Enum } containingNamedType &&
Simplification\CSharpSimplificationService.Expander.cs (1)
801if (typeinfo.Type != null && typeinfo.Type.TypeKind == TypeKind.Dynamic)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
42if (typeSymbol.TypeKind is TypeKind.Class or TypeKind.Struct)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
442if (parameter.Type.OriginalDefinition.TypeKind != TypeKind.TypeParameter)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (8)
245if (originalDelegateCreationOperation.Type?.TypeKind != TypeKind.Delegate) 262if (rewrittenDelegateCreationOperation.Type?.TypeKind != TypeKind.Delegate) 308if (originalConvertedType is null || originalConvertedType.TypeKind == TypeKind.Error) 349if (rewrittenConvertedType is null || rewrittenConvertedType.TypeKind == TypeKind.Error || !rewrittenConversion.Exists) 523originalConvertedType.IsReferenceType && rewrittenConvertedType.TypeKind == TypeKind.Dynamic) 911if (!original.IsReferenceType || original.TypeKind == TypeKind.Interface) 1235if (originalMemberSymbol.ContainingType.TypeKind == TypeKind.Interface) 1275rewrittenType.TypeKind == TypeKind.Array ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
294if (declaredType != null && declaredType.TypeKind == TypeKind.Dynamic)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (1)
62if (type is INamedTypeSymbol { TypeKind: TypeKind.Enum } enumType)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (8)
94if (info.Context.GenerateMembers && namedType.TypeKind != TypeKind.Delegate) 186if (namedType.TypeKind == TypeKind.Enum) 190else if (namedType.TypeKind == TypeKind.Delegate) 198var isRecordClass = namedType.TypeKind is TypeKind.Class; 209var kind = namedType.TypeKind == TypeKind.Struct ? SyntaxKind.StructDeclaration : 210namedType.TypeKind == TypeKind.Interface ? SyntaxKind.InterfaceDeclaration : SyntaxKind.ClassDeclaration; 291if (namedType.TypeKind == TypeKind.Class) 319if (namedType.TypeKind == TypeKind.Class && namedType.BaseType != null && namedType.BaseType.SpecialType != Microsoft.CodeAnalysis.SpecialType.System_Object)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
3046return ((INamedTypeSymbol)symbol).TypeKind == TypeKind.Enum; 3049return target.IsType && ((ITypeSymbol)target).TypeKind == TypeKind.Enum;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeParameterSymbolExtensions.cs (3)
60typeParameter.ConstraintTypes.Where(t => t.TypeKind == TypeKind.Class).Concat( 61typeParameter.ConstraintTypes.Where(t => t.TypeKind == TypeKind.Interface).Concat( 62typeParameter.ConstraintTypes.Where(t => t.TypeKind is not TypeKind.Class and not TypeKind.Interface)));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.ExpressionSyntaxGeneratorVisitor.cs (2)
53if (symbol.ContainingType.TypeKind == TypeKind.Submission) 67if (symbol.TypeKind != TypeKind.Error)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (4)
195if (symbol.TypeKind == TypeKind.Error && symbol.Name == "var") 240if (innerType.TypeKind != TypeKind.Pointer) 275if (symbol.ContainingType.TypeKind != TypeKind.Submission) 294if (symbol.TypeKind != TypeKind.Error)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
439if (type.TypeKind == TypeKind.Delegate)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
SymbolFinder\DependentTypeFinderTests.cs (2)
580var delegates = transitiveImpls.Where(i => i.TypeKind == TypeKind.Delegate); 610var enums = transitiveImpls.Where(i => i.TypeKind == TypeKind.Enum);
SymbolFinder\FindSymbolAtPositionTests.cs (1)
62Assert.Equal(TypeKind.Enum, fieldSymbol.ContainingType.TypeKind);
Microsoft.CodeAnalysis.Features (68)
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.State.cs (1)
54ContainingType.TypeKind == TypeKind.Interface ||
AddDebuggerDisplay\AbstractAddDebuggerDisplayCodeRefactoringProvider.cs (1)
106=> typeSymbol.TypeKind is TypeKind.Class or TypeKind.Struct;
Completion\Providers\AbstractPartialMethodCompletionProvider.cs (1)
90if (enclosingSymbol.TypeKind is not (TypeKind.Struct or TypeKind.Class))
Completion\Providers\AbstractPartialTypeCompletionProvider.cs (1)
95.Where(symbol => declaredSymbol.TypeKind == symbol.TypeKind &&
Completion\Providers\AbstractRecommendationServiceBasedCompletionProvider.cs (1)
91if (namedType.TypeKind == TypeKind.Interface)
Completion\Providers\ImportCompletionProvider\AbstractTypeImportCompletionProvider.cs (1)
80TypeKind: not TypeKind.Error
ConvertCast\AbstractConvertCastCodeRefactoringProvider.cs (1)
52if (type is { TypeKind: TypeKind.Error })
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (1)
279if (collectionType.TypeKind == TypeKind.Interface && knownCollectionInterfaces.Contains(collectionType.OriginalDefinition))
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (3)
303return (symbol is IParameterSymbol { ContainingType: not { TypeKind: TypeKind.Delegate } }) 340=> symbol.TypeKind switch 351=> symbol.IsConst ? ((symbol.ContainingType.TypeKind == TypeKind.Enum) ? FeaturesResources.enum_value : FeaturesResources.const_field) :
ExtractInterface\AbstractExtractInterfaceService.cs (2)
263var candidateInterfaceName = type.TypeKind == TypeKind.Interface ? type.Name : "I" + type.Name; 326if (typeToExtractFrom.TypeKind == TypeKind.Interface)
ExtractMethod\MethodExtractor.Analyzer.cs (1)
170&& thisParameterBeingRead.Type is { TypeKind: TypeKind.Struct, IsReadOnly: false };
ExtractMethod\MethodExtractor.cs (1)
271if (type.TypeKind is TypeKind.Error or TypeKind.Unknown)
FindUsages\AbstractFindUsagesService_FindImplementations.cs (1)
193else if (symbol is INamedTypeSymbol { TypeKind: TypeKind.Class } namedType)
GenerateConstructorFromMembers\AbstractGenerateConstructorFromMembersCodeRefactoringProvider.State.cs (1)
68if (ContainingType == null || ContainingType.TypeKind == TypeKind.Interface)
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider.cs (2)
88if (containingType?.TypeKind is not TypeKind.Class and not TypeKind.Struct) 299if (generateEquals && containingType.TypeKind == TypeKind.Struct)
GenerateType\AbstractGenerateTypeService.GenerateNamedType.cs (3)
139if (_state.BaseTypeOrInterfaceOpt.TypeKind == TypeKind.Interface || argumentList.Count == 0) 277if (_state.BaseTypeOrInterfaceOpt == null || _state.BaseTypeOrInterfaceOpt.TypeKind == TypeKind.Interface) 287if (_state.BaseTypeOrInterfaceOpt != null && _state.BaseTypeOrInterfaceOpt.TypeKind == TypeKind.Interface)
GenerateType\AbstractGenerateTypeService.State.cs (3)
245if (baseType.TypeKind is not TypeKind.Class and not TypeKind.Interface) 275(BaseTypeOrInterfaceOpt == null || BaseTypeOrInterfaceOpt.TypeKind == TypeKind.Interface)) 293if (TypeToGenerateInOpt.TypeKind is not TypeKind.Class and
GoToBase\FindBaseHelpers.cs (1)
20TypeKind: TypeKind.Class or TypeKind.Interface or TypeKind.Struct,
InheritanceMargin\AbstractInheritanceMarginService.cs (1)
72return !symbol.IsStatic && namedType.TypeKind is TypeKind.Interface or TypeKind.Class or TypeKind.Struct;
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (2)
315if (memberSymbol.TypeKind == TypeKind.Interface) 328Debug.Assert(memberSymbol.TypeKind is TypeKind.Class or TypeKind.Struct);
InitializeParameter\AbstractInitializeParameterCodeRefactoringProvider.cs (1)
89methodSymbol.ContainingType.TypeKind == TypeKind.Interface)
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (2)
483if (symbol.TypeKind == TypeKind.Delegate) 543if (symbol.ContainingType != null && symbol.ContainingType.TypeKind == TypeKind.Enum)
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
68public TypeKind TypeKind => _symbol.TypeKind;
MoveStaticMembers\MoveStaticMembersWithDialogCodeAction.cs (1)
145return oldType.TypeKind;
PullMemberUp\MemberAndDestinationValidator.cs (1)
16if (destination.TypeKind is not TypeKind.Interface and not TypeKind.Class)
PullMemberUp\MembersPuller.cs (2)
63return pullMembersUpOptions.Destination.TypeKind switch 491return destination.TypeKind == TypeKind.Interface
PullMemberUp\PullMembersUpOptionsBuilder.cs (1)
20if (destination.TypeKind == TypeKind.Interface)
RQName\RQNodeBuilder.cs (3)
289else if (symbol.TypeKind == TypeKind.TypeParameter) 293else if (symbol.TypeKind == TypeKind.Unknown) 297else if (symbol.TypeKind == TypeKind.Dynamic)
Shared\Extensions\ISymbolExtensions_2.cs (2)
40if (containingType != null && containingType.TypeKind == TypeKind.Enum) 58switch (((INamedTypeSymbol)symbol).TypeKind)
Snippets\SnippetFunctionService.cs (1)
59if (typeSymbol?.TypeKind != TypeKind.Enum)
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchExpressionHelpers.cs (1)
27if (switchExpressionType?.TypeKind == TypeKind.Enum)
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchStatementHelpers.cs (1)
68if (switchExpressionType?.TypeKind == TypeKind.Enum)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
183if (value.Type.TypeKind == TypeKind.Dynamic)
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
184if (namedType.TypeKind is not TypeKind.Class and not TypeKind.Struct and not TypeKind.Module)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (1)
405return TypeToGenerateIn?.TypeKind is (TypeKind?)TypeKind.Class or (TypeKind?)TypeKind.Struct;
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorsService.State.cs (2)
58baseType.TypeKind == TypeKind.Error) 109if (classType.TypeKind == TypeKind.Struct)
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberService.cs (2)
43if (!typeKinds.Contains(typeToGenerateIn.TypeKind)) 46if (typeToGenerateIn.TypeKind == TypeKind.Interface && isStatic)
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.CodeAction.cs (2)
78generateMethodBodies: _state.TypeToGenerateIn.TypeKind != TypeKind.Interface)), 94generateMethodBodies: _state.TypeToGenerateIn.TypeKind != TypeKind.Interface)),
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.cs (1)
51state.TypeToGenerateIn.TypeKind != TypeKind.Interface &&
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (2)
121return _state.TypeToGenerateIn.TypeKind != TypeKind.Interface && _refKind != RefKind.None 128if (state.TypeToGenerateIn.TypeKind == TypeKind.Interface)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (3)
104if (state.TypeToGenerateIn.TypeKind == TypeKind.Interface && state.IsStatic) 114var isOnlyReadAndIsInInterface = state.TypeToGenerateIn.TypeKind == TypeKind.Interface && !state.IsWrittenTo; 148if (state.TypeToGenerateIn.TypeKind != TypeKind.Interface)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
90if (this.TypeToGenerateIn.TypeKind == TypeKind.Interface)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementHelpers.cs (2)
227if (state.ClassOrStructType.TypeKind != TypeKind.Class) 250if (idisposable?.TypeKind == TypeKind.Interface)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (1)
270var condition1 = typeParameter.ConstraintTypes.Count(t => t.TypeKind == TypeKind.Class) >= 2;
src\Analyzers\Core\CodeFixes\UnsealClass\AbstractUnsealClassCodeFixProvider.cs (1)
40type.TypeKind == TypeKind.Class && type.IsSealed && !type.IsStatic)
src\Analyzers\Core\CodeFixes\UseConditionalExpression\AbstractUseConditionalExpressionCodeFixProvider.cs (2)
178conversion.Type.TypeKind != TypeKind.Error) 182if (conversion.Operand.Type == null || conversion.Operand.Type.TypeKind != TypeKind.Error)
Microsoft.CodeAnalysis.Test.Utilities (7)
Diagnostics\CouldHaveMoreSpecificTypeAnalyzer.cs (6)
205if (derivedType.TypeKind == TypeKind.Class || derivedType.TypeKind == TypeKind.Structure) 211else if (derivedType.TypeKind == TypeKind.Interface) 226return baseType.TypeKind == TypeKind.Class && baseType.SpecialType == SpecialType.System_Object; 261TypeKind targetTypeKind = targetType.TypeKind; 262TypeKind sourceTypeKind = sourceType.TypeKind;
Diagnostics\EmptyArrayAnalyzer.cs (1)
76&& elementType?.TypeKind != TypeKind.Pointer)
Microsoft.CodeAnalysis.VisualBasic (12)
SymbolDisplay\SymbolDisplayVisitor.Members.vb (3)
29If symbol.ContainingType.TypeKind = TypeKind.Enum Then 616(containingType.TypeKind <> TypeKind.Interface AndAlso Not IsEnumMember(symbol))) Then 620(containingType Is Nothing OrElse containingType.TypeKind <> TypeKind.Module) AndAlso
SymbolDisplay\SymbolDisplayVisitor.Types.vb (5)
199symbol.TypeKind = TypeKind.Delegate AndAlso 253Select Case symbol.TypeKind 270Throw ExceptionUtilities.UnexpectedValue(symbol.TypeKind) 323Select Case symbol.TypeKind 438Dim keyword = GetTypeKindKeyword(symbol.TypeKind)
SymbolDisplay\SymbolDisplayVisitor.vb (2)
344(containingType.TypeKind <> TypeKind.Interface AndAlso Not IsEnumMember(symbol))) Then 391symbol.ContainingType.TypeKind = TypeKind.Enum AndAlso
SymbolDisplay\SymbolDisplayVisitor_Minimal.vb (1)
107If symbol.TypeKind <> TypeKind.Error Then
Symbols\TypeSymbol.vb (1)
581Private ReadOnly Property ITypeSymbol_TypeKind As TypeKind Implements ITypeSymbol.TypeKind, ITypeSymbolInternal.TypeKind
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SemanticModelExtensions.vb (1)
256If parameter.Type.TypeKind <> TypeKind.TypeParameter Then
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (21)
src\Analyzers\VisualBasic\CodeFixes\GenerateDefaultConstructors\VisualBasicGenerateDefaultConstructorsService.vb (1)
35Return classType IsNot Nothing AndAlso classType.TypeKind = TypeKind.Class
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ExpressionGenerator.vb (1)
49ElseIf type?.TypeKind = TypeKind.Enum Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamedTypeGenerator.vb (8)
53declaration = If(options.Context.GenerateMembers AndAlso namedType.TypeKind <> TypeKind.Delegate, 94If namedType.TypeKind = TypeKind.Enum Then 96ElseIf namedType.TypeKind = TypeKind.Delegate Then 100Dim isInterface = namedType.TypeKind = TypeKind.Interface 101Dim isStruct = namedType.TypeKind = TypeKind.Struct 102Dim isModule = namedType.TypeKind = TypeKind.Module 187If namedType.TypeKind = TypeKind.Class Then 205If namedType.TypeKind = TypeKind.Struct OrElse
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Editing\VisualBasicImportAdder.vb (1)
113If type?.TypeKind = TypeKind.Module Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTreeExtensions.vb (1)
328objectCreationType.TypeKind = TypeKind.Delegate Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\VisualBasicSyntaxContextExtensions.vb (1)
125objectCreationType.TypeKind = TypeKind.Delegate Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ExpressionSyntaxGeneratorVisitor.vb (2)
40If symbol.ContainingType.TypeKind = TypeKind.Submission Then 48If symbol.TypeKind <> TypeKind.[Error] Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\IMethodSymbolExtensions.vb (1)
32If parameter.Type.TypeKind = TypeKind.Delegate Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (2)
160If symbol.ContainingType.TypeKind = TypeKind.Submission Then 167If _addGlobal AndAlso symbol.TypeKind <> TypeKind.[Error] Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (3)
30If info.Type IsNot Nothing AndAlso info.Type.TypeKind <> TypeKind.Error Then 34If info.ConvertedType IsNot Nothing AndAlso info.ConvertedType.TypeKind <> TypeKind.Error Then 296If namedType.TypeKind = TypeKind.Delegate Then
Microsoft.CodeAnalysis.VisualBasic.Features (25)
ChangeSignature\VisualBasicChangeSignatureService.vb (1)
132If typeSymbol IsNot Nothing AndAlso typeSymbol.IsKind(SymbolKind.NamedType) AndAlso DirectCast(typeSymbol, ITypeSymbol).TypeKind = TypeKind.Delegate Then
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (6)
189Not (targetType.TypeKind = TypeKind.Class OrElse targetType.TypeKind = TypeKind.Interface) OrElse 260If targetType Is Nothing OrElse (targetType.TypeKind <> TypeKind.Interface AndAlso targetType.TypeKind <> TypeKind.Class) Then 356Not (targetType.TypeKind = TypeKind.Class OrElse targetType.TypeKind = TypeKind.Interface) OrElse
Completion\CompletionProviders\NamedParameterCompletionProvider.vb (1)
147If type IsNot Nothing AndAlso within IsNot Nothing AndAlso type.TypeKind <> TypeKind.[Delegate] Then
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (4)
655Return method.ContainingType.TypeKind <> TypeKind.Struct 1429Select Case symbol.TypeKind 2012If type.TypeKind = TypeKind.Module Then 2042If newSymbol.ContainingType.TypeKind = TypeKind.Enum Then
ExtractMethod\VisualBasicMethodExtractor.PostProcessor.vb (2)
137type.TypeKind = TypeKind.Error OrElse 138type.TypeKind = TypeKind.Unknown Then
ExtractMethod\VisualBasicSelectionResult.vb (1)
234info.ConvertedType.TypeKind <> TypeKind.Interface Then
InitializeParameter\VisualBasicInitializeMemberFromParameterCodeRefactoringProvider.vb (2)
50Return If(containingType.TypeKind = TypeKind.Class Or containingType.TypeKind = TypeKind.Module, Accessibility.Private, Accessibility.Public)
NavigationBar\VisualBasicNavigationBarItemService.vb (5)
111If type.TypeKind = TypeKind.Enum Then 116If type.TypeKind <> TypeKind.Interface Then 215If workspaceSupportsDocumentChanges AndAlso type.TypeKind = TypeKind.Class Then 228If workspaceSupportsDocumentChanges AndAlso type.TypeKind = TypeKind.Class Then 236If type.TypeKind <> TypeKind.Delegate Then
SignatureHelp\FunctionAggregationSignatureHelpProvider.vb (1)
146If parameter.Type.TypeKind = TypeKind.Delegate Then
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider.vb (1)
88Dim itemsAndSelected = If(type.TypeKind = TypeKind.Delegate,
src\Analyzers\VisualBasic\CodeFixes\GenerateDefaultConstructors\VisualBasicGenerateDefaultConstructorsService.vb (1)
35Return classType IsNot Nothing AndAlso classType.TypeKind = TypeKind.Class
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (7)
Compilation\SemanticModelGetDeclaredSymbolAPITests.vb (6)
685Assert.Equal(TypeKind.Class, typeSymbol.TypeKind) 690Assert.Equal(TypeKind.Class, typeSymbol2.TypeKind) 697Assert.Equal(TypeKind.Structure, typeSymbol3.TypeKind) 705Assert.Equal(TypeKind.Interface, typeSymbol4.TypeKind) 714Assert.Equal(TypeKind.Class, typeSymbol5.TypeKind) 724Assert.Equal(TypeKind.Class, typeSymbol6.TypeKind)
Semantics\NativeIntegerTests.vb (1)
53Assert.Equal(TypeKind.Struct, type.TypeKind)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (6)
SymbolsTests\Source\BindingsTests.vb (6)
361Assert.Equal(TypeKind.Class, typeSymbol.TypeKind) 366Assert.Equal(TypeKind.Class, typeSymbol2.TypeKind) 373Assert.Equal(TypeKind.Structure, typeSymbol3.TypeKind) 381Assert.Equal(TypeKind.Interface, typeSymbol4.TypeKind) 390Assert.Equal(TypeKind.Class, typeSymbol5.TypeKind) 401Assert.Equal(TypeKind.Class, typeSymbol6.TypeKind)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (33)
CaseCorrection\VisualBasicCaseCorrectionService.Rewriter.vb (1)
148If TypeOf symbol Is ITypeSymbol AndAlso DirectCast(symbol, ITypeSymbol).TypeKind = TypeKind.Error Then
Recommendations\VisualBasicRecommendationServiceRunner.vb (9)
275If container Is Nothing OrElse TryCast(container, ITypeSymbol)?.TypeKind = TypeKind.Enum Then 404Dim isInterface = TryCast(typeOrAssemblySymbol, ITypeSymbol)?.TypeKind = TypeKind.Interface 463Return namedTypeSymbol.TypeKind = TypeKind.Interface OrElse 479If namedTypeSymbol.TypeKind = TypeKind.Interface Then 497If type.TypeKind = TypeKind.Class AndAlso Not type.IsSealed AndAlso Not Equals(type, within) Then 501If type.TypeKind = TypeKind.Class OrElse 502type.TypeKind = TypeKind.Module OrElse 503type.TypeKind = TypeKind.Struct Then 527If namedTypeSymbol.TypeKind = TypeKind.Class AndAlso Not namedTypeSymbol.IsSealed AndAlso Not Equals(namedTypeSymbol, within) Then
Simplification\Reducers\VisualBasicEscapingReducer.vb (2)
106If type.TypeKind <> TypeKind.Interface AndAlso type.TypeKind <> TypeKind.Enum Then
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SemanticModelExtensions.vb (1)
256If parameter.Type.TypeKind <> TypeKind.TypeParameter Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ExpressionGenerator.vb (1)
49ElseIf type?.TypeKind = TypeKind.Enum Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamedTypeGenerator.vb (8)
53declaration = If(options.Context.GenerateMembers AndAlso namedType.TypeKind <> TypeKind.Delegate, 94If namedType.TypeKind = TypeKind.Enum Then 96ElseIf namedType.TypeKind = TypeKind.Delegate Then 100Dim isInterface = namedType.TypeKind = TypeKind.Interface 101Dim isStruct = namedType.TypeKind = TypeKind.Struct 102Dim isModule = namedType.TypeKind = TypeKind.Module 187If namedType.TypeKind = TypeKind.Class Then 205If namedType.TypeKind = TypeKind.Struct OrElse
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Editing\VisualBasicImportAdder.vb (1)
113If type?.TypeKind = TypeKind.Module Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTreeExtensions.vb (1)
328objectCreationType.TypeKind = TypeKind.Delegate Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\VisualBasicSyntaxContextExtensions.vb (1)
125objectCreationType.TypeKind = TypeKind.Delegate Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ExpressionSyntaxGeneratorVisitor.vb (2)
40If symbol.ContainingType.TypeKind = TypeKind.Submission Then 48If symbol.TypeKind <> TypeKind.[Error] Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\IMethodSymbolExtensions.vb (1)
32If parameter.Type.TypeKind = TypeKind.Delegate Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (2)
160If symbol.ContainingType.TypeKind = TypeKind.Submission Then 167If _addGlobal AndAlso symbol.TypeKind <> TypeKind.[Error] Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (3)
30If info.Type IsNot Nothing AndAlso info.Type.TypeKind <> TypeKind.Error Then 34If info.ConvertedType IsNot Nothing AndAlso info.ConvertedType.TypeKind <> TypeKind.Error Then 296If namedType.TypeKind = TypeKind.Delegate Then
Microsoft.CodeAnalysis.Workspaces (72)
Classification\ClassificationExtensions.cs (1)
10=> type.TypeKind switch
Editing\SymbolEditorExtensions.cs (1)
30if (baseOrInterfaceType.TypeKind != TypeKind.Error)
Editing\SyntaxGenerator.cs (2)
759var declaration = type.TypeKind switch 845switch (type.TypeKind)
FindSymbols\FindReferences\DependentTypeFinder.cs (2)
45private static readonly Func<INamedTypeSymbol, bool> s_isInterface = static t => t is { TypeKind: TypeKind.Interface }; 46private static readonly Func<INamedTypeSymbol, bool> s_isNonSealedClass = static t => t is { TypeKind: TypeKind.Class, IsSealed: false };
FindSymbols\FindReferences\DependentTypeFinder_ImplementingTypes.cs (2)
22if (type?.TypeKind == TypeKind.Interface) 54t => t.TypeKind is TypeKind.Class or
FindSymbols\FindReferences\Finders\NamedTypeSymbolReferenceFinder.cs (1)
20=> symbol.TypeKind != TypeKind.Error;
FindSymbols\FindReferences\Finders\OrdinaryMethodReferenceFinder.cs (1)
30return symbol.ContainingType.TypeKind == TypeKind.Delegate
FindSymbols\FindReferences\FindReferencesSearchEngine.SymbolSet.cs (1)
127if (searchSymbol.IsConstructor() && searchSymbol.ContainingType.TypeKind == TypeKind.Delegate)
FindSymbols\SymbolFinder_Hierarchy.cs (1)
117if (symbol is { DeclaredAccessibility: Accessibility.Public, ContainingType.TypeKind: TypeKind.Class or TypeKind.Struct })
Recommendations\AbstractRecommendationServiceRunner.cs (3)
449if (originalConstraintType.TypeKind == TypeKind.TypeParameter) 456else if (originalConstraintType.TypeKind == TypeKind.Interface) 481else if (originalConstraintType.TypeKind == TypeKind.Class)
Rename\RenameUtilities.cs (1)
230symbol.ContainingType.TypeKind == TypeKind.Interface)
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (1)
107((INamedTypeSymbol)referencedSymbol.ContainingSymbol).TypeKind == TypeKind.Interface &&
Shared\Extensions\IMethodSymbolExtensions.cs (1)
21Contract.ThrowIfFalse(delegateType.TypeKind == TypeKind.Delegate);
Shared\Extensions\ISymbolExtensions.cs (2)
490if (typeSymbol.TypeKind == TypeKind.Class) 496else if (typeSymbol.TypeKind == TypeKind.Interface)
Shared\Extensions\ITypeSymbolExtensions.cs (2)
159typeSymbol.TypeKind == TypeKind.Interface) 196if (type.TypeKind == TypeKind.Interface &&
Shared\Extensions\SemanticModelExtensions.cs (1)
138if (namedType.TypeKind == TypeKind.Delegate ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (8)
87if (member.ContainingType.TypeKind == TypeKind.Interface) 158if (implementation?.ContainingType.TypeKind == TypeKind.Interface) 196if (type.TypeKind == TypeKind.Interface) 297if (type.TypeKind == TypeKind.Interface) 335if (classOrStructType.TypeKind is not TypeKind.Class and not TypeKind.Struct) 345if (!interfacesOrAbstractClasses.All(i => i.TypeKind == TypeKind.Interface) && 362return interfacesOrAbstractClasses.First().TypeKind == TypeKind.Interface 541TypeKind: TypeKind.Class or TypeKind.Struct
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (8)
114return symbol?.ContainingType?.TypeKind == TypeKind.Class && 123symbol.ContainingType.TypeKind == TypeKind.Interface) 163=> symbol is ITypeSymbol { TypeKind: TypeKind.Error }; 166=> symbol is ITypeSymbol { TypeKind: TypeKind.Module }; 169=> symbol is ITypeSymbol { TypeKind: TypeKind.Interface }; 220=> symbol is { ContainingType.TypeKind: TypeKind.Module }; 244=> symbol is ITypeSymbol { TypeKind: TypeKind.Delegate }; 634if (!methods.Any(x => x.Name == WellKnownMemberNames.OnCompleted && x.ReturnsVoid && x.Parameters is [{ Type.TypeKind: TypeKind.Delegate }]))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (1)
193typeArg.TypeKind != TypeKind.Error &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (13)
42if (type is INamedTypeSymbol namedType && namedType.TypeKind == TypeKind.Interface && !allInterfaces.Contains(namedType)) 56=> symbol?.TypeKind == TypeKind.Class && symbol.IsAbstract; 82=> symbol?.TypeKind == TypeKind.Module; 85=> symbol?.TypeKind == TypeKind.Interface; 88=> symbol?.TypeKind == TypeKind.Delegate; 91=> symbol?.TypeKind == TypeKind.FunctionPointer; 94=> symbol?.TypeKind == TypeKind.Struct; 188IEnumerable<ITypeSymbol> baseTypes = (baseType.TypeKind == TypeKind.Interface) ? type.AllInterfaces : type.GetBaseTypes(); 263switch (typeSymbol.TypeKind) 541if (t1.TypeKind != t2.TypeKind) 635if (type != null && type.IsValueType && type.TypeKind == TypeKind.Enum) 687if (type.TypeKind != TypeKind.Struct)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (2)
83symbol = updatedContainingType.GetTypeMembers(symbol.Name, symbol.Arity).First(m => m.TypeKind == symbol.TypeKind);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (2)
162if (type.TypeKind == TypeKind.Array && typeArguments.IsEmpty) 171type.TypeKind == TypeKind.Pointer)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
411symbol.GetSymbolType()?.TypeKind != TypeKind.Delegate)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleRules.cs (1)
68if (containingType.TypeKind is not TypeKind.Class and not TypeKind.Struct)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
367SymbolCategory.Type => symbol is ITypeSymbol type && type.TypeKind == (TypeKind)_kind,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
404if (namedTypeSymbol.TypeKind == TypeKind.Error)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.TupleTypeSymbolKey.cs (1)
24var isError = symbol.TupleUnderlyingType!.TypeKind == TypeKind.Error;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SignatureComparer.cs (2)
176property1.ContainingType.TypeKind == TypeKind.Interface) 186property2.ContainingType.TypeKind == TypeKind.Interface)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.cs (1)
242=> x.TypeKind switch
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (1)
513if (x.TypeKind == TypeKind.Delegate)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
192if (x.TypeKind == TypeKind.Delegate)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (1)
36if (typeSymbol.TypeKind != TypeKind.Enum)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
152if (namedType.TypeKind != TypeKind.Enum)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\INamedTypeSymbolExtensions.cs (1)
25namedType.TypeKind,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
132member.ContainingType is { TypeKind: TypeKind.Interface } interfaceBeingImplemented)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
498if (containingType?.TypeKind == TypeKind.Struct)
Microsoft.Extensions.Options.SourceGeneration (1)
Parser.cs (1)
218if (ta.TypeKind == TypeKind.TypeParameter)
Microsoft.Gen.ContextualOptions (2)
Parser.cs (2)
82.Where(prop => prop.Type.TypeKind != TypeKind.Pointer) 83.Where(prop => prop.Type.TypeKind != TypeKind.FunctionPointer)
Microsoft.Gen.Logging (4)
Parsing\Parser.LogProperties.cs (2)
308|| (property.Type.TypeKind == TypeKind.Delegate) 338_allowedTypeKinds.Contains(symType.TypeKind) &&
Parsing\Parser.Records.cs (1)
121if (memberType.TypeKind == TypeKind.Delegate)
Parsing\Parser.TagProvider.cs (1)
161if (target.TypeKind == TypeKind.Interface)
Microsoft.Gen.Logging.Unit.Tests (1)
LogParserUtilitiesTests.cs (1)
155paramTypeMock.SetupGet(x => x.TypeKind).Returns(TypeKind.Class);
Microsoft.Gen.Metrics (4)
Parser.cs (4)
574returnType.TypeKind != TypeKind.Error) 625if (strongTypeSymbol.TypeKind == TypeKind.Class) 700kind = propertySymbol!.Type.TypeKind; 708kind = fieldSymbol!.Type.TypeKind;
Microsoft.Gen.MetricsReports (4)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (4)
574returnType.TypeKind != TypeKind.Error) 625if (strongTypeSymbol.TypeKind == TypeKind.Class) 700kind = propertySymbol!.Type.TypeKind; 708kind = fieldSymbol!.Type.TypeKind;
Microsoft.Interop.ComInterfaceGenerator (6)
Analyzers\AddGeneratedComClassAnalyzer.cs (1)
42if (type.TypeKind != TypeKind.Class)
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (2)
52if (type is not { TypeKind: TypeKind.Interface, IsComImport: true } 222public bool CanProvideMarshallingInfoForType(ITypeSymbol type) => type is { TypeKind: TypeKind.Array or TypeKind.Delegate } or { SpecialType: SpecialType.System_Array or SpecialType.System_Object };
Analyzers\GeneratedComInterfaceAttributeAnalyzer.cs (1)
32if (typeSymbol.TypeKind != TypeKind.Interface)
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
273if (methodSymbol.ReturnType is { TypeKind: TypeKind.Struct }
VtableIndexStubGenerator.cs (1)
133if (attrData.AttributeClass?.TypeKind is null or TypeKind.Error)
Microsoft.Interop.JavaScript.JSImportGenerator (2)
JSExportGenerator.cs (1)
161if (attrData.AttributeClass?.TypeKind is null or TypeKind.Error)
JSImportGenerator.cs (1)
133if (attrData.AttributeClass?.TypeKind is null or TypeKind.Error)
Microsoft.Interop.LibraryImportGenerator (2)
LibraryImportGenerator.cs (1)
190if (attrData.AttributeClass?.TypeKind is null or TypeKind.Error)
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
273if (methodSymbol.ReturnType is { TypeKind: TypeKind.Struct }
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
DownlevelLibraryImportGenerator.cs (1)
132if (attrData.AttributeClass?.TypeKind is null or TypeKind.Error)
Microsoft.Interop.SourceGeneration (17)
BlittableTypeMarshallingInfoProvider.cs (1)
27if (type.TypeKind is TypeKind.Enum or TypeKind.Pointer or TypeKind.FunctionPointer
CustomMarshallingInfoHelper.cs (4)
29if (!(entryPointType.IsStatic && entryPointType.TypeKind == TypeKind.Class) 30&& entryPointType.TypeKind != TypeKind.Struct) 145if (!(entryPointType.IsStatic && entryPointType.TypeKind == TypeKind.Class) 146&& entryPointType.TypeKind != TypeKind.Struct)
ManagedTypeInfo.cs (6)
48if (type.TypeKind == TypeKind.Enum) 52if (type.TypeKind == TypeKind.Pointer) 56if (type.TypeKind == TypeKind.FunctionPointer) 60if (type.TypeKind == TypeKind.Array && type is IArrayTypeSymbol { IsSZArray: true } arraySymbol) 64if (type.TypeKind == TypeKind.Delegate) 68if (type.TypeKind == TypeKind.TypeParameter)
ManualTypeMarshallingHelper.cs (4)
364while (innerType.TypeKind is TypeKind.Array or TypeKind.Pointer) 388if (wrapperType.TypeKind == TypeKind.Pointer) 392else if (wrapperType.TypeKind == TypeKind.Array) 412if (marshallerType is { IsStatic: true, TypeKind: TypeKind.Class })
TypeSymbolExtensions.cs (2)
104if (type.TypeKind == TypeKind.TypeParameter && !type.IsReferenceType) 110if (type.TypeKind is TypeKind.Pointer or TypeKind.FunctionPointer)
Microsoft.ML.InternalCodeAnalyzer (1)
BaseTestClassAnalyzer.cs (1)
68if (namedType.TypeKind != TypeKind.Class)
Microsoft.VisualStudio.LanguageServices (33)
Implementation\ContainedLanguageRefactorNotifyService.cs (1)
77else if (symbol is INamedTypeSymbol && (symbol as INamedTypeSymbol).TypeKind == TypeKind.Class)
Library\ObjectBrowser\AbstractDescriptionBuilder.cs (3)
91if (typeSymbol.TypeKind is TypeKind.Unknown or TypeKind.Error or TypeKind.TypeParameter || 179if (symbol.TypeKind == TypeKind.Delegate) 446return symbol is INamedTypeSymbol { TypeKind: TypeKind.Delegate }
Library\ObjectBrowser\AbstractListItemFactory.cs (3)
215if (namedTypeSymbol.TypeKind != TypeKind.Interface) 267if (typeSymbol.TypeKind == TypeKind.Interface) 274else if (typeSymbol.TypeKind != TypeKind.Module &&
Library\ObjectBrowser\Lists\MemberListItem.cs (1)
27if (fieldSymbol.ContainingType.TypeKind == TypeKind.Enum)
Library\ObjectBrowser\Lists\TypeListItem.cs (1)
16Kind = typeSymbol.TypeKind;
Library\ObjectBrowser\ObjectList.cs (2)
438if (typeSymbol.TypeKind == TypeKind.Module) 443if (typeSymbol.TypeKind == TypeKind.Interface && typeSymbol.Interfaces.IsEmpty)
Library\VsNavInfo\NavInfoFactory.cs (3)
81else if (typeSymbol.TypeKind == TypeKind.Pointer) 85else if (typeSymbol.TypeKind == TypeKind.Array) 97if (typeSymbol.TypeKind is TypeKind.Error or
MoveStaticMembers\VisualStudioMoveStaticMembersOptionsService.cs (1)
175.Where(t => t.TypeKind == currentType.TypeKind && (t.IsStaticType() || !currentType.IsStaticType()))
Progression\GraphBuilder.cs (7)
570switch (namedType.TypeKind) 608throw ExceptionUtilities.UnexpectedValue(namedType.TypeKind); 612node[RoslynGraphProperties.TypeKind] = namedType.TypeKind; 629node[RoslynGraphProperties.TypeKind] = method.ContainingType.TypeKind; 642if (field.ContainingType.TypeKind == TypeKind.Enum) 662node[RoslynGraphProperties.TypeKind] = property.ContainingType.TypeKind; 675node[RoslynGraphProperties.TypeKind] = eventSymbol.ContainingType.TypeKind;
Progression\GraphNodeIdCreation.cs (7)
78if (symbol.TypeKind == TypeKind.TypeParameter) 106if (underlyingType.TypeKind == TypeKind.Dynamic) 216while (pointerType.PointedAtType.TypeKind == TypeKind.Pointer) 242if (underlyingType.TypeKind == TypeKind.Dynamic) 246else if (underlyingType.TypeKind != TypeKind.TypeParameter) 275while (symbol.TypeKind == TypeKind.Array) 280while (symbol.TypeKind == TypeKind.Pointer)
Progression\GraphQueries\InheritedByGraphQuery.cs (2)
29if (namedType.TypeKind == TypeKind.Class) 40else if (namedType.TypeKind == TypeKind.Interface)
Progression\GraphQueries\InheritsGraphQuery.cs (1)
41else if (namedType.TypeKind == TypeKind.Interface && !namedType.OriginalDefinition.AllInterfaces.IsEmpty)
PullMemberUp\MainDialog\PullMemberUpDialogViewModel.cs (1)
73MemberSelectionViewModel.UpdateMembersBasedOnDestinationKind(_selectedDestination.Symbol.TypeKind);
Microsoft.VisualStudio.LanguageServices.CSharp (22)
CodeModel\CSharpCodeModelService.cs (9)
682if (typeSymbol.TypeKind == TypeKind.Unknown) 695if (typeSymbol.TypeKind == TypeKind.Array) 699else if (typeSymbol.TypeKind == TypeKind.Pointer) 704typeSymbol.TypeKind is TypeKind.Dynamic or 754if (typeSymbol.TypeKind is TypeKind.Class or 3711return typeSymbol.TypeKind == TypeKind.Class; 3715return typeSymbol.TypeKind == TypeKind.Interface; 3808return typeSymbol.TypeKind == TypeKind.Interface; 3822typeSymbol.TypeKind != TypeKind.Interface)
CodeModel\CSharpCodeModelService_Prototype.cs (1)
40if (namedType.TypeKind == TypeKind.Delegate)
ObjectBrowser\DescriptionBuilder.cs (11)
35Debug.Assert(typeSymbol.TypeKind == TypeKind.Delegate); 69switch (typeSymbol.TypeKind) 88Debug.Fail("Invalid type kind encountered: " + typeSymbol.TypeKind.ToString()); 97if (typeSymbol.TypeKind == TypeKind.Enum) 176typeSymbol.TypeKind != TypeKind.Interface) 182typeSymbol.TypeKind != TypeKind.Struct && 183typeSymbol.TypeKind != TypeKind.Enum && 184typeSymbol.TypeKind != TypeKind.Delegate) 244if (memberSymbol.ContainingType != null && memberSymbol.ContainingType.TypeKind == TypeKind.Interface) 259fieldSymbol.ContainingType.TypeKind == TypeKind.Enum) 478if (fieldSymbol.ContainingType.TypeKind != TypeKind.Enum)
Progression\CSharpProgressionLanguageService.cs (1)
118case IFieldSymbol f: return f.ContainingType.TypeKind == TypeKind.Enum ? null : f.Type;
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
GlyphExtensionsTests.cs (1)
234namedTypeMock.SetupGet(s => s.TypeKind).Returns(typeKind);
Microsoft.VisualStudio.LanguageServices.VisualBasic (30)
CodeModel\Extenders\GenericExtender.vb (4)
35Select Case typeSymbol.TypeKind 48Select Case typeSymbol.TypeKind 63Select Case typeSymbol.TypeKind 85Select Case typeSymbol.TypeKind
CodeModel\MethodXML\MethodXmlBuilder.vb (2)
372symbolOpt?.ContainingType?.TypeKind = TypeKind.Module Then 595If type.TypeKind = TypeKind.Array Then
CodeModel\VisualBasicCodeModelService.vb (10)
757If typeSymbol.TypeKind = TypeKind.Array Then 761If typeSymbol.TypeKind = TypeKind.Pointer Then 765If typeSymbol IsNot Nothing AndAlso Not typeSymbol.TypeKind = TypeKind.Error Then 770If typeSymbol.TypeKind = TypeKind.Enum Then 805If typeSymbol.TypeKind = TypeKind.Pointer Then 809If typeSymbol.TypeKind = TypeKind.TypeParameter Then 2907(symbol.Kind = SymbolKind.NamedType AndAlso DirectCast(symbol, INamedTypeSymbol).TypeKind = TypeKind.Module) OrElse 4247Return typeSymbol.TypeKind = TypeKind.Class 4249Return typeSymbol.TypeKind = TypeKind.Interface 4315Return typeSymbol.TypeKind = TypeKind.Interface
CodeModel\VisualBasicCodeModelService_Prototype.vb (1)
45If namedTypeSymbol.TypeKind = TypeKind.Delegate Then
ObjectBrowser\DescriptionBuilder.vb (12)
30Debug.Assert(typeSymbol.TypeKind = TypeKind.Delegate) 67Select Case typeSymbol.TypeKind 79Debug.Fail("Invalid type kind encountered: " & typeSymbol.TypeKind.ToString()) 94If typeSymbol.TypeKind = TypeKind.Class Then 105If typeSymbol.TypeKind = TypeKind.Enum Then 279If eventType IsNot Nothing AndAlso eventType.TypeKind = TypeKind.Delegate Then 314typeSymbol.TypeKind <> TypeKind.Interface Then 319typeSymbol.TypeKind <> TypeKind.Delegate AndAlso 320typeSymbol.TypeKind <> TypeKind.Module AndAlso 321typeSymbol.TypeKind <> TypeKind.Enum AndAlso 322typeSymbol.TypeKind <> TypeKind.Structure Then 329If memberSymbol.ContainingType IsNot Nothing And memberSymbol.ContainingType.TypeKind = TypeKind.Interface Then
Progression\VisualBasicProgressionLanguageService.vb (1)
82If symbol.Kind = SymbolKind.Field AndAlso symbol.ContainingType.TypeKind = TypeKind.Enum Then
System.Text.Json.SourceGeneration (6)
Helpers\RoslynExtensions.cs (4)
106if (type.IsAbstract || type.TypeKind is TypeKind.Interface || type is not INamedTypeSymbol namedType) 132if (baseType.TypeKind is TypeKind.Interface) 160if (baseType.TypeKind is TypeKind.Interface) 236if (type.TypeKind != TypeKind.Interface)
JsonSourceGenerator.Parser.cs (1)
554else if (type.TypeKind is TypeKind.Enum)
src\libraries\Common\src\SourceGenerators\TypeRef.cs (1)
21TypeKind = type.TypeKind;