4371 references to TypeKind
ConfigurationSchemaGenerator (8)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (7)
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)
33public TypeKind TypeKind { get; }
ILLink.RoslynAnalyzer (10)
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 (6)
19 TypeKind.TypeParameter => 23 TypeKind.Error => new SystemTypeValue (new TypeProxy (type)), 24 TypeKind.Class or TypeKind.Enum or TypeKind.Interface or TypeKind.Struct =>
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 (22)
Compilation\Expression.cs (1)
41if (type.TypeKind == TypeKind.Enum)
Emit\EditAndContinue\DefinitionMap.cs (1)
602if (displayClass.TypeKind == TypeKind.Struct)
MetadataReader\MetadataDecoder.cs (7)
400Debug.Assert(!refersToNoPiaLocalType || generic.TypeKind == TypeKind.Error); 1022value = (type.IsReferenceType || type.TypeKind == TypeKind.Pointer || type.TypeKind == TypeKind.FunctionPointer) ? ConstantValue.Null : ConstantValue.Bad; 1549return (type.TypeKind == TypeKind.Enum) ? TypedConstantKind.Enum : TypedConstantKind.Primitive; 2144if (type.TypeKind == TypeKind.Error) 2149Debug.Assert(type.TypeKind == TypeKind.Array); 2155if (type.TypeKind == TypeKind.Error)
SymbolDisplay\AbstractSymbolDisplayVisitor.cs (2)
142if (type.TypeKind == TypeKind.Enum) 185if (typeSymbol.TypeKind != TypeKind.Enum)
Symbols\INamedTypeSymbolInternal.cs (3)
36if (type.TypeKind == TypeKind.Enum) 75case TypeKind.Enum: 77case TypeKind.Struct:
Symbols\ITypeSymbol.cs (1)
25TypeKind TypeKind { get; }
Symbols\ITypeSymbolInternal.cs (1)
14TypeKind TypeKind { get; }
Symbols\TypedConstant.cs (4)
143if (_type!.SpecialType == specialType || (_type.TypeKind == TypeKind.Enum && specialType == SpecialType.System_Enum)) 182case TypeKind.Array: 184case TypeKind.Enum: 186case TypeKind.Error:
Symbols\TypeKind.cs (2)
97internal const TypeKind FunctionType = (TypeKind)255;
Microsoft.CodeAnalysis.CodeStyle (91)
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 (3)
184if (namedType.TypeKind is not TypeKind.Class and not TypeKind.Struct and not TypeKind.Module)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (10)
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)
165return symbol is { ContainingType.TypeKind: TypeKind.Class, IsSealed: false } && 173symbol.ContainingType.TypeKind == TypeKind.Interface) 213=> symbol is ITypeSymbol { TypeKind: TypeKind.Error }; 216=> symbol is ITypeSymbol { TypeKind: TypeKind.Module }; 219=> symbol is ITypeSymbol { TypeKind: TypeKind.Interface }; 270=> symbol is { ContainingType.TypeKind: TypeKind.Module }; 294=> symbol is ITypeSymbol { TypeKind: TypeKind.Delegate }; 685if (!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 (12)
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(); 265case TypeKind.Array: 266case TypeKind.Delegate: 635if (type != null && type.IsValueType && type.TypeKind == TypeKind.Enum) 687if (type.TypeKind != TypeKind.Struct)
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\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (13)
125private static readonly SymbolKindOrTypeKind _class = new(TypeKind.Class); 126private static readonly SymbolKindOrTypeKind _struct = new(TypeKind.Struct); 127private static readonly SymbolKindOrTypeKind _interface = new(TypeKind.Interface); 128private static readonly SymbolKindOrTypeKind _enum = new(TypeKind.Enum); 134private static readonly SymbolKindOrTypeKind _delegate = new(TypeKind.Delegate); 380case TypeKind.Class: 383case TypeKind.Struct: 386case TypeKind.Interface: 389case TypeKind.Enum: 392case TypeKind.Delegate: 395case TypeKind.Module: 398case TypeKind.Pointer: 401case TypeKind.TypeParameter:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleRules.cs (2)
68if (containingType.TypeKind is not TypeKind.Class and not TypeKind.Struct)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (19)
67new SymbolKindOrTypeKind(TypeKind.Class), 68new SymbolKindOrTypeKind(TypeKind.Struct), 69new SymbolKindOrTypeKind(TypeKind.Interface), 70new SymbolKindOrTypeKind(TypeKind.Delegate), 71new SymbolKindOrTypeKind(TypeKind.Enum), 72new SymbolKindOrTypeKind(TypeKind.Module), 73new SymbolKindOrTypeKind(TypeKind.Pointer), 80new SymbolKindOrTypeKind(TypeKind.TypeParameter), 298foreach (var typeKindElement in symbolKindListElement.Elements(nameof(TypeKind))) 349public SymbolKindOrTypeKind(TypeKind typeKind) 360public TypeKind? TypeKind => (_category == SymbolCategory.Type) ? (TypeKind)_kind : null; 367SymbolCategory.Type => symbol is ITypeSymbol type && type.TypeKind == (TypeKind)_kind, 376SymbolCategory.Type => new XElement(nameof(TypeKind), GetTypeKindString((TypeKind)_kind)), 381private static string GetTypeKindString(TypeKind typeKind) 388CodeAnalysis.TypeKind.Structure => nameof(CodeAnalysis.TypeKind.Struct), 438=> new((TypeKind)Enum.Parse(typeof(TypeKind), typeKindElement.Value));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
410if (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 (3)
241private static TypeKind GetTypeKind(INamedTypeSymbol x) 245TypeKind.Module => TypeKind.Class,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (7)
283var xTypeKind = GetTypeKind(x); 284var yTypeKind = GetTypeKind(y); 286if (xTypeKind == TypeKind.Error || 287yTypeKind == TypeKind.Error) 304var typeKind1 = GetTypeKind(type1); 307var typeKind2 = GetTypeKind(type2); 513if (x.TypeKind == TypeKind.Delegate)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
192if (x.TypeKind == TypeKind.Delegate)
Microsoft.CodeAnalysis.CodeStyle.Fixes (58)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (4)
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 (11)
23protected static readonly ISet<TypeKind> EnumType = new HashSet<TypeKind> { TypeKind.Enum }; 24protected static readonly ISet<TypeKind> ClassInterfaceModuleStructTypes = new HashSet<TypeKind> 26TypeKind.Class, 27TypeKind.Module, 28TypeKind.Struct, 29TypeKind.Interface 35ISet<TypeKind> typeKinds) 46if (typeToGenerateIn.TypeKind == TypeKind.Interface && isStatic)
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateConversionService.cs (2)
26protected abstract bool TryInitializeImplicitConversionState(SemanticDocument document, SyntaxNode expression, ISet<TypeKind> classInterfaceModuleStructTypes, CancellationToken cancellationToken, out SyntaxToken identifierToken, out IMethodSymbol methodSymbol, out INamedTypeSymbol typeToGenerateIn); 27protected abstract bool TryInitializeExplicitConversionState(SemanticDocument document, SyntaxNode expression, ISet<TypeKind> classInterfaceModuleStructTypes, CancellationToken cancellationToken, out SyntaxToken identifierToken, out IMethodSymbol methodSymbol, out INamedTypeSymbol typeToGenerateIn);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.AbstractInvocationInfo.cs (2)
61var classTypes = constraints.Where(ts => ts.TypeKind == TypeKind.Class).ToList(); 62var nonClassTypes = constraints.Where(ts => ts.TypeKind != TypeKind.Class).ToList();
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\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.SignatureInfo.cs (2)
202return isAbstract || State.TypeToGenerateIn.TypeKind == TypeKind.Interface || throwStatement == null 234if (State.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\CodeGenerationSymbolFactory.cs (3)
422TypeKind typeKind, string name, 441bool isRecord, TypeKind typeKind, string name, 492typeKind: TypeKind.Delegate,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationArrayTypeSymbol.cs (2)
43public override TypeKind TypeKind => TypeKind.Array;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructedNamedTypeSymbol.cs (1)
93public override TypeKind TypeKind => _constructedFrom.TypeKind;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamedTypeSymbol.cs (3)
34TypeKind typeKind, 68public override TypeKind TypeKind { get; } 100return this.TypeKind == TypeKind.Delegate
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPointerTypeSymbol.cs (2)
19public override TypeKind TypeKind => TypeKind.Pointer;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeParameterSymbol.cs (2)
60public override TypeKind TypeKind => TypeKind.TypeParameter;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeSymbol.cs (3)
36public abstract TypeKind TypeKind { get; } 48public bool IsValueType => TypeKind is TypeKind.Struct or TypeKind.Enum;
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.CodeStyle.UnitTestUtilities (3)
src\Features\DiagnosticsTestUtilities\NamingStyles\NamingStylesTestOptionSets.cs (3)
111case TypeKind typeKind: 133ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(TypeKind.Class)), 613ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(TypeKind.Interface)),
Microsoft.CodeAnalysis.CSharp (732)
Binder\Binder_Attributes.cs (2)
58if (boundTypeSymbol.TypeKind != TypeKind.Error) 728parameter.Type.TypeKind == TypeKind.Array &&
Binder\Binder_Constraints.cs (14)
504type.TypeKind == TypeKind.Class) 584case TypeKind.Error: 585case TypeKind.TypeParameter: 588case TypeKind.Interface: 591case TypeKind.Dynamic: 596case TypeKind.Class: 599goto case TypeKind.Struct; 609case TypeKind.Delegate: 610case TypeKind.Enum: 611case TypeKind.Struct: 616case TypeKind.Array: 617case TypeKind.Pointer: 618case TypeKind.FunctionPointer: 623case TypeKind.Submission:
Binder\Binder_Crefs.cs (12)
556case TypeKind.Array: 558case TypeKind.Pointer: 560case TypeKind.FunctionPointer: 576case TypeKind.Delegate: 577case TypeKind.Class: 578case TypeKind.Interface: 579case TypeKind.Struct: 580case TypeKind.Enum: 581case TypeKind.Error: 597case TypeKind.Dynamic: 598case TypeKind.TypeParameter: 994Debug.Assert(type.TypeKind != TypeKind.Error || typeSyntax.ContainsDiagnostics || !typeSyntax.SyntaxTree.ReportDocumentationCommentDiagnostics(), "Why wasn't there a diagnostic?");
Binder\Binder_Expressions.cs (38)
2323if (this.ContainingType.TypeKind == TypeKind.Submission 2327if (memberDeclaringType.TypeKind == TypeKind.Submission) 2778if (targetType.TypeKind != TypeKind.Delegate || 2831TypeKind.FunctionPointer => ErrorCode.ERR_MethFuncPtrMismatch, 2832TypeKind.Delegate => ErrorCode.ERR_CannotConvertAddressOfToDelegate, 4779if ((containingType.TypeKind == TypeKind.Enum || containingType.TypeKind == TypeKind.Struct) && initializerArgumentListOpt == null) 4830else if (initializerArgumentListOpt != null && containingType.TypeKind == TypeKind.Struct) 5153case TypeKind.Struct: 5154case TypeKind.Class: 5155case TypeKind.Enum: 5156case TypeKind.Error: 5159case TypeKind.Delegate: 5162case TypeKind.Interface: 5165case TypeKind.TypeParameter: 5168case TypeKind.Submission: 5172case TypeKind.Pointer: 5173case TypeKind.FunctionPointer: 5176goto case TypeKind.Class; 5178case TypeKind.Dynamic: 5180case TypeKind.Array: 5184goto case TypeKind.Class; 5400else if (argument.Type.TypeKind == TypeKind.Delegate) 5500Debug.Assert(type.TypeKind is TypeKind.Class or TypeKind.Struct); 6909Debug.Assert(coClassType.TypeKind == TypeKind.Class || coClassType.TypeKind == TypeKind.Error); 7258if (type.TypeKind == TypeKind.Enum) 7839if (leftType.TypeKind == TypeKind.TypeParameter) 8707if (receiverOpt is not BoundTypeExpression { Type: { TypeKind: TypeKind.TypeParameter } }) 9287case TypeKind.Array: 9290case TypeKind.Dynamic: 9293case TypeKind.Pointer: 9296case TypeKind.Class: 9297case TypeKind.Struct: 9298case TypeKind.Interface: 9299case TypeKind.TypeParameter: 9302case TypeKind.Submission: // script class is synthesized and should not be used as a type of an indexer expression:
Binder\Binder_InterpolatedString.cs (2)
397if (value.Type?.TypeKind == TypeKind.Dynamic) 433&& unconvertedInterpolatedString.Parts.All(p => p is not BoundStringInsert { Value.Type.TypeKind: TypeKind.Dynamic });
Binder\Binder_Lookup.cs (23)
184case TypeKind.TypeParameter: 188case TypeKind.Interface: 192case TypeKind.Class: 193case TypeKind.Struct: 194case TypeKind.Enum: 195case TypeKind.Delegate: 196case TypeKind.Array: 197case TypeKind.Dynamic: 198case TypeKind.Submission: 202case TypeKind.Error: 206case TypeKind.Pointer: 207case TypeKind.FunctionPointer: 211case TypeKind.Unknown: 806Debug.Assert(!type.IsInterfaceType() && type.TypeKind != TypeKind.TypeParameter); 1867case TypeKind.TypeParameter: 1871case TypeKind.Interface: 1875case TypeKind.Class: 1876case TypeKind.Struct: 1877case TypeKind.Enum: 1878case TypeKind.Delegate: 1879case TypeKind.Array: 1880case TypeKind.Dynamic: 1881case TypeKind.Submission:
Binder\Binder_Operators.cs (15)
606leftType?.TypeKind == TypeKind.FunctionPointer && rightType?.TypeKind == TypeKind.FunctionPointer) 816(object)left.Type != null && left.Type.TypeKind == TypeKind.Delegate) 3211return targetType.TypeKind == TypeKind.Error; 3268var targetTypeKind = targetType.TypeKind; 3311if (targetTypeKind == TypeKind.Dynamic) 3322if (operandType.TypeKind == TypeKind.Dynamic) 3695var targetTypeKind = targetType.TypeKind; 3728if (operand.HasAnyErrors || targetTypeKind == TypeKind.Error) 3744if (targetTypeKind == TypeKind.TypeParameter) 3748else if (targetTypeKind == TypeKind.Pointer || targetTypeKind == TypeKind.FunctionPointer) 3799var operandTypeKind = operandType.TypeKind; 3809if (operandTypeKind == TypeKind.Dynamic) 3816if (targetTypeKind == TypeKind.Dynamic)
Binder\Binder_Patterns.cs (1)
1252if (iTupleType.TypeKind != TypeKind.Interface)
Binder\Binder_Query.cs (1)
979if (ultimateReceiver.Type.TypeKind == TypeKind.TypeParameter)
Binder\Binder_QueryErrors.cs (1)
82if (instanceType.TypeKind == TypeKind.Array || name == "Cast" && HasCastToQueryProvider(instanceType, ref useSiteInfo))
Binder\Binder_Statements.cs (6)
2309if (targetType.TypeKind == TypeKind.Error) 2369if (targetType.TypeKind == TypeKind.TypeParameter) 2468case TypeKind.FunctionPointer when fromAddressOf: 2471case TypeKind.FunctionPointer: 2474case TypeKind.Delegate when fromAddressOf: 2477case TypeKind.Delegate:
Binder\ForEachLoopBinder.cs (7)
1601case TypeKind.Class: 1602case TypeKind.Struct: 1603case TypeKind.Interface: 1604case TypeKind.TypeParameter: // Not specifically mentioned in the spec, but consistent with Dev10. 1605case TypeKind.Dynamic: // Not specifically mentioned in the spec, but consistent with Dev10. 1608case TypeKind.Submission: 1794if (type.TypeKind == TypeKind.TypeParameter)
Binder\PatternExplainer.cs (1)
649if (type is NamedTypeSymbol { TypeKind: TypeKind.Enum } e)
Binder\Semantics\AccessCheck.cs (3)
367if (containingType.TypeKind == TypeKind.Submission) 429if (originalContainingType.TypeKind == TypeKind.Submission) 698return containingType.TypeKind == TypeKind.Struct ? ErrorCode.ERR_ProtectedInStruct : ErrorCode.WRN_ProtectedInSealed;
Binder\Semantics\Conversions\Conversions.cs (1)
501if (spanType.TypeKind == TypeKind.Struct && spanType.IsRefLikeType)
Binder\Semantics\Conversions\ConversionsBase.cs (7)
2181if (otherType.TypeKind == TypeKind.Enum) 2652case TypeKind.Class: 2661case TypeKind.Interface: 2666case TypeKind.Delegate: 2671case TypeKind.TypeParameter: 2674case TypeKind.Array: 3310if ((source.TypeKind == TypeKind.TypeParameter) &&
Binder\Semantics\Conversions\UserDefinedExplicitConversions.cs (1)
262if (op.ReturnsVoid || op.ParameterCount != 1 || op.ReturnType.TypeKind == TypeKind.Error)
Binder\Semantics\Operators\OperatorFacts.cs (4)
21case TypeKind.Struct: 22case TypeKind.Class: 23case TypeKind.TypeParameter: 24case TypeKind.Interface:
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (15)
488if (type.TypeKind != TypeKind.TypeParameter) return false; 1860if (source.TypeKind == TypeKind.Pointer && target.TypeKind == TypeKind.Pointer) 2233if (target.TypeKind != TypeKind.Class) 2252if (source.TypeKind == TypeKind.Class) 2256else if (source.TypeKind == TypeKind.TypeParameter) 2294case TypeKind.Struct: 2295case TypeKind.Class: 2296case TypeKind.Interface: 2300case TypeKind.TypeParameter: 2630if (source.TypeKind != TypeKind.Class || target.TypeKind != TypeKind.Class) 2671case TypeKind.Struct: 2672case TypeKind.Class: 2673case TypeKind.Interface:
Binder\Semantics\OverloadResolution\OverloadResolution.cs (3)
2486if (m1.Member.ContainingType.TypeKind == TypeKind.Submission && m2.Member.ContainingType.TypeKind == TypeKind.Submission) 2771if (t1.TypeKind == TypeKind.Pointer)
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (2)
1220else if (argument.Kind == BoundKind.MethodGroup && parameterType.TypeKind == TypeKind.Delegate && 1225else if (argument.Kind == BoundKind.MethodGroup && parameterType.TypeKind == TypeKind.FunctionPointer)
BoundTree\BoundDagTest.cs (1)
83var typeName = b.Type.TypeKind == TypeKind.Error ? "<error type>" : b.Type.ToString();
CodeGen\EmitAddress.cs (3)
420Debug.Assert(arrayAccess.Type.TypeKind == TypeKind.TypeParameter, "constrained call should only be used with type parameter types"); 530Debug.Assert(receiverType.TypeKind == TypeKind.TypeParameter || receiverType.IsValueType); 537return receiverType.TypeKind == TypeKind.TypeParameter && addressKind != AddressKind.Constrained;
CodeGen\EmitConversion.cs (1)
331if (receiver is not BoundTypeExpression { Type: { TypeKind: TypeKind.TypeParameter } })
CodeGen\EmitExpression.cs (8)
443(receiverType.IsReferenceType && receiverType.TypeKind == TypeKind.TypeParameter) || 809Debug.Assert(thisType.TypeKind != TypeKind.TypeParameter); 1086if (elementType.TypeKind == TypeKind.TypeParameter) 1668if (receiver is not BoundTypeExpression { Type: { TypeKind: TypeKind.TypeParameter } }) 2654if (left.Kind == BoundKind.ArrayAccess && left.Type.TypeKind == TypeKind.TypeParameter && !left.Type.IsValueType) 3480if (((object)type != null) && (type.TypeKind == TypeKind.TypeParameter) && constantValue.IsNull) 4100Debug.Assert(load.Type is { TypeKind: TypeKind.FunctionPointer }); 4106if (load.ConstrainedToTypeOpt is not { TypeKind: TypeKind.TypeParameter })
CodeGen\EmitStackAllocInitializer.cs (1)
27var elementType = (type.TypeKind == TypeKind.Pointer
CodeGen\EmitStatement.cs (1)
180if (exprType?.TypeKind == TypeKind.TypeParameter)
CodeGen\Optimizer.cs (2)
1172if ((method.IsAbstract || method.IsVirtual) && receiver is BoundTypeExpression { Type: { TypeKind: TypeKind.TypeParameter } } typeExpression) 2263if (receiverOpt is BoundTypeExpression { AliasOpt: null, BoundContainingTypeOpt: null, BoundDimensionsOpt: { IsEmpty: true }, Type: { TypeKind: TypeKind.TypeParameter } } typeExpression)
Compilation\CSharpCompilation.cs (9)
1951if (mainType is null || mainType.IsGenericType || (mainType.TypeKind != TypeKind.Class && mainType.TypeKind != TypeKind.Struct && !mainType.IsInterface)) 2247if (firstType.TypeKind != TypeKind.Array) 4235if (csharpReturnType.TypeKind is TypeKind.Dynamic || 4236csharpLeftType.TypeKind is TypeKind.Dynamic || 4237csharpRightType.TypeKind is TypeKind.Dynamic) 4279if (csharpLeftType.TypeKind is TypeKind.Delegate && 4461if (csharpReturnType.TypeKind is TypeKind.Dynamic || 4462csharpOperandType.TypeKind is TypeKind.Dynamic)
Compilation\CSharpSemanticModel.cs (3)
546if (varTypeInfo.Type is { TypeKind: not TypeKind.Error }) 976if (varTypeInfo.Type is { TypeKind: not TypeKind.Error }) 2242else if (boundExpr is BoundConversion { ConversionKind: ConversionKind.MethodGroup, Conversion: var exprConversion, Type: { TypeKind: TypeKind.FunctionPointer }, SymbolOpt: var symbol })
Compiler\ClsComplianceChecker.cs (22)
254if (symbol.TypeKind == TypeKind.Delegate) 285if (paramType.TypeKind == TypeKind.Array || 474if (type.TypeKind == TypeKind.Delegate) 605if (argument.TypeInternal.TypeKind == TypeKind.Array) 621if (argument.TypeInternal.TypeKind == TypeKind.Array) 639if (type.TypeKind == TypeKind.Array) 738System.Diagnostics.Debug.Assert(method.ContainingType.TypeKind == TypeKind.Delegate); 985case TypeKind.Array: 987case TypeKind.Dynamic: 992case TypeKind.Pointer: 993case TypeKind.FunctionPointer: 995case TypeKind.Error: 996case TypeKind.TypeParameter: 1000case TypeKind.Class: 1001case TypeKind.Struct: 1002case TypeKind.Interface: 1003case TypeKind.Delegate: 1004case TypeKind.Enum: 1005case TypeKind.Submission: 1032if (type.TypeKind == TypeKind.Error) 1372TypeKind typeKind = xType.TypeKind; 1378if (typeKind == TypeKind.Array)
Compiler\MethodCompiler.cs (3)
618containingType is { IsImplicitlyDeclared: false, TypeKind: TypeKind.Class or TypeKind.Struct or TypeKind.Interface } &&
Emitter\Model\MethodSymbolAdapter.cs (1)
615return this.IsExtern || (object)ContainingType != null && ContainingType.TypeKind == TypeKind.Delegate;
Emitter\Model\NamedTypeSymbolAdapter.cs (3)
44get { return AdaptedNamedTypeSymbol.TypeKind == TypeKind.Enum; } 520case TypeKind.Enum: 521case TypeKind.Delegate:
Emitter\NoPia\EmbeddedType.cs (3)
159case TypeKind.Enum: 160case TypeKind.Delegate: 162case TypeKind.Interface:
Emitter\NoPia\EmbeddedTypesManager.cs (16)
269case TypeKind.Interface: 292goto case TypeKind.Struct; 293case TypeKind.Struct: 294case TypeKind.Delegate: 295case TypeKind.Enum: 401Debug.Assert(namedType.TypeKind == TypeKind.Struct || namedType.TypeKind == TypeKind.Enum || namedType.TypeKind == TypeKind.Delegate); 404if (namedType.TypeKind == TypeKind.Struct || namedType.TypeKind == TypeKind.Enum) 454var containerKind = field.AdaptedFieldSymbol.ContainingType.TypeKind; 457if (containerKind == TypeKind.Interface || containerKind == TypeKind.Delegate || 458(containerKind == TypeKind.Struct && (field.AdaptedFieldSymbol.IsStatic || field.AdaptedFieldSymbol.DeclaredAccessibility != Accessibility.Public))) 493case TypeKind.Struct: 494case TypeKind.Enum:
FlowAnalysis\AbstractFlowPass.cs (1)
2236fieldSymbol.ContainingType.TypeKind == TypeKind.Struct &&
FlowAnalysis\DefiniteAssignment.cs (8)
102&& CurrentSymbol is MethodSymbol { MethodKind: MethodKind.Constructor, ContainingType.TypeKind: TypeKind.Struct }; 1053variableBySlot[slot].Symbol.GetTypeOrReturnType().TypeKind == TypeKind.Struct; 1131(_trackClassFields || type.TypeKind == TypeKind.Struct); 1258Debug.Assert(CurrentSymbol is MethodSymbol { MethodKind: MethodKind.Constructor, ContainingType.TypeKind: TypeKind.Struct }); 1311if (CurrentSymbol is not MethodSymbol { MethodKind: MethodKind.Constructor, ContainingType.TypeKind: TypeKind.Struct }) 2634case TypeKind.Array: 2638case TypeKind.Class: 2639case TypeKind.Struct:
FlowAnalysis\EmptyStructTypeCache.cs (4)
234case TypeKind.Enum: 235case TypeKind.Struct: 236case TypeKind.TypeParameter: 238case TypeKind.Array:
FlowAnalysis\NullableWalker.cs (7)
2356return valueType.Type?.TypeKind == TypeKind.TypeParameter && 2548targetType.TypeKind == TypeKind.TypeParameter || 2633fieldOrPropertyType.TypeKind == TypeKind.TypeParameter || 4425if (type.TypeKind != TypeKind.Struct) 5519{ TypeKind: TypeKind.Interface } => type.AllInterfacesNoUseSiteDiagnostics, 8863NamedTypeSymbol { TypeKind: TypeKind.Delegate, DelegateInvokeMethod: { Parameters: { } parameters } signature } => (signature, parameters), 9614case BoundExpression arg when arg.Type is { TypeKind: TypeKind.Delegate }:
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (2)
557LocalSymbol thisTemp = (F.CurrentType.TypeKind == TypeKind.Class) ? F.SynthesizedLocal(F.CurrentType) : null; 618LocalSymbol thisTemp = (F.CurrentType.TypeKind == TypeKind.Class) ? F.SynthesizedLocal(F.CurrentType) : null;
Lowering\AsyncRewriter\AsyncRewriter.cs (6)
74var typeKind = (compilationState.Compilation.Options.EnableEditAndContinue || method.IsIterator) ? TypeKind.Class : TypeKind.Struct; 172if (F.CurrentType.TypeKind == TypeKind.Class) 195if (stateMachineType.TypeKind == TypeKind.Class) 204if (frameType.TypeKind == TypeKind.Class)
Lowering\AsyncRewriter\AsyncStateMachine.cs (3)
20private readonly TypeKind _typeKind; 25public AsyncStateMachine(VariableSlotAllocator variableAllocatorOpt, TypeCompilationState compilationState, MethodSymbol asyncMethod, int asyncMethodOrdinal, TypeKind typeKind) 64public override TypeKind TypeKind
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (2)
603if (e.StrippedType().TypeKind == TypeKind.Enum) 799if ((object)d != null && d.TypeKind == TypeKind.Delegate)
Lowering\ClosureConversion\SynthesizedClosureEnvironment.cs (3)
38public override TypeKind TypeKind { get; } 55TypeKind = isStruct ? TypeKind.Struct : TypeKind.Class;
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (1)
241_ when variableType.TypeKind is TypeKind.Struct
Lowering\IteratorRewriter\IteratorStateMachine.cs (2)
46public override TypeKind TypeKind 48get { return TypeKind.Class; }
Lowering\LocalRewriter\DelegateCacheContainer.cs (2)
44public override TypeKind TypeKind => TypeKind.Class;
Lowering\LocalRewriter\DynamicSiteContainer.cs (2)
29public override TypeKind TypeKind 31get { return TypeKind.Class; }
Lowering\LocalRewriter\LocalRewriter.cs (1)
843Debug.Assert(node.Expression.Type is { TypeKind: TypeKind.Array });
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (4)
2260Debug.Assert(loweredLeft.Type is { TypeKind: TypeKind.Pointer }); 2265Debug.Assert(loweredRight.Type is { TypeKind: TypeKind.Pointer }); 2452Debug.Assert(loweredLeft.Type is { TypeKind: TypeKind.Pointer }); 2453Debug.Assert(loweredRight.Type is { TypeKind: TypeKind.Pointer });
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (1)
550case ConversionKind.MethodGroup when oldNodeOpt is { Type: { TypeKind: TypeKind.FunctionPointer } funcPtrType }:
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (2)
213else if (fixedCollectionInitializer.Expression.Type is { TypeKind: TypeKind.Array }) 241Debug.Assert(initializerExpr.Type is { TypeKind: TypeKind.Pointer });
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (4)
877Debug.Assert(collectionExpression.Type is { TypeKind: TypeKind.Array }); 905Debug.Assert(collectionExpression.Type is { TypeKind: TypeKind.Array }); 1026Debug.Assert(collectionExpression.Type is { TypeKind: TypeKind.Array }); 1054Debug.Assert(collectionExpression.Type is { TypeKind: TypeKind.Array });
Lowering\LocalRewriter\LocalRewriter_PreviousSubmissionReference.cs (1)
15Debug.Assert(targetType.TypeKind == TypeKind.Submission);
Lowering\LocalRewriter\LocalRewriter_PropertyAccess.cs (1)
37if (rewrittenReceiverOpt is { Type: { TypeKind: TypeKind.Array } } && !isLeftOfAssignment)
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (1)
772Debug.Assert(binaryOperand.Type is { TypeKind: TypeKind.Pointer });
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (1)
64if (!method.IsStatic && method.ContainingType.TypeKind == TypeKind.Struct)
Lowering\SyntheticBoundNodeFactory.cs (3)
1160Debug.Assert(array.Type is { TypeKind: TypeKind.Array }); 1166Debug.Assert(array.Type is { TypeKind: TypeKind.Array }); 1179Debug.Assert(array.Type is { TypeKind: TypeKind.Array });
SymbolDisplay\SymbolDisplayVisitor.cs (3)
312if (type != null && type.TypeKind != TypeKind.Error) 375(containingType.TypeKind != TypeKind.Interface && !IsEnumMember(symbol) & !IsLocalFunction(symbol)))) 467&& 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 (26)
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 && 598case TypeKind.Class when symbol.IsRecord: 600case TypeKind.Struct when symbol.IsRecord: 602case TypeKind.Submission: 603case TypeKind.Module: 604case TypeKind.Class: 606case TypeKind.Delegate: 608case TypeKind.Enum: 610case TypeKind.Error: 612case TypeKind.Interface: 614case TypeKind.Struct: 684if (symbol.IsAnonymousType && symbol.TypeKind != TypeKind.Delegate) 698case TypeKind.Class when symbol.IsRecord: 703case TypeKind.Struct when symbol.IsRecord: 719case TypeKind.Module: 720case TypeKind.Class: 725case TypeKind.Enum: 730case TypeKind.Delegate: 735case TypeKind.Interface: 740case TypeKind.Struct:
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\AnonymousTypes\PublicSymbols\AnonymousManager.TypeOrDelegatePublicSymbol.cs (1)
164public abstract override TypeKind TypeKind { get; }
Symbols\AnonymousTypes\PublicSymbols\AnonymousType.DelegatePublicSymbol.cs (2)
37public override TypeKind TypeKind => TypeKind.Delegate;
Symbols\AnonymousTypes\PublicSymbols\AnonymousType.TypePublicSymbol.cs (2)
78public override TypeKind TypeKind 80get { return TypeKind.Class; }
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.DelegateTemplateSymbol.cs (2)
226public override TypeKind TypeKind => TypeKind.Delegate;
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TemplateSymbol.cs (2)
101public override TypeKind TypeKind 103get { return TypeKind.Class; }
Symbols\ArrayTypeSymbol.cs (3)
294public override TypeKind TypeKind 298return TypeKind.Array; 376while (current.TypeKind == TypeKind.Array)
Symbols\AssemblySymbol.cs (3)
501return GetSpecialType(SpecialType.System_Runtime_CompilerServices_RuntimeFeature) is { TypeKind: TypeKind.Class, IsStatic: true } && 524GetSpecialType(SpecialType.System_Runtime_CompilerServices_PreserveBaseOverridesAttribute) is { TypeKind: TypeKind.Class }; 1029if (result is null || result.TypeKind == TypeKind.Error)
Symbols\BaseTypeAnalysis.cs (1)
118if (fieldType is null || fieldType.TypeKind != TypeKind.Struct || field.IsStatic)
Symbols\Compilation_WellKnownMembers.cs (5)
221if (type.Kind != SymbolKind.NamedType || type.TypeKind != TypeKind.Class) 942case TypeKind.Dynamic: 946case TypeKind.Array: 955case TypeKind.Pointer: 964case TypeKind.FunctionPointer:
Symbols\ConstantValueUtils.cs (1)
89if (typeSymbol.TypeKind == TypeKind.TypeParameter)
Symbols\ConstraintsHelper.cs (28)
168case TypeKind.TypeParameter: 219case TypeKind.Interface: 220case TypeKind.Class: 221case TypeKind.Delegate: 223Debug.Assert(inherited || currentCompilation == null || constraintType.TypeKind != TypeKind.Delegate); 238case TypeKind.Struct: 242if (underlyingType.TypeKind == TypeKind.TypeParameter) 262case TypeKind.Enum: 268case TypeKind.Array: 274case TypeKind.Error: 279case TypeKind.Pointer: 280case TypeKind.FunctionPointer: 285case TypeKind.Submission: 1172else if (typeArgument.TypeKind == TypeKind.TypeParameter) 1356if (typeArgument.TypeKind == TypeKind.TypeParameter) 1456case TypeKind.Struct: 1459case TypeKind.Enum: 1460case TypeKind.Dynamic: 1463case TypeKind.Class: 1471case TypeKind.TypeParameter: 1477case TypeKind.Submission: 1488Debug.Assert(type.TypeKind is TypeKind.Class or TypeKind.Struct); 1538case TypeKind.Array: 1539case TypeKind.Class: 1540case TypeKind.Delegate: 1541case TypeKind.Enum: 1542case TypeKind.Struct:
Symbols\DynamicTypeSymbol.cs (3)
62public override TypeKind TypeKind 66return TypeKind.Dynamic; 202if (ReferenceEquals(this, t2) || t2.TypeKind == TypeKind.Dynamic)
Symbols\EnumConversions.cs (7)
13internal static TypeKind ToTypeKind(this DeclarationKind kind) 21return TypeKind.Class; 24return TypeKind.Submission; 27return TypeKind.Delegate; 30return TypeKind.Enum; 33return TypeKind.Interface; 37return TypeKind.Struct;
Symbols\ErrorTypeSymbol.cs (2)
225public sealed override TypeKind TypeKind 229return TypeKind.Error;
Symbols\ExtendedErrorTypeSymbol.cs (8)
224if ((object?)oldSymbol == null || oldSymbol.TypeKind != TypeKind.Error) 250internal static TypeKind ExtractNonErrorTypeKind(TypeSymbol oldSymbol) 252if (oldSymbol.TypeKind != TypeKind.Error) 267TypeKind commonTypeKind = TypeKind.Error; 273if ((object?)type != null && type.TypeKind != TypeKind.Error) 275if (commonTypeKind == TypeKind.Error) 278return TypeKind.Error; // no common kind.
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (2)
75public override TypeKind TypeKind => TypeKind.FunctionPointer;
Symbols\FunctionTypeSymbol.cs (1)
102public override TypeKind TypeKind => TypeKindInternal.FunctionType;
Symbols\Metadata\PE\MetadataDecoder.cs (4)
397case TypeKind.Interface: 411case TypeKind.Delegate: 412case TypeKind.Enum: 413case TypeKind.Struct:
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (11)
86case TypeKind.Array: 88case TypeKind.Pointer: 90case TypeKind.FunctionPointer: 92case TypeKind.TypeParameter: 93case TypeKind.Dynamic: 95case TypeKind.Class: 96case TypeKind.Struct: 97case TypeKind.Interface: 98case TypeKind.Delegate: 99case TypeKind.Enum: 102Debug.Assert(type.TypeKind == TypeKind.Error);
Symbols\Metadata\PE\PEMethodSymbol.cs (2)
1264if ((this.ContainingType.TypeKind == TypeKind.Class && this.IsRuntimeFinalizer(skipFirstMethodKindCheck: true)) || 1271if (_containingType.TypeKind == TypeKind.Delegate)
Symbols\Metadata\PE\PENamedTypeSymbol.cs (23)
69private TypeKind _lazyKind; 119if (this.TypeKind == TypeKind.Enum) 985if (this.TypeKind == TypeKind.Enum) 1190&& this.TypeKind == TypeKind.Enum) 1284if (this.TypeKind == TypeKind.Enum) 1343if (this.TypeKind == TypeKind.Struct) 1728case TypeKind.Class: 1729case TypeKind.Struct: 1730case TypeKind.Delegate: 1755public override TypeKind TypeKind 1759TypeKind result = _lazyKind; 1761if (result == TypeKind.Unknown) 1765result = TypeKind.Interface; 1771result = TypeKind.Class; 1781result = TypeKind.Enum; 1786result = TypeKind.Delegate; 1794result = TypeKind.Struct; 1905if (this.TypeKind == TypeKind.Struct) 1988var isOrdinaryEmbeddableStruct = (this.TypeKind == TypeKind.Struct) && (this.SpecialType == Microsoft.CodeAnalysis.SpecialType.None) && this.ContainingAssembly.IsLinked; 2130else if (TypeKind == TypeKind.Class && SpecialType != SpecialType.System_Enum) 2291if (this.TypeKind == TypeKind.Struct) 2319if (this.TypeKind == TypeKind.Struct) 2361var coClassType = ((object)type != null && (type.TypeKind == TypeKind.Class || type.IsErrorType())) ? (NamedTypeSymbol)type : null;
Symbols\MissingMetadataTypeSymbol.cs (1)
376t2.TypeKind == TypeKind.Dynamic &&
Symbols\NamedTypeSymbol.cs (13)
179if (TypeKind != TypeKind.Delegate) 364(thisParam.RefKind is RefKind.In or RefKind.RefReadOnlyParameter && thisParam.Type.TypeKind != TypeKind.Struct)) 389var kind = TypeKind; 390return kind != TypeKind.Enum && kind != TypeKind.Struct && kind != TypeKind.Error; 403var kind = TypeKind; 404return kind == TypeKind.Struct || kind == TypeKind.Enum; 437return TypeKind == TypeKind.Submission; 456var name = (TypeKind == TypeKind.Submission) ? SynthesizedEntryPointSymbol.FactoryName : SynthesizedEntryPointSymbol.MainName; 796if (t2.TypeKind == TypeKind.Dynamic) 1620/// Requires less computation than <see cref="TypeSymbol.TypeKind"/> == <see cref="TypeKind.Interface"/>.
Symbols\NamespaceOrTypeSymbol.cs (1)
212TypeKind typeKind = kind.ToDeclarationKind().ToTypeKind();
Symbols\PointerTypeSymbol.cs (3)
165public override TypeKind TypeKind 169return TypeKind.Pointer; 219while (current.TypeKind == TypeKind.Pointer)
Symbols\PublicModel\TypeSymbol.cs (1)
135TypeKind ITypeSymbol.TypeKind
Symbols\Retargeting\RetargetingSymbolTranslator.cs (2)
842Debug.Assert(nts.TypeKind == TypeKind.Error || nts.PrimitiveTypeCode == Cci.PrimitiveTypeCode.NotPrimitive); 854Debug.Assert(ts.TypeKind == TypeKind.Error || ts.PrimitiveTypeCode == Cci.PrimitiveTypeCode.NotPrimitive);
Symbols\Source\ExplicitInterfaceHelpers.cs (3)
193case TypeKind.Class: 194case TypeKind.Struct: 195case TypeKind.Interface:
Symbols\Source\SourceAssemblySymbol.cs (1)
2223Debug.Assert(forwardedType.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 &&
Symbols\Source\SourceEventSymbol.cs (4)
557else if (IsAbstract && ContainingType.TypeKind == TypeKind.Struct) 562else if (IsVirtual && ContainingType.TypeKind == TypeKind.Struct) 603else if (IsAbstract && !ContainingType.IsAbstract && (ContainingType.TypeKind == TypeKind.Class || ContainingType.TypeKind == TypeKind.Submission))
Symbols\Source\SourceFixedFieldSymbol.cs (2)
168public override TypeKind TypeKind 170get { return TypeKind.Struct; }
Symbols\Source\SourceMemberContainerSymbol.cs (42)
104public TypeKind TypeKind 106get { return (TypeKind)((_flags >> TypeKindOffset) & TypeKindMask); } 120public Flags(ExtendedSpecialType specialType, TypeKind typeKind, bool hasPrimaryConstructor) 236TypeKind typeKind = declaration.Kind.ToTypeKind(); 260Debug.Assert(typeKind is TypeKind.Struct or TypeKind.Class || !HasPrimaryConstructor); 289private DeclarationModifiers MakeModifiers(TypeKind typeKind, BindingDiagnosticBag diagnostics) 317case TypeKind.Class: 318case TypeKind.Submission: 328case TypeKind.Struct: 337case TypeKind.Interface: 340case TypeKind.Delegate: 369case TypeKind.Interface: 372case TypeKind.Struct: 373case TypeKind.Enum: 376case TypeKind.Delegate: 783public override TypeKind TypeKind 804return this.TypeKind == TypeKind.Interface; 1381case TypeKind.Class: 1382case TypeKind.Struct: 1388case TypeKind.Interface: 1391goto case TypeKind.Class; 1510if (this.TypeKind == TypeKind.Enum) 2287if (this.TypeKind == TypeKind.Delegate) 2346if (TypeKind != TypeKind.Struct) 2371Debug.Assert(TypeKind == TypeKind.Struct); 2405(type.TypeKind == TypeKind.Struct) && 2699if (f is null || !f.IsStatic || f.Type.TypeKind != TypeKind.Struct) continue; 2728if (f is null || !f.IsStatic || f.Type.TypeKind != TypeKind.Struct) continue; 3246case TypeKind.Struct: 3251case TypeKind.Enum: 3255case TypeKind.Class: 3256case TypeKind.Interface: 3257case TypeKind.Submission: 3479if (TypeKind is TypeKind.Class) 3486case TypeKind.Struct: 3487case TypeKind.Enum: 3488case TypeKind.Class: 3489case TypeKind.Interface: 3490case TypeKind.Submission: 4124Debug.Assert(TypeKind == TypeKind.Struct); 4833builder.AddNonTypeMember((this.TypeKind == TypeKind.Submission) ?
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (6)
513case TypeKind.Enum: 514case TypeKind.Delegate: 517case TypeKind.Class: 518case TypeKind.Struct: 519case TypeKind.Interface: 520case TypeKind.Submission: // we have to check that "override" is not used
Symbols\Source\SourceMemberFieldSymbol.cs (1)
563if (ContainingType.TypeKind != TypeKind.Struct)
Symbols\Source\SourceMethodSymbolWithAttributes.cs (2)
1469if (ContainingSymbol is NamedTypeSymbol { IsComImport: true, TypeKind: TypeKind.Class or TypeKind.Interface })
Symbols\Source\SourceNamedTypeSymbol.cs (12)
812case TypeKind.Delegate: 815case TypeKind.Enum: 816case TypeKind.Interface: 819case TypeKind.Struct: 820case TypeKind.Class: 1211if (TypeKind != TypeKind.Struct) 1232return builderType is NamedTypeSymbol { TypeKind: TypeKind.Class or TypeKind.Struct, IsGenericType: false }; 1339if ((object)coClassType != null && coClassType.TypeKind == TypeKind.Class) 1491if (this.TypeKind == TypeKind.Struct) 1585if (this.TypeKind == TypeKind.Class) 1823if (TypeKind == TypeKind.Struct && !IsRecordStruct && HasInlineArrayAttribute(out _))
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (31)
44TypeKind is not (TypeKind.Enum or TypeKind.Delegate or TypeKind.Submission)) 282if (this.TypeKind == TypeKind.Enum) 312else if (baseType.TypeKind == TypeKind.Error && (object)partBase != null) 319else if ((object)partBase != null && !TypeSymbol.Equals(partBase, baseType, TypeCompareKind.ConsiderEverything) && partBase.TypeKind != TypeKind.Error) 469if (i == 0 && TypeKind == TypeKind.Class) // allow class in the first position 508if (baseType.TypeKind == TypeKind.Error) 512TypeKind guessTypeKind = baseType.GetNonErrorTypeKindGuess(); 513if (guessTypeKind == TypeKind.Interface) 520if ((baseType.TypeKind == TypeKind.Class || 521baseType.TypeKind == TypeKind.Delegate || 522baseType.TypeKind == TypeKind.Struct || 550case TypeKind.Interface: 583case TypeKind.Class: 584if (TypeKind == TypeKind.Class) 600case TypeKind.TypeParameter: 604case TypeKind.Error: 609case TypeKind.Dynamic: 613case TypeKind.Submission: 633(TypeKind != TypeKind.Class || baseType.TypeKind == TypeKind.Interface || ((TypeDeclarationSyntax)decl.SyntaxReference.GetSyntax()).ParameterList is null)) 660var typeKind = this.TypeKind; 662if (typeKind == TypeKind.Enum) 669bool isInterface = (typeKind == TypeKind.Interface); 711var typeKind = this.TypeKind; 714if (typeKind == TypeKind.Enum) 728case TypeKind.Class: 738case TypeKind.Struct: 742case TypeKind.Interface: 745case TypeKind.Delegate:
Symbols\Source\SourceNamedTypeSymbol_Enum.cs (2)
46if (this.TypeKind != TypeKind.Enum) 89if (this.TypeKind != TypeKind.Enum)
Symbols\Source\SourceOrdinaryMethodSymbol.cs (6)
222else if (parameter0RefKind is RefKind.In or RefKind.RefReadOnlyParameter && parameter0Type.TypeKind != TypeKind.Struct) 837else if (IsSealed && ContainingType.TypeKind == TypeKind.Struct) 859else if (IsAbstract && ContainingType.TypeKind == TypeKind.Struct) 864else if (IsVirtual && ContainingType.TypeKind == TypeKind.Struct) 874else if (IsAbstract && !ContainingType.IsAbstract && (ContainingType.TypeKind == TypeKind.Class || ContainingType.TypeKind == TypeKind.Submission))
Symbols\Source\SourcePropertyAccessorSymbol.cs (3)
529if (IsAbstract && !ContainingType.IsAbstract && (ContainingType.TypeKind == TypeKind.Class || ContainingType.TypeKind == TypeKind.Submission)) 534else if (IsVirtual && ContainingType.IsSealed && ContainingType.TypeKind != TypeKind.Struct) // error CS0106 on struct already
Symbols\Source\SourcePropertySymbolBase.cs (2)
1094else if (IsAbstract && ContainingType.TypeKind == TypeKind.Struct) 1099else if (IsVirtual && ContainingType.TypeKind == TypeKind.Struct)
Symbols\Source\ThisParameterSymbol.cs (1)
147if (ContainingType?.TypeKind != TypeKind.Struct)
Symbols\Symbol.cs (3)
258if (ContainingType?.TypeKind == TypeKind.Submission) 280if (ContainingType.TypeKind == TypeKind.Submission) 291Debug.Assert(ContainingType.TypeKind != TypeKind.Submission);
Symbols\Symbol_Attributes.cs (7)
70case TypeKind.Class: 73case TypeKind.Delegate: 76case TypeKind.Enum: 79case TypeKind.Interface: 82case TypeKind.Struct: 85case TypeKind.TypeParameter: 88case TypeKind.Submission:
Symbols\SymbolExtensions.cs (3)
84return superType.TypeKind == TypeKind.Submission && subType.TypeKind == TypeKind.Submission; 251if (type.TypeKind == TypeKind.TypeParameter)
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorTypeSymbol.cs (2)
138public override TypeKind TypeKind => TypeKind.Class;
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (2)
815public override TypeKind TypeKind => TypeKind.Class;
Symbols\Synthesized\SynthesizedContainer.cs (3)
56internal sealed override bool IsInterface => this.TypeKind == TypeKind.Interface; 96public override bool IsAbstract => (object)Constructor == null && this.TypeKind != TypeKind.Struct; 162internal override NamedTypeSymbol BaseTypeNoUseSiteDiagnostics => ContainingAssembly.GetSpecialType(this.TypeKind == TypeKind.Struct ? SpecialType.System_ValueType : SpecialType.System_Object);
Symbols\Synthesized\SynthesizedEmbeddedAttributeSymbol.cs (2)
74public override TypeKind TypeKind => TypeKind.Class;
Symbols\Synthesized\SynthesizedHotReloadExceptionSymbol.cs (2)
92public override TypeKind TypeKind => TypeKind.Class;
Symbols\Synthesized\SynthesizedInlineArrayTypeSymbol.cs (2)
63public override TypeKind TypeKind => TypeKind.Struct;
Symbols\Synthesized\SynthesizedInstanceConstructor.cs (2)
84Debug.Assert(_containingType.TypeKind == TypeKind.Class); 88if (_containingType.TypeKind == TypeKind.Delegate)
Symbols\Synthesized\SynthesizedPrivateImplementationDetailsType.cs (2)
56public override TypeKind TypeKind => TypeKind.Class;
Symbols\Synthesized\SynthesizedSubmissionConstructor.cs (1)
19Debug.Assert(containingType.TypeKind == TypeKind.Submission);
Symbols\TypeParameterSymbol.cs (7)
195public sealed override TypeKind TypeKind 199return TypeKind.TypeParameter; 393if (constraint.TypeKind == TypeKind.TypeParameter) 403Debug.Assert(constraint.TypeKind != TypeKind.TypeParameter); 413case TypeKind.Interface: 415case TypeKind.Error: 484if (constraintType.TypeKind == TypeKind.TypeParameter)
Symbols\TypeSymbol.cs (7)
108var interfaces = (baseType.TypeKind == TypeKind.TypeParameter) ? ((TypeParameterSymbol)baseType).EffectiveInterfacesNoUseSiteDiagnostics : baseType.InterfacesNoUseSiteDiagnostics(); 344var interfaces = (baseType.TypeKind == TypeKind.TypeParameter) ? ((TypeParameterSymbol)baseType).EffectiveInterfacesNoUseSiteDiagnostics : baseType.InterfacesNoUseSiteDiagnostics(); 485public abstract TypeKind TypeKind { get; } 509TypeKind.Pointer => Microsoft.Cci.PrimitiveTypeCode.Pointer, 510TypeKind.FunctionPointer => Microsoft.Cci.PrimitiveTypeCode.FunctionPointer, 2495TypeKind ITypeSymbolInternal.TypeKind => this.TypeKind; 2521if (this.TypeKind == TypeKind.Struct)
Symbols\TypeSymbolExtensions.cs (69)
71if (type.TypeKind != TypeKind.TypeParameter) 117if (type.TypeKind == TypeKind.TypeParameter) 222return type.TypeKind == TypeKind.Enum; 317case TypeKind.Pointer: 318case TypeKind.Dynamic: 319case TypeKind.FunctionPointer: 335return type.TypeKind == TypeKind.Class; 341return type.TypeKind == TypeKind.Struct; 357return type.TypeKind == TypeKind.Dynamic; 363return type.TypeKind == TypeKind.TypeParameter; 369return type.TypeKind == TypeKind.Array; 375return type.TypeKind == TypeKind.Array && ((ArrayTypeSymbol)type).IsSZArray; 400return type.TypeKind == TypeKind.FunctionPointer; 407case TypeKind.Pointer: 408case TypeKind.FunctionPointer: 420case TypeKind.Class: 421case TypeKind.Struct: 424case TypeKind.TypeParameter: 570return type.TypeKind == TypeKind.Delegate; 701case TypeKind.Class: 702case TypeKind.Struct: 703case TypeKind.Interface: 704case TypeKind.Enum: 705case TypeKind.Delegate: 706case TypeKind.Submission: 776case TypeKind.Class: 777case TypeKind.Struct: 778case TypeKind.Interface: 779case TypeKind.Enum: 780case TypeKind.Delegate: 795case TypeKind.Submission: 834case TypeKind.Dynamic: 835case TypeKind.TypeParameter: 836case TypeKind.Submission: 837case TypeKind.Enum: 847goto case TypeKind.Delegate; 849case TypeKind.Error: 850case TypeKind.Class: 851case TypeKind.Struct: 852case TypeKind.Interface: 853case TypeKind.Delegate: 921case TypeKind.Array: 925case TypeKind.Pointer: 929case TypeKind.FunctionPointer: 1164if (ReferenceEquals(parent2.OriginalDefinition, parent1OriginalDefinition) || parent1OriginalDefinition.TypeKind == TypeKind.Submission && parent2.TypeKind == TypeKind.Submission) 1204(type, parameter, unused) => type.TypeKind == TypeKind.TypeParameter && (parameter is null || TypeSymbol.Equals(type, parameter, TypeCompareKind.ConsiderEverything2)); 1215(type, parameterContainer, unused) => type.TypeKind == TypeKind.TypeParameter && (object)type.ContainingSymbol == (object)parameterContainer; 1224(type, parameters, unused) => type.TypeKind == TypeKind.TypeParameter && parameters.Contains((TypeParameterSymbol)type); 1233(type, _, _) => type.TypeKind == TypeKind.TypeParameter && type.ContainingSymbol is MethodSymbol; 1244private static readonly Func<TypeSymbol, object?, bool, bool> s_containsDynamicPredicate = (type, unused1, unused2) => type.TypeKind == TypeKind.Dynamic; 1282type.VisitType((TypeSymbol t, object? _, bool _) => t.TypeKind is TypeKind.Pointer or TypeKind.FunctionPointer, null) is object; 1310internal static TypeKind GetNonErrorTypeKindGuess(this TypeSymbol type) 1509case TypeKind.Struct: 1512case TypeKind.Array: 1513case TypeKind.Class: 1514case TypeKind.Delegate: 1515case TypeKind.Dynamic: 1516case TypeKind.Error: 1517case TypeKind.Interface: 1518case TypeKind.Pointer: 1519case TypeKind.FunctionPointer: 1522case TypeKind.Enum: 1525case TypeKind.TypeParameter: 1528case TypeKind.Submission: 1669return type.IsReferenceType && type.TypeKind != TypeKind.TypeParameter; 1677return type.IsValueType && type.TypeKind != TypeKind.TypeParameter; 2003if (taskType.TypeKind == TypeKind.Error)
Symbols\TypeWithAnnotations.cs (4)
200if (typeSymbol.TypeKind != TypeKind.TypeParameter) 271public TypeKind TypeKind => Type.TypeKind; 650if (type.TypeKind != TypeKind.Array) 1068Debug.Assert(underlying.TypeKind == TypeKind.TypeParameter);
Symbols\VarianceSafety.cs (11)
75case TypeKind.Class: 76case TypeKind.Struct: 77case TypeKind.Enum: 79case TypeKind.Interface: 80case TypeKind.Delegate: 370case TypeKind.Class: 371case TypeKind.Struct: 372case TypeKind.Enum: // Can't be generic, but can be nested in generic. 373case TypeKind.Interface: 374case TypeKind.Delegate: 375case TypeKind.Error:
Symbols\Wrapped\WrappedNamedTypeSymbol.cs (1)
111public override TypeKind TypeKind
Utilities\TypeSymbolExtensions.cs (16)
183case TypeKind.TypeParameter: 186case TypeKind.Class: 187case TypeKind.Struct: 188case TypeKind.Error: 189case TypeKind.Interface: 192case TypeKind.Dynamic: 193case TypeKind.Enum: 194case TypeKind.Delegate: 195case TypeKind.Array: 196case TypeKind.Submission: 197case TypeKind.Pointer: 198case TypeKind.FunctionPointer: 277case TypeKind.Class: 278case TypeKind.Error: 280case TypeKind.Interface: 282case TypeKind.Struct:
Microsoft.CodeAnalysis.CSharp.CodeStyle (28)
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)
138if (operation?.Parent is IAssignmentOperation { Type.TypeKind: TypeKind.Dynamic }) 360if (!(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 (2)
274if (namedType.TypeKind is not (TypeKind.Class or TypeKind.Struct))
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (3)
68if (lockType.GetTypeMembers("Scope").FirstOrDefault() is not { TypeKind: TypeKind.Struct, IsRefLikeType: true, DeclaredAccessibility: Accessibility.Public }) 80if (namedType is not { TypeKind: TypeKind.Class or TypeKind.Struct })
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ITypeSymbolExtensions.cs (2)
42if (typeSymbol.TypeKind is TypeKind.Class or TypeKind.Struct)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (2)
212if (containingType != null && containingType.TypeKind == TypeKind.Interface) 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) 541originalConvertedType.IsReferenceType && rewrittenConvertedType.TypeKind == TypeKind.Dynamic) 929if (!original.IsReferenceType || original.TypeKind == TypeKind.Interface) 1253if (originalMemberSymbol.ContainingType.TypeKind == TypeKind.Interface) 1293rewrittenType.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 (42)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (5)
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 (2)
39return classType?.TypeKind is TypeKind.Class or TypeKind.Struct;
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateConversionService.cs (5)
57ISet<TypeKind> classInterfaceModuleStructTypes, 83ISet<TypeKind> classInterfaceModuleStructTypes, 109ISet<TypeKind> classInterfaceModuleStructTypes, 137ISet<TypeKind> classInterfaceModuleStructTypes, 168ISet<TypeKind> classInterfaceModuleStructTypes,
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 (4)
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 (3)
439if (type.TypeKind == TypeKind.Delegate) 1017if (parentTypes.Any(static parentType => parentType.InferredType.SpecialType == SpecialType.System_String || parentType.InferredType.TypeKind == TypeKind.Delegate)) 1019return parentTypes.Where(parentType => parentType.InferredType.SpecialType == SpecialType.System_String || parentType.InferredType.TypeKind == TypeKind.Delegate);
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (9)
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (9)
234[InlineData("class [|c2|] { }", "class C2 { }", TypeKind.Class, Accessibility.Private)] 235[InlineData("struct [|c2|] { }", "struct C2 { }", TypeKind.Struct, Accessibility.Private)] 236[InlineData("interface [|c2|] { }", "interface C2 { }", TypeKind.Interface, Accessibility.Private)] 237[InlineData("delegate void [|c2|]();", "delegate void C2();", TypeKind.Delegate, Accessibility.Private)] 238[InlineData("enum [|c2|] { }", "enum C2 { }", TypeKind.Enum, Accessibility.Private)] 256var alternateSymbolKind = TypeKind.Class.Equals(symbolKind) ? TypeKind.Interface : TypeKind.Class;
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (107)
CodeActions\GenerateType\GenerateTypeTests_Dialog.cs (85)
356typeKind: TypeKind.Interface, 396typeKind: TypeKind.Struct, 436typeKind: TypeKind.Enum, 471typeKind: TypeKind.Enum, 512typeKind: TypeKind.Enum, 551typeKind: TypeKind.Interface, 595typeKind: TypeKind.Interface, 640typeKind: TypeKind.Interface, 685typeKind: TypeKind.Interface, 723typeKind: TypeKind.Interface, 759typeKind: TypeKind.Interface, 798typeKind: TypeKind.Interface, 840typeKind: TypeKind.Interface, 876typeKind: TypeKind.Interface, 919typeKind: TypeKind.Interface, 966typeKind: TypeKind.Interface, 1015typeKind: TypeKind.Interface, 1070typeKind: TypeKind.Interface, 1115typeKind: TypeKind.Interface, 1164typeKind: TypeKind.Interface, 1223typeKind: TypeKind.Interface, 1262typeKind: TypeKind.Interface, 1307typeKind: TypeKind.Interface, 1346typeKind: TypeKind.Interface, 1392typeKind: TypeKind.Interface, 1432typeKind: TypeKind.Interface, 1471typeKind: TypeKind.Class, 1515typeKind: TypeKind.Class, 1553typeKind: TypeKind.Class, 1598typeKind: TypeKind.Class, 1637typeKind: TypeKind.Class, 1682typeKind: TypeKind.Class, 1719typeKind: TypeKind.Class, 1759typeKind: TypeKind.Class, 1804typeKind: TypeKind.Class, 1848typeKind: TypeKind.Class, 1899typeKind: TypeKind.Class, 1936typeKind: TypeKind.Module, 1987typeKind: TypeKind.Interface, 2009typeKind: TypeKind.Interface, 2039typeKind: TypeKind.Class, 2076typeKind: TypeKind.Class, 2114typeKind: TypeKind.Class, 2152typeKind: TypeKind.Class, 2189typeKind: TypeKind.Class, 2219typeKind: TypeKind.Class, 2270typeKind: TypeKind.Structure, 2298typeKind: TypeKind.Class, 2333typeKind: TypeKind.Interface, 2368typeKind: TypeKind.Interface, 2404typeKind: TypeKind.Delegate, 2439typeKind: TypeKind.Delegate, 2472typeKind: TypeKind.Delegate, 2505typeKind: TypeKind.Delegate, 2538typeKind: TypeKind.Delegate, 2567typeKind: TypeKind.Delegate, 2596typeKind: TypeKind.Delegate, 2626typeKind: TypeKind.Delegate, 2661typeKind: TypeKind.Delegate, 2696typeKind: TypeKind.Delegate, 2729typeKind: TypeKind.Delegate, 2762typeKind: TypeKind.Delegate, 2792typeKind: TypeKind.Delegate, 2821typeKind: TypeKind.Delegate, 2856typeKind: TypeKind.Delegate, 2891typeKind: TypeKind.Delegate, 2924typeKind: TypeKind.Delegate, 2957typeKind: TypeKind.Delegate, 2987typeKind: TypeKind.Delegate, 3016typeKind: TypeKind.Delegate, 3050typeKind: TypeKind.Delegate, 3081typeKind: TypeKind.Delegate, 3111typeKind: TypeKind.Class, 3148typeKind: TypeKind.Class, 3185typeKind: TypeKind.Class, 3228typeKind: TypeKind.Class, 3277typeKind: TypeKind.Class, 3403typeKind: TypeKind.Delegate, 3428typeKind: TypeKind.Delegate, 3463typeKind: TypeKind.Delegate, 3490typeKind: TypeKind.Delegate, 3531typeKind: TypeKind.Class, 3564typeKind: TypeKind.Class, 3597typeKind: TypeKind.Delegate, 3636typeKind: TypeKind.Delegate,
Diagnostics\NamingStyles\EditorConfigNamingStyleParserTests.cs (14)
181new SymbolKindOrTypeKind(TypeKind.Delegate) 229new SymbolKindOrTypeKind(TypeKind.Delegate) 343[InlineData("interface", new object[] { TypeKind.Interface })] 344[InlineData("*", new object[] { SymbolKind.Namespace, TypeKind.Class, TypeKind.Struct, TypeKind.Interface, TypeKind.Enum, SymbolKind.Property, MethodKind.Ordinary, MethodKind.LocalFunction, SymbolKind.Field, SymbolKind.Event, TypeKind.Delegate, SymbolKind.Parameter, SymbolKind.TypeParameter, SymbolKind.Local })] 345[InlineData(null, new object[] { SymbolKind.Namespace, TypeKind.Class, TypeKind.Struct, TypeKind.Interface, TypeKind.Enum, SymbolKind.Property, MethodKind.Ordinary, MethodKind.LocalFunction, SymbolKind.Field, SymbolKind.Event, TypeKind.Delegate, SymbolKind.Parameter, SymbolKind.TypeParameter, SymbolKind.Local })] 454var expectedApplicableTypeKindList = new[] { new SymbolKindOrTypeKind(TypeKind.Interface) };
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.Emit.UnitTests (18)
CodeGen\CodeGenAsyncTests.cs (3)
71Assert.Equal(TypeKind.Struct, stateMachine.TypeKind); 80Assert.Equal(TypeKind.Struct, stateMachine.TypeKind); 89Assert.Equal(TypeKind.Class, stateMachine.TypeKind);
CodeGen\CodeGenAwaitUsingTests.cs (1)
3057Assert.Equal(TypeKind.Error, comp.GetWellKnownType(WellKnownType.System_IAsyncDisposable).TypeKind);
CodeGen\CodeGenFunctionPointersTests.cs (2)
302Assert.Equal(TypeKind.FunctionPointer, field.Type.TypeKind); 378Assert.Equal(TypeKind.FunctionPointer, field.Type.TypeKind);
CodeGen\CodeGenTupleTest.cs (6)
3350Assert.Equal(TypeKind.Error, mTuple.TupleUnderlyingType.TypeKind); 3353Assert.Equal(TypeKind.Error, mTuple.TypeKind); 11154Assert.Equal(TypeKind.Struct, m1Tuple.TypeKind); 11418Assert.Equal(TypeKind.Struct, m1Tuple.TypeKind); 12736Assert.Equal(TypeKind.Struct, m1Tuple.TypeKind); 23928Assert.Equal(TypeKind.Class, compilation.GetWellKnownType(WellKnownType.System_ValueTuple_T2).TypeKind);
Emit\EmitMetadataTests.cs (6)
317Assert.Equal(TypeKind.Interface, i1.TypeKind); 318Assert.Equal(TypeKind.Interface, i2.TypeKind); 319Assert.Equal(TypeKind.Interface, i3.TypeKind); 320Assert.Equal(TypeKind.Class, classA.TypeKind); 321Assert.Equal(TypeKind.Class, classB.TypeKind); 2075Assert.Equal(TypeKind.Interface, beginInvoke.ReturnType.TypeKind);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (23)
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); 33263Assert.Equal(TypeKind.Class, model.GetTypeInfo(declaration2).Type.TypeKind); 33270Assert.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);
Semantics\PrimaryConstructorTests.cs (8)
437if (c.TypeKind == TypeKind.Struct) 523Assert.Equal(c.TypeKind != TypeKind.Struct ? 1 : 2, c.InstanceConstructors.Length); 532if (c.TypeKind == TypeKind.Struct) 627if (c.TypeKind == TypeKind.Struct) 826case TypeKind.Class: 865case TypeKind.Class: 901case TypeKind.Class: 933case TypeKind.Class:
Semantics\RecordTests.cs (1)
119Assert.Equal(TypeKind.Class, point.TypeKind);
Microsoft.CodeAnalysis.CSharp.Features (63)
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 (5)
129if (type.TypeKind != TypeKind.Enum) 184if (type.TypeKind == TypeKind.Enum) 292if (containingType?.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 (3)
174if (semanticModel.GetTypeInfo(objectCreationExpression, cancellationToken).Type is INamedTypeSymbol type && within != null && type.TypeKind != TypeKind.Delegate) 213if (within is { TypeKind: TypeKind.Struct or TypeKind.Class })
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (6)
974return method.ContainingType.TypeKind != TypeKind.Struct; 978if (method.ContainingType.TypeKind == TypeKind.Struct) 1970TypeKind.Struct => symbol.IsRecord ? CSharpFeaturesResources.record_struct : CSharpFeaturesResources.struct_, 1971TypeKind.Class => symbol.IsRecord ? CSharpFeaturesResources.record_ : FeaturesResources.class_, 2549{ ContainingType.TypeKind: TypeKind.Interface } 2554IFieldSymbol { ContainingType.TypeKind: TypeKind.Enum }
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.ExpressionCodeGenerator.cs (1)
96if (returnType.TypeKind == TypeKind.Array && containingScope is InitializerExpressionSyntax)
ExtractMethod\CSharpMethodExtractor.PostProcessor.cs (2)
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\ConstructorInitializerSignatureHelpProvider.cs (2)
81if (within.TypeKind is not TypeKind.Struct and not TypeKind.Class)
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)
138if (operation?.Parent is IAssignmentOperation { Type.TypeKind: TypeKind.Dynamic }) 360if (!(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 (2)
274if (namedType.TypeKind is not (TypeKind.Class or TypeKind.Struct))
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (3)
68if (lockType.GetTypeMembers("Scope").FirstOrDefault() is not { TypeKind: TypeKind.Struct, IsRefLikeType: true, DeclaredAccessibility: Accessibility.Public }) 80if (namedType is not { TypeKind: TypeKind.Class or TypeKind.Struct })
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (5)
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 (2)
39return classType?.TypeKind is TypeKind.Class or TypeKind.Struct;
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateConversionService.cs (5)
57ISet<TypeKind> classInterfaceModuleStructTypes, 83ISet<TypeKind> classInterfaceModuleStructTypes, 109ISet<TypeKind> classInterfaceModuleStructTypes, 137ISet<TypeKind> classInterfaceModuleStructTypes, 168ISet<TypeKind> classInterfaceModuleStructTypes,
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.Features.UnitTests (9)
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (9)
234[InlineData("class [|c2|] { }", "class C2 { }", TypeKind.Class, Accessibility.Private)] 235[InlineData("struct [|c2|] { }", "struct C2 { }", TypeKind.Struct, Accessibility.Private)] 236[InlineData("interface [|c2|] { }", "interface C2 { }", TypeKind.Interface, Accessibility.Private)] 237[InlineData("delegate void [|c2|]();", "delegate void C2();", TypeKind.Delegate, Accessibility.Private)] 238[InlineData("enum [|c2|] { }", "enum C2 { }", TypeKind.Enum, Accessibility.Private)] 256var alternateSymbolKind = TypeKind.Class.Equals(symbolKind) ? TypeKind.Interface : TypeKind.Class;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (143)
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 (3)
1682Assert.Equal(TypeKind.Dynamic, ((BoundConversion)boundNode.Expression).Operand.Type.TypeKind); 1702Assert.Equal(TypeKind.Dynamic, info.ElementType.TypeKind); //NB: differs from explicit case 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 (16)
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); 5639Assert.Equal(TypeKind.TypeParameter, expectedType.TypeKind);
Semantics\LocalFunctionTests.cs (2)
1779Assert.Equal(TypeKind.Error, aTypeInfo.Type.TypeKind); 1854Assert.Equal(TypeKind.Error, aTypeInfo.Type.TypeKind);
Semantics\NativeIntegerTests.cs (6)
224Assert.Equal(TypeKind.Struct, type.TypeKind); 239Assert.Equal(TypeKind.Struct, type.TypeKind); 727Assert.Equal(TypeKind.Error, type.TypeKind); 735Assert.Equal(TypeKind.Error, type.TypeKind); 15419Assert.Equal(TypeKind.Interface, symbol.TypeKind); 15449Assert.Equal(TypeKind.TypeParameter, symbol.TypeKind);
Semantics\NullableReferenceTypesTests.cs (31)
3339Assert.Equal(TypeKind.Class, typeInfo.Type.TypeKind); 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\OverloadResolutionTests.cs (2)
976Assert.Equal(TypeKind.Error, type.TypeKind); 982Assert.Equal(TypeKind.Error, ((NamedTypeSymbol)type).TypeArguments()[0].TypeKind);
Semantics\QueryTests.cs (2)
3382Assert.NotEqual(TypeKind.Error, typeInfo2.Type.TypeKind); 3391Assert.NotEqual(TypeKind.Error, typeInfo1.Type.TypeKind);
Semantics\RecordStructTests.cs (2)
394Assert.Equal(TypeKind.Struct, point.TypeKind); 484Assert.Equal(TypeKind.Struct, point.TypeKind);
Semantics\ScriptSemanticsTests.cs (11)
251Assert.Equal(TypeKind.Error, summary.Type.TypeKind); 252Assert.Equal(TypeKind.Error, summary.ConvertedType.TypeKind); 454Assert.Equal(TypeKind.Class, members[0].TypeKind); 459Assert.Equal(TypeKind.Class, members[0].TypeKind); 463Assert.Equal(TypeKind.Interface, members[0].TypeKind); 467Assert.Equal(TypeKind.Struct, members[0].TypeKind); 471Assert.Equal(TypeKind.Enum, members[0].TypeKind); 475Assert.Equal(TypeKind.Delegate, members[0].TypeKind); 568Assert.Equal(TypeKind.Error, summary.Type.TypeKind); 569Assert.Equal(TypeKind.Error, summary.ConvertedType.TypeKind); 602Assert.NotEqual(TypeKind.Submission, type.TypeKind);
Semantics\UnsafeTests.cs (11)
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); 8859Assert.Equal(TypeKind.Pointer, pointerType.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 (778)
Compilation\GetSemanticInfoTests.cs (9)
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); 4683Assert.Equal(TypeKind.TypeParameter, paramType0.TypeKind); 4685Assert.Equal(TypeKind.Class, paramType1.TypeKind); 4728Assert.Equal(TypeKind.TypeParameter, paramType0.TypeKind); 4730Assert.Equal(TypeKind.Class, paramType1.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 (6)
1602.Single(method => method.Parameters.Single().Type.TypeKind == TypeKind.TypeParameter); 1735Single(method => method.Parameters.Single().Type.TypeKind == TypeKind.TypeParameter); 1739Assert.Equal(TypeKind.TypeParameter, actualSymbol.GetParameterTypes().Single().Type.TypeKind); 1761Single(method => method.Parameters.Single().Type.TypeKind == TypeKind.TypeParameter); 1765Assert.Equal(TypeKind.TypeParameter, actualSymbol.GetParameterTypes().Single().Type.TypeKind); 6540Assert.Equal(TypeKind.Error, ((INamedTypeSymbol)actualSymbol1).TypeArguments.Single().TypeKind);
Symbols\AccessorOverriddenOrHiddenMembersTests.cs (1)
1025Assert.Equal(TypeKind.Class, classDisposable.TypeKind);
Symbols\AssemblyAndNamespaceTests.cs (2)
382Assert.Equal(TypeKind.Class, objectType.TypeKind); 434Assert.Equal(TypeKind.Class, taskType.TypeKind);
Symbols\CompilationCreationTests.cs (13)
2460Assert.Equal(TypeKind.Class, type3.TypeKind); 2461Assert.Equal(TypeKind.Interface, asm5[1].GlobalNamespace.GetTypeMembers("I1").Single().TypeKind); 2592private bool HasSingleTypeOfKind(CSharpCompilation c, TypeKind kind, string fullName) 2619Assert.False(HasSingleTypeOfKind(c, TypeKind.Struct, "System.Int32")); 2621Assert.True(HasSingleTypeOfKind(c, TypeKind.Struct, "System.Int32")); 2622Assert.False(HasSingleTypeOfKind(c, TypeKind.Class, "System.Linq.Enumerable")); 2624Assert.True(HasSingleTypeOfKind(c, TypeKind.Class, "System.Linq.Enumerable")); 2625Assert.False(HasSingleTypeOfKind(c, TypeKind.Class, "System.Uri")); 2627Assert.False(HasSingleTypeOfKind(c, TypeKind.Class, "System.Linq.Enumerable")); 2628Assert.True(HasSingleTypeOfKind(c, TypeKind.Class, "System.Uri")); 2630Assert.False(HasSingleTypeOfKind(c, TypeKind.Class, "System.Uri")); 2631Assert.True(HasSingleTypeOfKind(c, TypeKind.Struct, "System.Int32")); 2633Assert.False(HasSingleTypeOfKind(c, TypeKind.Struct, "System.Int32"));
Symbols\CorLibrary\CorTypes.cs (11)
38Assert.Equal(TypeKind.Error, t.TypeKind); 47Assert.Equal(TypeKind.Error, p.Type.TypeKind); 72Assert.Equal(TypeKind.Error, t.TypeKind); 76Assert.NotEqual(TypeKind.Error, t.TypeKind); 89Assert.Equal(TypeKind.Error, t.TypeKind); 93Assert.NotEqual(TypeKind.Error, t.TypeKind); 151Assert.NotEqual(TypeKind.Error, t.TypeKind); 155Assert.Equal(TypeKind.Error, t.TypeKind); 168Assert.Equal(TypeKind.Error, t.TypeKind); 202Assert.Equal(TypeKind.Error, t.TypeKind); 214Assert.Equal(TypeKind.Error, t.TypeKind);
Symbols\ExtensionMethodTests.cs (1)
55Assert.Equal(TypeKind.TypeParameter, parameter.Type.TypeKind);
Symbols\GenericConstraintTests.cs (1)
4932if (t.TypeKind == TypeKind.TypeParameter)
Symbols\Metadata\MetadataTypeTests.cs (6)
89Assert.Equal(TypeKind.Class, class1.TypeKind); 139Assert.Equal(TypeKind.Class, type1.TypeKind); 187Assert.Equal(TypeKind.Interface, type1.TypeKind); 237Assert.Equal(TypeKind.Struct, type1.TypeKind); 307Assert.Equal(TypeKind.Array, type2.TypeKind); 308Assert.Equal(TypeKind.Array, type3.TypeKind);
Symbols\Metadata\PE\LoadCustomModifiers.cs (1)
167Assert.Equal(TypeKind.Array, propertyType.TypeKind);
Symbols\Metadata\PE\LoadingEvents.cs (13)
196Assert.Equal(TypeKind.Interface, @interface.TypeKind); 201Assert.Equal(TypeKind.Class, @class.TypeKind); 223Assert.Equal(TypeKind.Interface, @interface.TypeKind); 228Assert.Equal(TypeKind.Class, @class.TypeKind); 255Assert.Equal(TypeKind.Interface, @interface.TypeKind); 260Assert.Equal(TypeKind.Class, @class.TypeKind); 291Assert.Equal(TypeKind.Interface, defInterface.TypeKind); 296Assert.Equal(TypeKind.Interface, defInterface.TypeKind); 300Assert.Equal(TypeKind.Class, @class.TypeKind); 332Assert.Equal(TypeKind.Interface, outerInterface.TypeKind); 338Assert.Equal(TypeKind.Class, outerClass.TypeKind); 342Assert.Equal(TypeKind.Interface, innerInterface.TypeKind); 364Assert.Equal(TypeKind.Class, innerClass.TypeKind);
Symbols\Metadata\PE\LoadingGenericTypeParameters.cs (1)
75Assert.Equal(TypeKind.TypeParameter, varC1_T.TypeKind);
Symbols\Metadata\PE\LoadingMethods.cs (28)
377Assert.Equal(TypeKind.Struct, byrefReturnMethod.ReturnType.TypeKind); 389Assert.Equal(TypeKind.Interface, @interface.TypeKind); 394Assert.Equal(TypeKind.Class, @class.TypeKind); 413Assert.Equal(TypeKind.Interface, interface1.TypeKind); 418Assert.Equal(TypeKind.Interface, interface2.TypeKind); 423Assert.Equal(TypeKind.Class, @class.TypeKind); 449Assert.Equal(TypeKind.Interface, @interface.TypeKind); 455Assert.Equal(TypeKind.Class, @class.TypeKind); 485Assert.Equal(TypeKind.Interface, @interface.TypeKind); 491Assert.Equal(TypeKind.Class, @class.TypeKind); 517Assert.Equal(TypeKind.Interface, cyclicInterface.TypeKind); 520Assert.Equal(TypeKind.Interface, implementedInterface.TypeKind); 525Assert.Equal(TypeKind.Class, @class.TypeKind); 545Assert.Equal(TypeKind.Interface, cyclicInterface.TypeKind); 548Assert.Equal(TypeKind.Class, @class.TypeKind); 576Assert.Equal(TypeKind.Interface, defInterface.TypeKind); 581Assert.Equal(TypeKind.Interface, defInterface.TypeKind); 585Assert.Equal(TypeKind.Class, @class.TypeKind); 612Assert.Equal(TypeKind.Class, baseClass.TypeKind); 615Assert.Equal(TypeKind.Class, derivedClass.TypeKind); 637Assert.Equal(TypeKind.Interface, @interface.TypeKind); 640Assert.Equal(TypeKind.Class, @class.TypeKind); 670Assert.Equal(TypeKind.Interface, @interface.TypeKind); 673Assert.Equal(TypeKind.Class, @class.TypeKind); 704Assert.Equal(TypeKind.Interface, outerInterface.TypeKind); 710Assert.Equal(TypeKind.Class, outerClass.TypeKind); 714Assert.Equal(TypeKind.Interface, innerInterface.TypeKind); 736Assert.Equal(TypeKind.Class, innerClass.TypeKind);
Symbols\Metadata\PE\LoadingProperties.cs (15)
31Assert.Equal(TypeKind.Interface, @interface.TypeKind); 36Assert.Equal(TypeKind.Class, @class.TypeKind); 58Assert.Equal(TypeKind.Interface, @interface.TypeKind); 63Assert.Equal(TypeKind.Class, @class.TypeKind); 90Assert.Equal(TypeKind.Interface, @interface.TypeKind); 95Assert.Equal(TypeKind.Class, @class.TypeKind); 126Assert.Equal(TypeKind.Interface, defInterface.TypeKind); 131Assert.Equal(TypeKind.Interface, defInterface.TypeKind); 135Assert.Equal(TypeKind.Class, @class.TypeKind); 167Assert.Equal(TypeKind.Interface, outerInterface.TypeKind); 173Assert.Equal(TypeKind.Class, outerClass.TypeKind); 177Assert.Equal(TypeKind.Interface, innerInterface.TypeKind); 199Assert.Equal(TypeKind.Class, innerClass.TypeKind); 229Assert.Equal(TypeKind.Interface, @interface.TypeKind); 253Assert.Equal(TypeKind.Class, @class.TypeKind);
Symbols\Metadata\PE\NoPia.cs (4)
268Assert.Equal(TypeKind.Interface, param[0].Type.TypeKind); 269Assert.Equal(TypeKind.Interface, param[1].Type.TypeKind); 602Assert.Equal(TypeKind.Interface, param[0].Type.TypeKind); 603Assert.Equal(TypeKind.Interface, param[1].Type.TypeKind);
Symbols\Metadata\PE\NoPiaInstantiationOfGenericClassAndStruct.cs (2)
143if (m.ReturnType.TypeKind != TypeKind.Struct) 448if (m.ReturnType.TypeKind != TypeKind.Struct)
Symbols\Metadata\PE\TypeForwarders.cs (3)
106Assert.NotEqual(TypeKind.Error, funcType.TypeKind); 1498Assert.NotEqual(TypeKind.Error, type.TypeKind); 1767Assert.NotEqual(TypeKind.Error, type.TypeKind);
Symbols\Metadata\PE\TypeKindTests.cs (6)
40Assert.Equal(TypeKind.Class, obj.TypeKind); 46Assert.Equal(TypeKind.Class, @enum.TypeKind); 52Assert.Equal(TypeKind.Struct, int32.TypeKind); 58Assert.Equal(TypeKind.Delegate, func.TypeKind); 68Assert.Equal(TypeKind.Interface, ienumerable.TypeKind); 75Assert.Equal(TypeKind.Enum, typeCode.TypeKind);
Symbols\MissingSpecialMember.cs (11)
158Assert.Equal(TypeKind.Error, specialType.TypeKind); 163Assert.Equal(TypeKind.Class, lookupType.TypeKind); 236Assert.Equal(TypeKind.Struct, specialType.TypeKind); 240Assert.Equal(TypeKind.Struct, lookupType.TypeKind); 272Assert.Equal(TypeKind.Class, wellKnownType.TypeKind); 276Assert.Equal(TypeKind.Class, lookupType.TypeKind); 305Assert.Equal(TypeKind.Error, wellKnownType.TypeKind); 309Assert.Equal(TypeKind.Enum, lookupType.TypeKind); 382Assert.Equal(TypeKind.Class, wellKnownType.TypeKind); 385Assert.Equal(TypeKind.Class, lookupType.TypeKind); 499Assert.Equal(TypeKind.Class, wellKnown.TypeKind);
Symbols\MockNamedTypeSymbol.cs (5)
20private readonly TypeKind _typeKind; 145public override TypeKind TypeKind 152get { return _typeKind == TypeKind.Interface; } 173public MockNamedTypeSymbol(string name, IEnumerable<Symbol> children, TypeKind kind = TypeKind.Class)
Symbols\MockSymbolTests.cs (2)
69NamedTypeSymbol container = new MockNamedTypeSymbol("TestClass", Enumerable.Empty<Symbol>(), TypeKind.Class); 117result = new MockNamedTypeSymbol(name, childSymbols, TypeKind.Class);
Symbols\Retargeting\NoPia.cs (6)
571Assert.Equal(TypeKind.Interface, param[0].Type.TypeKind); 572Assert.Equal(TypeKind.Interface, param[1].Type.TypeKind); 872Assert.Equal(TypeKind.Interface, param[0].Type.TypeKind); 873Assert.Equal(TypeKind.Interface, param[1].Type.TypeKind); 1176Assert.Equal(TypeKind.Interface, param[0].Type.TypeKind); 1177Assert.Equal(TypeKind.Interface, param[1].Type.TypeKind);
Symbols\Retargeting\RetargetingTests.cs (18)
345Assert.Equal(TypeKind.Error, sourceType.BaseType().TypeKind); 347Assert.Equal(TypeKind.Error, sourceType.EnumUnderlyingType.TypeKind); 354Assert.Equal(TypeKind.Error, retargetingType.BaseType().TypeKind); 356Assert.Equal(TypeKind.Error, retargetingType.EnumUnderlyingType.TypeKind); 382Assert.Equal(TypeKind.Error, sourceType.BaseType().TypeKind); 384Assert.Equal(TypeKind.Error, sourceType.EnumUnderlyingType.TypeKind); 391Assert.Equal(TypeKind.Error, retargetingType.BaseType().TypeKind); 393Assert.Equal(TypeKind.Error, retargetingType.EnumUnderlyingType.TypeKind); 442Assert.Equal(TypeKind.Error, sourceType.BaseType().TypeKind); 448Assert.Equal(TypeKind.Error, retargetingType.BaseType().TypeKind); 523Assert.Equal(TypeKind.Error, sourceType.Interfaces().Single().TypeKind); 525Assert.Equal(TypeKind.Error, sourceType.BaseType().TypeKind); 530Assert.Equal(TypeKind.Error, retargetingType.Interfaces().Single().TypeKind); 532Assert.Equal(TypeKind.Error, retargetingType.BaseType().TypeKind); 581Assert.Equal(TypeKind.Error, sourceType.Interfaces().Single().TypeKind); 587Assert.Equal(TypeKind.Error, retargetingType.Interfaces().Single().TypeKind); 650Assert.Equal(TypeKind.Error, sourceTypeParameterConstraint.TypeKind); 657Assert.Equal(TypeKind.Error, retargetingTypeParameterConstraint.TypeKind);
Symbols\Source\BaseClassTests.cs (1)
1898Assert.Equal(TypeKind.Class, derived.TypeKind);
Symbols\Source\CustomModifierCopyTests.cs (4)
922Assert.Equal(TypeKind.Dynamic, classMethod.ParameterTypesWithAnnotations.Single().Type.TypeKind); 965Assert.Equal(TypeKind.Dynamic, interfaceMethod.ParameterTypesWithAnnotations.Single().Type.TypeKind); 1402Assert.Equal(TypeKind.Dynamic, interfaceMethod.ReturnType.TypeKind); 1443Assert.Equal(TypeKind.Dynamic, classMethod.ReturnType.TypeKind);
Symbols\Source\DelegateTests.cs (4)
110Assert.Equal(TypeKind.Delegate, fieldType.TypeKind); 130Assert.Equal(TypeKind.Delegate, v.TypeKind); 162Assert.Equal(TypeKind.Interface, beginInvoke.ReturnType.TypeKind); 208Assert.Equal(TypeKind.Delegate, d.TypeKind);
Symbols\Source\EnumTests.cs (1)
759Assert.Equal(TypeKind.Enum, member.Type.TypeKind);
Symbols\Source\FieldTests.cs (6)
65Assert.Equal(TypeKind.Class, sym.Type.TypeKind); 92Assert.Equal(TypeKind.Class, f.Type.TypeKind); 180Assert.Equal(TypeKind.Struct, sym.Type.TypeKind); 209Assert.Equal(TypeKind.Class, sym.Type.TypeKind); 214Assert.Equal(TypeKind.Interface, sym.Type.TypeKind); 219Assert.Equal(TypeKind.Struct, sym.Type.TypeKind);
Symbols\Source\MethodTests.cs (11)
367Assert.Equal(TypeKind.Class, refP.TypeKind); 375Assert.Equal(TypeKind.Struct, outP.TypeKind); 406Assert.Equal(TypeKind.Struct, m.ReturnType.TypeKind); 1667Assert.Equal(TypeKind.Interface, @interface.TypeKind); 1672Assert.Equal(TypeKind.Class, @class.TypeKind); 1711Assert.Equal(TypeKind.Interface, @interface.TypeKind); 1716Assert.Equal(TypeKind.Class, @class.TypeKind); 1756Assert.Equal(TypeKind.Interface, @interface.TypeKind); 1762Assert.Equal(TypeKind.Class, @class.TypeKind); 1807Assert.Equal(TypeKind.Interface, @interface.TypeKind); 1812Assert.Equal(TypeKind.Class, @class.TypeKind);
Symbols\Source\PropertyTests.cs (7)
1750Assert.Equal(TypeKind.Interface, @interface.TypeKind); 1755Assert.Equal(TypeKind.Class, @class.TypeKind); 1784Assert.Equal(TypeKind.Interface, @interface.TypeKind); 1789Assert.Equal(TypeKind.Class, @class.TypeKind); 1822Assert.Equal(TypeKind.Interface, @interface.TypeKind); 1827Assert.Equal(TypeKind.Class, @class.TypeKind); 1957Assert.Equal(TypeKind.Class, @class.TypeKind);
Symbols\SymbolDistinguisherTests.cs (2)
318Assert.NotEqual(TypeKind.Error, validType.TypeKind); 319Assert.Equal(TypeKind.Error, errorType.TypeKind);
Symbols\SymbolErrorTests.cs (15)
1578Assert.Equal(TypeKind.Struct, (n as FieldSymbol).Type.TypeKind); 1689Assert.Equal(TypeKind.Error, classCInterface.TypeKind); 1694Assert.Equal(TypeKind.Error, structSField.Type.TypeKind); 2338Assert.Equal(TypeKind.Error, baseType.TypeKind); 2344Assert.Equal(TypeKind.Error, mem1.Type.TypeKind); 2350Assert.Equal(TypeKind.Error, param.Type.TypeKind); 2589Assert.Equal(TypeKind.Error, baseType.TypeKind); 2594Assert.Equal(TypeKind.Error, baseType.TypeKind); 2599Assert.Equal(TypeKind.Error, baseType.TypeKind); 3376Assert.Equal(TypeKind.Error, ptype.Type.TypeKind); 3382Assert.Equal(TypeKind.Error, base1.TypeKind); 3387Assert.Equal(TypeKind.Error, mem2.Type.TypeKind); 3390Assert.Equal(TypeKind.Error, mem3.ReturnType.TypeKind); 3662Assert.Equal(TypeKind.Error, base1.TypeKind); 19376Assert.Equal(TypeKind.Class, Base.TypeKind);
Symbols\TypeTests.cs (20)
282Assert.Equal(TypeKind.Struct, type3.TypeKind); 289Assert.Equal(TypeKind.Interface, type4.TypeKind); 300Assert.Equal(TypeKind.Interface, type3.TypeKind); 308Assert.Equal(TypeKind.Class, type4.TypeKind); 474Assert.Equal(TypeKind.Array, elemType1.Type.TypeKind); 488Assert.Equal(TypeKind.Array, elemType2.TypeKind); 498Assert.Equal(TypeKind.Array, retType.TypeKind); 519Assert.Equal(TypeKind.Array, p3.Type.TypeKind); 856Assert.Equal(TypeKind.Interface, igoo.TypeKind); 869Assert.Equal(TypeKind.Class, classA.TypeKind); 881Assert.Equal(TypeKind.Struct, structS.TypeKind); 908Assert.Equal(TypeKind.Class, varA.Type.TypeKind); 1311Assert.Equal(TypeKind.Class, baseType.TypeKind); 1312Assert.Equal(TypeKind.Interface, interface1.TypeKind); 1313Assert.Equal(TypeKind.Interface, interface2.TypeKind); 1331Assert.Equal(TypeKind.Error, derived.BaseType().TypeKind); 1335Assert.Equal(TypeKind.Error, i.TypeKind); 1368Assert.Equal(TypeKind.Error, typeSymbol.TypeKind); 1708Assert.Equal(TypeKind.Enum, memType.GetNullableUnderlyingType().TypeKind); 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 (24)
Extensions.cs (8)
473if ((typeSym.TypeKind == TypeKind.Interface || typeSym.TypeKind == TypeKind.Class || typeSym.TypeKind == TypeKind.Struct || typeSym.TypeKind == TypeKind.Delegate)) 515else if (typeSym.TypeKind == TypeKind.Array) 713return type.TypeKind == TypeKind.Dynamic; 718return type.TypeKind == TypeKind.Delegate; 835return type.TypeKind == TypeKind.Enum ? ((INamedTypeSymbol)type).EnumUnderlyingType : type;
FunctionPointerUtilities.cs (1)
29Assert.Equal(TypeKind.FunctionPointer, symbol.TypeKind);
UsesIsNullableVisitor.cs (15)
170case TypeKind.Class: 171case TypeKind.Delegate: 172case TypeKind.Interface: 173case TypeKind.Struct: 174case TypeKind.Enum: 183case TypeKind.Array: 185case TypeKind.Class: 186case TypeKind.Delegate: 187case TypeKind.Error: 188case TypeKind.Interface: 189case TypeKind.Struct: 191case TypeKind.Dynamic: 192case TypeKind.Enum: 194case TypeKind.Pointer: 196case TypeKind.TypeParameter:
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (1)
Metadata\WinMdEventTests.cs (1)
3347Assert.Equal(TypeKind.Error, fieldType.TypeKind);
Microsoft.CodeAnalysis.CSharp.Workspaces (41)
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 (2)
42if (typeSymbol.TypeKind is TypeKind.Class or TypeKind.Struct)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (2)
212if (containingType != null && containingType.TypeKind == TypeKind.Interface) 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) 541originalConvertedType.IsReferenceType && rewrittenConvertedType.TypeKind == TypeKind.Dynamic) 929if (!original.IsReferenceType || original.TypeKind == TypeKind.Interface) 1253if (originalMemberSymbol.ContainingType.TypeKind == TypeKind.Interface) 1293rewrittenType.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 (4)
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 (3)
439if (type.TypeKind == TypeKind.Delegate) 1017if (parentTypes.Any(static parentType => parentType.InferredType.SpecialType == SpecialType.System_String || parentType.InferredType.TypeKind == TypeKind.Delegate)) 1019return parentTypes.Where(parentType => parentType.InferredType.SpecialType == SpecialType.System_String || parentType.InferredType.TypeKind == TypeKind.Delegate);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (4)
Diagnostics\GenerateType\TestGenerateTypeOptionsService.cs (4)
22public TypeKind TypeKind = TypeKind.Class; 74TypeKind typeKind = TypeKind.Class,
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (20)
CodeGeneration\AbstractCodeGenerationTests.cs (1)
125attributes: default, accessibility: default, modifiers: default, TypeKind.Class, name);
CodeGeneration\CodeGenerationTests.cs (2)
506TypeKind typeKind = TypeKind.Class,
CodeGeneration\CodeGenerationTests.CSharp.cs (9)
261[InlineData("struct", TypeKind.Struct)] 262[InlineData("interface", TypeKind.Interface)] 263[InlineData("enum", TypeKind.Enum)] 264public async Task AddFileType(string kindString, TypeKind typeKind) 321typeKind: TypeKind.Struct); 338typeKind: TypeKind.Struct); 353typeKind: TypeKind.Interface); 367typeKind: TypeKind.Enum); 383typeKind: TypeKind.Enum,
CodeGeneration\CodeGenerationTests.VisualBasic.cs (5)
236typeKind: TypeKind.Struct); 251typeKind: TypeKind.Struct); 264typeKind: TypeKind.Interface); 277typeKind: TypeKind.Enum, 292typeKind: TypeKind.Enum,
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.ExpressionEvaluator.ExpressionCompiler (1)
PDB\PdbHelpers.cs (1)
82if (type.TypeKind == TypeKind.Enum)
Microsoft.CodeAnalysis.Features (132)
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.State.cs (1)
54ContainingType.TypeKind == TypeKind.Interface ||
AddDebuggerDisplay\AbstractAddDebuggerDisplayCodeRefactoringProvider.cs (2)
106=> typeSymbol.TypeKind is TypeKind.Class or TypeKind.Struct;
Completion\Providers\AbstractObjectCreationCompletionProvider.cs (3)
85if (type.TypeKind is TypeKind.Interface or TypeKind.Pointer or TypeKind.Dynamic ||
Completion\Providers\AbstractPartialMethodCompletionProvider.cs (2)
90if (enclosingSymbol.TypeKind is not (TypeKind.Struct or TypeKind.Class))
Completion\Providers\AbstractRecommendationServiceBasedCompletionProvider.cs (1)
91if (namedType.TypeKind == TypeKind.Interface)
Completion\Providers\ImportCompletionProvider\AbstractTypeImportCompletionProvider.cs (1)
80TypeKind: not TypeKind.Error
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (1)
317isRecord, TypeKind.Class, className, capturedTypeParameters, members: members);
ConvertCast\AbstractConvertCastCodeRefactoringProvider.cs (1)
52if (type is { TypeKind: TypeKind.Error })
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (1)
279if (collectionType.TypeKind == TypeKind.Interface && knownCollectionInterfaces.Contains(collectionType.OriginalDefinition))
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (1)
918TypeKind.Struct, structName, typeParameters, members: members, containingAssembly: containingAssembly);
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (7)
303return (symbol is IParameterSymbol { ContainingType: not { TypeKind: TypeKind.Delegate } }) 342TypeKind.Class => FeaturesResources.class_, 343TypeKind.Interface => FeaturesResources.interface_, 344TypeKind.Delegate => FeaturesResources.delegate_, 345TypeKind.Enum => FeaturesResources.enum_, 346TypeKind.TypeParameter => FeaturesResources.type_parameter, 351=> symbol.IsConst ? ((symbol.ContainingType.TypeKind == TypeKind.Enum) ? FeaturesResources.enum_value : FeaturesResources.const_field) :
ExtractClass\ExtractClassWithDialogCodeAction.cs (1)
83TypeKind.Class,
ExtractInterface\AbstractExtractInterfaceService.cs (3)
145typeKind: TypeKind.Interface, 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 (2)
271if (type.TypeKind is TypeKind.Error or TypeKind.Unknown)
FindUsages\AbstractFindUsagesService_FindImplementations.cs (1)
194else if (symbol is INamedTypeSymbol { TypeKind: TypeKind.Class } namedType)
GenerateConstructorFromMembers\AbstractGenerateConstructorFromMembersCodeRefactoringProvider.State.cs (1)
68if (ContainingType == null || ContainingType.TypeKind == TypeKind.Interface)
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider.cs (4)
88if (containingType?.TypeKind is not TypeKind.Class and not TypeKind.Struct) 178if (info.ContainingType != null && info.ContainingType.TypeKind != TypeKind.Interface) 299if (generateEquals && containingType.TypeKind == TypeKind.Struct)
GenerateType\AbstractGenerateTypeService.GenerateNamedType.cs (9)
43if (options.TypeKind == TypeKind.Delegate) 139if (_state.BaseTypeOrInterfaceOpt.TypeKind == TypeKind.Interface || argumentList.Count == 0) 219if (!(parameters.Count == 0 && options is { TypeKind: TypeKind.Struct })) 277if (_state.BaseTypeOrInterfaceOpt == null || _state.BaseTypeOrInterfaceOpt.TypeKind == TypeKind.Interface) 287if (_state.BaseTypeOrInterfaceOpt != null && _state.BaseTypeOrInterfaceOpt.TypeKind == TypeKind.Interface) 311private TypeKind DetermineTypeKind() 314? TypeKind.Struct 316? TypeKind.Interface 317: TypeKind.Class;
GenerateType\AbstractGenerateTypeService.State.cs (5)
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 294not TypeKind.Module)
GenerateType\GenerateTypeOptionsResult.cs (2)
22public TypeKind TypeKind { get; } 30TypeKind typeKind,
GoToBase\FindBaseHelpers.cs (3)
20TypeKind: TypeKind.Class or TypeKind.Interface or TypeKind.Struct,
InheritanceMargin\AbstractInheritanceMarginService.cs (3)
72return !symbol.IsStatic && namedType.TypeKind is TypeKind.Interface or TypeKind.Class or TypeKind.Struct;
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (3)
315if (memberSymbol.TypeKind == TypeKind.Interface) 328Debug.Assert(memberSymbol.TypeKind is TypeKind.Class or TypeKind.Struct);
InitializeParameter\AbstractInitializeParameterCodeRefactoringProvider.cs (1)
89methodSymbol.ContainingType.TypeKind == TypeKind.Interface)
IntroduceVariable\AbstractIntroduceVariableService.State.cs (1)
97if (containingType == null || containingType.TypeKind == TypeKind.Interface)
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (2)
465if (symbol.TypeKind == TypeKind.Delegate) 544if (symbol.ContainingType != null && symbol.ContainingType.TypeKind == TypeKind.Enum)
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
68public TypeKind TypeKind => _symbol.TypeKind;
MoveStaticMembers\MoveStaticMembersWithDialogCodeAction.cs (1)
143private static TypeKind GetNewTypeKind(INamedTypeSymbol oldType)
PullMemberUp\MemberAndDestinationValidator.cs (2)
16if (destination.TypeKind is not TypeKind.Interface and not TypeKind.Class)
PullMemberUp\MembersPuller.cs (5)
65TypeKind.Interface => PullMembersIntoInterfaceAsync(document, pullMembersUpOptions, cancellationToken), 67TypeKind.Class or TypeKind.Module => PullMembersIntoClassAsync(document, pullMembersUpOptions, cancellationToken), 126if (analysisResult.Member.ContainingType.TypeKind == TypeKind.Interface) 491return destination.TypeKind == TypeKind.Interface
PullMemberUp\PullMembersUpOptionsBuilder.cs (1)
20if (destination.TypeKind == TypeKind.Interface)
ReplacePropertyWithMethods\ReplacePropertyWithMethodsCodeRefactoringProvider.cs (1)
382if (property.ContainingType.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 (8)
40if (containingType != null && containingType.TypeKind == TypeKind.Enum) 60case TypeKind.Class: 64case TypeKind.Delegate: 68case TypeKind.Enum: 72case TypeKind.Interface: 76case TypeKind.Module: 80case TypeKind.Struct: 84case TypeKind.Error:
Snippets\SnippetFunctionService.cs (1)
59if (typeSymbol?.TypeKind != TypeKind.Enum)
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 (3)
184if (namedType.TypeKind is not TypeKind.Class and not TypeKind.Struct and not TypeKind.Module)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (4)
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 (11)
23protected static readonly ISet<TypeKind> EnumType = new HashSet<TypeKind> { TypeKind.Enum }; 24protected static readonly ISet<TypeKind> ClassInterfaceModuleStructTypes = new HashSet<TypeKind> 26TypeKind.Class, 27TypeKind.Module, 28TypeKind.Struct, 29TypeKind.Interface 35ISet<TypeKind> typeKinds) 46if (typeToGenerateIn.TypeKind == TypeKind.Interface && isStatic)
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateConversionService.cs (2)
26protected abstract bool TryInitializeImplicitConversionState(SemanticDocument document, SyntaxNode expression, ISet<TypeKind> classInterfaceModuleStructTypes, CancellationToken cancellationToken, out SyntaxToken identifierToken, out IMethodSymbol methodSymbol, out INamedTypeSymbol typeToGenerateIn); 27protected abstract bool TryInitializeExplicitConversionState(SemanticDocument document, SyntaxNode expression, ISet<TypeKind> classInterfaceModuleStructTypes, CancellationToken cancellationToken, out SyntaxToken identifierToken, out IMethodSymbol methodSymbol, out INamedTypeSymbol typeToGenerateIn);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.AbstractInvocationInfo.cs (2)
61var classTypes = constraints.Where(ts => ts.TypeKind == TypeKind.Class).ToList(); 62var nonClassTypes = constraints.Where(ts => ts.TypeKind != TypeKind.Class).ToList();
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\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.SignatureInfo.cs (2)
202return isAbstract || State.TypeToGenerateIn.TypeKind == TypeKind.Interface || throwStatement == null 234if (State.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 (13)
Compilation\CompilationDifference.cs (1)
159$"{(displayTypeKind && container is INamedTypeSymbolInternal type ? (type.TypeKind == TypeKind.Struct ? "struct " : "class ") : "")}{container}: " +
Diagnostics\CouldHaveMoreSpecificTypeAnalyzer.cs (11)
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; 265if ((targetTypeKind == sourceTypeKind && (targetTypeKind == TypeKind.Class || targetTypeKind == TypeKind.Interface)) || 266(targetTypeKind == TypeKind.Class && (sourceTypeKind == TypeKind.Structure || sourceTypeKind == TypeKind.Interface) && targetType.SpecialType == SpecialType.System_Object))
Diagnostics\EmptyArrayAnalyzer.cs (1)
76&& elementType?.TypeKind != TypeKind.Pointer)
Microsoft.CodeAnalysis.VisualBasic (653)
Analysis\FlowAnalysis\DataFlowPass.vb (2)
457If receiverOpt.Type Is Nothing OrElse receiverOpt.Type.TypeKind <> TypeKind.Structure Then 1279ElseIf type.TypeKind = TypeKind.TypeParameter Then
Analysis\FlowAnalysis\RegionReachableWalker.vb (1)
9Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Analysis\IteratorAndAsyncAnalysis\IteratorAndAsyncCaptureWalker.vb (1)
11Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Binding\BackstopBinder.vb (1)
16Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Binding\BasesBeingResolvedBinder.vb (1)
14Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Binding\Binder.vb (2)
17Imports TypeKind = Microsoft.CodeAnalysis.TypeKind 456If type.TypeKind = TypeKind.Error AndAlso TypeOf type Is MissingMetadataTypeSymbol.TopLevel Then
Binding\Binder_AnonymousTypes.vb (1)
13Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Binding\Binder_Attributes.vb (1)
15Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Binding\Binder_ConditionalAccess.vb (1)
11Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Binding\Binder_Conversions.vb (7)
12Imports TypeKind = Microsoft.CodeAnalysis.TypeKind 790Case TypeKind.Delegate 797Case TypeKind.Interface 1231If targetType.TypeKind <> TypeKind.Delegate AndAlso targetType.TypeKind <> TypeKind.Error Then 1383If(targetDelegateType.TypeKind = TypeKind.Delegate AndAlso targetDelegateType.IsFromCompilation(Me.Compilation), 1435If(targetDelegateType.TypeKind = TypeKind.Delegate AndAlso targetDelegateType.IsFromCompilation(Me.Compilation),
Binding\Binder_Delegates.vb (3)
10Imports TypeKind = Microsoft.CodeAnalysis.TypeKind 234ElseIf targetType.TypeKind <> TypeKind.Delegate Then 236If targetType.TypeKind <> TypeKind.Error Then
Binding\Binder_Diagnostics.vb (1)
8Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Binding\Binder_Expressions.vb (22)
1070type.TypeKind <> TYPEKIND.Class Then 1210Case TYPEKIND.Class 1213Case TYPEKIND.Interface 1216Case TYPEKIND.Enum 1219Case TYPEKIND.Structure 2605If currentType.TypeKind = TYPEKIND.Submission AndAlso Not currentMember.IsShared Then 2606If memberDeclaringType.TypeKind = TYPEKIND.Submission Then 2740If CaseInsensitiveComparison.Equals(leftType.Name, leftName) AndAlso leftType.TypeKind <> TYPEKIND.TypeParameter Then 2819Dim leftTypeKind As TYPEKIND = leftTypeSymbol.TypeKind 2821If leftTypeKind = TYPEKIND.Class OrElse leftTypeKind = TYPEKIND.Structure OrElse leftTypeKind = TYPEKIND.Module Then 2904If type.TypeKind = TYPEKIND.TypeParameter Then 3800Case TYPEKIND.Array, TYPEKIND.Enum 3802Case TYPEKIND.Class 3808Case TYPEKIND.TypeParameter, TYPEKIND.Interface 3810Case TYPEKIND.Structure 3837Case TYPEKIND.Class 3840Case TYPEKIND.Structure 3843Case TYPEKIND.Error
Binding\Binder_Invocation.vb (1)
288ElseIf targetType.Kind = SymbolKind.NamedType AndAlso targetType.TypeKind = TypeKind.Delegate Then
Binding\Binder_Latebound.vb (1)
12Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Binding\Binder_Lookup.vb (35)
16Imports TypeKind = Microsoft.CodeAnalysis.TypeKind 580Case TypeKind.Class, TypeKind.Module, TypeKind.Structure, TypeKind.Delegate, TypeKind.Array, TypeKind.Enum 583Case TypeKind.Submission 586Case TypeKind.Interface 589Case TypeKind.TypeParameter 592Case TypeKind.Error 606Case TypeKind.Class, TypeKind.Structure, TypeKind.Delegate, TypeKind.Array, TypeKind.Enum 609Case TypeKind.Module 612Case TypeKind.Submission 615Case TypeKind.Interface 618Case TypeKind.TypeParameter 621Case TypeKind.Error 931Case TypeKind.Class, TypeKind.Module, TypeKind.Structure 936Case TypeKind.Interface 941Case TypeKind.TypeParameter 1092Case TypeKind.Class, TypeKind.Module, TypeKind.Structure 1104Case TypeKind.Interface 1116Case TypeKind.TypeParameter 1697Case TypeKind.Interface 1710Case TypeKind.TypeParameter 1964(container.TypeKind = TypeKind.Class OrElse container.TypeKind = TypeKind.Structure) AndAlso
Binding\Binder_ObjectInitializer.vb (18)
80Case TypeKind.Delegate 84Case TypeKind.Structure 211Case TypeKind.Class 220Case TypeKind.Interface 226Case TypeKind.Error, 227TypeKind.Interface 233Case TypeKind.Array 239Case TypeKind.Class, 240TypeKind.Delegate, 241TypeKind.Enum, 242TypeKind.Module, 243TypeKind.Structure 297Case TypeKind.Error 304Case TypeKind.TypeParameter 325Case TypeKind.Enum, TypeKind.Structure 328Case TypeKind.Module 335Case TypeKind.Array
Binding\Binder_SelectCase.vb (1)
12Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Binding\Binder_Statements.vb (1)
1001If Me.ContainingType IsNot Nothing AndAlso Me.ContainingType.TypeKind = TYPEKIND.Structure Then
Binding\Binder_Utils.vb (6)
1161Case TypeKind.Module 1180Case TypeKind.Interface 1189Case TypeKind.Structure 1241Case TypeKind.Module 1253Case TypeKind.Interface 1262Case TypeKind.Structure
Binding\Binder_WithBlock.vb (1)
11Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Binding\BinderFactory.vb (1)
395containingType.TypeKind = TypeKind.Delegate Then
Binding\Binders\AliasAndImportsClause.vb (1)
14Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Binding\DocumentationCommentBinder.vb (1)
44If commentedNamedType IsNot Nothing AndAlso commentedNamedType.TypeKind <> TypeKind.Delegate Then
Binding\DocumentationCommentParamBinder.vb (1)
30If namedType.TypeKind = TypeKind.Delegate Then
Binding\EarlyWellKnownAttributeBinder.vb (1)
14Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Binding\ExecutableCodeBinder.vb (1)
16Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Binding\GetTypeBinder.vb (1)
10Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Binding\IgnoreBaseClassesBinder.vb (1)
14Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Binding\ImportAliasesBinder.vb (1)
16Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Binding\ImportedTypesAndNamespacesMembersBinder.vb (1)
16Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Binding\LocationSpecificBinder.vb (1)
15Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Binding\LookupResult.vb (1)
740If symbol1.Kind <> SymbolKind.Field OrElse symbol2.Kind <> SymbolKind.Field OrElse symbol1.ContainingType.TypeKind <> TypeKind.Enum Then
Binding\MemberSemanticModel.vb (1)
14Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Binding\MethodBodyBinder.vb (1)
14Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Binding\MethodTypeParametersBinder.vb (1)
15Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Binding\NamedTypeBinder.vb (1)
16Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Binding\NamespaceBinder.vb (1)
16Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Binding\OptionStrictOffBinder.vb (1)
9Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Binding\ProjectImportsBinder.vb (1)
14Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Binding\SourceFileBinder.vb (1)
14Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Binding\SourceModuleBinder.vb (1)
15Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Binding\SpeculativeStatementBinder.vb (1)
14Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Binding\TypesOfImportedNamespacesMembersBinder.vb (1)
16Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
BoundTree\BoundNewT.vb (1)
16Debug.Assert(Type.TypeKind = TypeKind.TypeParameter)
CodeGen\EmitAddress.vb (1)
471If receiverType.TypeKind = TypeKind.TypeParameter Then
CodeGen\EmitExpression.vb (5)
296(receiverType.IsReferenceType AndAlso receiverType.TypeKind = TypeKind.TypeParameter) OrElse 498Debug.Assert(thisType.TypeKind <> TypeKind.TypeParameter) 620If elementType.TypeKind = TypeKind.TypeParameter Then 1713If ((type IsNot Nothing) AndAlso (type.TypeKind = TypeKind.TypeParameter) AndAlso constantValue.IsNull) Then 1833Return AllowedToTakeRef(left, AddressKind.Writeable) AndAlso Not (left.Kind = BoundKind.ArrayAccess AndAlso left.Type.TypeKind = TypeKind.TypeParameter)
CodeGen\EmitStatement.vb (2)
367Debug.Assert(receiver.Type.TypeKind <> TypeKind.TypeParameter) 914If (operandType IsNot Nothing) AndAlso (operandType.TypeKind = TypeKind.TypeParameter) Then
CodeGen\Optimizer\Optimizer.vb (1)
9Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
CodeGen\Optimizer\StackScheduler.Analyzer.vb (1)
11Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
CodeGen\Optimizer\StackScheduler.Rewriter.vb (1)
11Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
CodeGen\Optimizer\StackScheduler.vb (1)
10Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
CommandLine\VisualBasicCommandLineArguments.vb (1)
17Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Compilation\ClsComplianceChecker.vb (26)
186If symbol.TypeKind = TypeKind.Delegate Then 340ElseIf symbol.TypeKind = TypeKind.Enum Then 439If type.TypeKind = TypeKind.Delegate AndAlso type.IsImplicitlyDeclared AndAlso TryCast(type, NamedTypeSymbol)?.AssociatedSymbol Is symbol Then 591Case TypeKind.Array 593Case TypeKind.Error, TypeKind.TypeParameter 595Case TypeKind.Class, TypeKind.Structure, TypeKind.Interface, TypeKind.Delegate, TypeKind.Enum, TypeKind.Submission, TypeKind.Module 617Case TypeKind.Array 619Case TypeKind.Error, TypeKind.TypeParameter 621Case TypeKind.Class, TypeKind.Structure, TypeKind.Interface, TypeKind.Delegate, TypeKind.Enum, TypeKind.Submission, TypeKind.Module 636If type.TypeKind = TypeKind.Error Then 892Dim typeKind As TypeKind = xType.TypeKind 897If typeKind = TypeKind.Array Then
Compilation\DocumentationComments\DocumentationCommentCompiler.Common.vb (7)
737Case TypeKind.Class 739Case TypeKind.Delegate 741Case TypeKind.Enum 743Case TypeKind.Interface 745Case TypeKind.Module 747Case TypeKind.Structure 768If namedType.TypeKind <> TypeKind.Delegate Then
Compilation\DocumentationComments\DocumentationCommentCompiler.Includes.vb (5)
123If namedType.TypeKind = TYPEKIND.Delegate Then 131Me.ParamAndParamRefSupported = namedType.TypeKind = TYPEKIND.Delegate 132Me.TypeParamSupported = namedType.TypeKind <> TYPEKIND.Enum AndAlso namedType.TypeKind <> TYPEKIND.Module 133Me.TypeParamRefSupported = namedType.TypeKind <> TYPEKIND.Module
Compilation\DocumentationComments\DocumentationCommentCompiler.NamedType.vb (5)
107If namedType.TypeKind = TypeKind.Delegate Then 116If namedType.TypeKind = TypeKind.Delegate Then 127If namedType.TypeKind = TypeKind.Enum Then 132ElseIf namedType.TypeKind = TypeKind.Enum OrElse namedType.TypeKind = TypeKind.Module Then
Compilation\MethodCompiler.vb (1)
862If sourceTypeSymbol.TypeKind = TypeKind.Class AndAlso sourceTypeSymbol.GetAttributes().IndexOfAttribute(AttributeDescription.DesignerGeneratedAttribute) > -1 Then
Compilation\SemanticModel.vb (1)
972If highestExpr.Type IsNot Nothing AndAlso highestExpr.Type.TypeKind <> TypeKind.Error Then
Compilation\SyntaxTreeSemanticModel.vb (2)
17Imports TypeKind = Microsoft.CodeAnalysis.TypeKind 1080Debug.Assert(typeSymbol.TypeKind = TYPEKIND.Delegate)
Compilation\VisualBasicCompilation.vb (3)
1543If mainType Is Nothing OrElse (mainType.TypeKind <> TYPEKIND.Class AndAlso mainType.TypeKind <> TYPEKIND.Structure AndAlso mainType.TypeKind <> TYPEKIND.Module) Then
Emit\EditAndContinue\PEDeltaAssemblyBuilder.vb (1)
184If propertyType.TypeKind = TypeKind.TypeParameter Then
Emit\NamedTypeReference.vb (1)
48Return m_UnderlyingNamedType.TypeKind = TypeKind.Enum
Emit\NamedTypeSymbolAdapter.vb (8)
42Return AdaptedNamedTypeSymbol.TypeKind = TypeKind.Enum 236If AdaptedNamedTypeSymbol.TypeKind = TypeKind.Submission Then 455Case TypeKind.Enum, TypeKind.Interface, TypeKind.Delegate 966Case TypeKind.Module, TypeKind.Enum, TypeKind.Structure
Emit\NoPia\EmbeddedType.vb (3)
129Case TypeKind.Enum, TypeKind.Delegate, TypeKind.Interface
Emit\NoPia\EmbeddedTypesManager.vb (16)
222Case TypeKind.Interface 237Case TypeKind.Structure, 238TypeKind.Enum, 239TypeKind.Delegate 257Debug.Assert(type.TypeKind = TypeKind.Class OrElse type.TypeKind = TypeKind.Module) 332Debug.Assert(namedType.TypeKind = TypeKind.Structure OrElse 333namedType.TypeKind = TypeKind.Enum OrElse 334namedType.TypeKind = TypeKind.Delegate) 337If namedType.TypeKind = TypeKind.Structure OrElse namedType.TypeKind = TypeKind.Enum Then 383If containerKind = TypeKind.Interface OrElse 384containerKind = TypeKind.Delegate OrElse 385(containerKind = TypeKind.Structure AndAlso (field.AdaptedFieldSymbol.IsShared OrElse field.AdaptedFieldSymbol.DeclaredAccessibility <> Accessibility.Public)) Then 417Case TypeKind.Structure, TypeKind.Enum
Lowering\AsyncRewriter\AsyncRewriter.AsyncMethodToClassRewriter.Expressions.vb (1)
17Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\AsyncRewriter\AsyncRewriter.AsyncMethodToClassRewriter.Spilling.vb (1)
514If type.TypeKind <> TypeKind.Structure Then
Lowering\AsyncRewriter\AsyncRewriter.vb (5)
91Dim kind = If(compilationState.Compilation.Options.EnableEditAndContinue, TypeKind.Class, TypeKind.Struct) 141If frameType.TypeKind = TypeKind.Class Then 185If Me.F.CurrentType.TypeKind = TypeKind.Class Then 200If StateMachineType.TypeKind = TypeKind.Class Then
Lowering\AsyncRewriter\AsyncStateMachine.vb (4)
14Private ReadOnly _typeKind As TypeKind 17Protected Friend Sub New(slotAllocatorOpt As VariableSlotAllocator, compilationState As TypeCompilationState, asyncMethod As MethodSymbol, asyncMethodOrdinal As Integer, typeKind As TypeKind) 22asyncMethod.ContainingAssembly.GetSpecialType(If(typeKind = TypeKind.Struct, SpecialType.System_ValueType, SpecialType.System_Object)), 30Public Overrides ReadOnly Property TypeKind As TypeKind
Lowering\Diagnostics\DiagnosticsPass.vb (1)
15Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter.vb (2)
17Imports TypeKind = Microsoft.CodeAnalysis.TypeKind 461Debug.Assert(delegateType.TypeKind = TYPEKIND.Delegate)
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_ConditionalExpresion.vb (1)
16Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_Conversion.vb (1)
15Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_UnaryOperator.vb (1)
16Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\IteratorRewriter\IteratorStateMachine.vb (2)
62Public Overrides ReadOnly Property TypeKind As TypeKind 64Return TypeKind.Class
Lowering\LambdaRewriter\LambdaCapturedVariable.vb (1)
14Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LambdaRewriter\LambdaFrame.vb (2)
213Public Overrides ReadOnly Property TypeKind As TypeKind 215Return TypeKind.Class
Lowering\LambdaRewriter\LambdaFrameCopyConstructor.vb (1)
12Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_AnonymousTypeCreationExpression.vb (1)
12Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_AsNewLocalDeclarations.vb (1)
11Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_AssignmentOperator.vb (1)
12Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_Block.vb (1)
11Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_Call.vb (1)
12Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_ConditionalAccess.vb (2)
11Imports TypeKind = Microsoft.CodeAnalysis.TypeKind 107(receiverType.IsReferenceType AndAlso receiverType.TypeKind = TypeKind.TypeParameter) OrElse
Lowering\LocalRewriter\LocalRewriter_Constant.vb (1)
11Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_Continue.vb (1)
10Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_DimStatement.vb (1)
11Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_DoLoop.vb (1)
11Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_Exit.vb (1)
10Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_ExpressionStatement.vb (1)
10Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_FieldAccess.vb (1)
11Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_FieldOrPropertyInitializer.vb (1)
12Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_ForEach.vb (1)
12Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_ForTo.vb (1)
12Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_Goto.vb (1)
10Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_Label.vb (1)
12Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_Lambda.vb (1)
10Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_LateAddressOf.vb (1)
11Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_LateInvocation.vb (1)
12Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_LateMemberAccess.vb (1)
10Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_OmittedArgument.vb (1)
10Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_PreviousSubmissionReference.vb (1)
15Debug.Assert(targetType.TypeKind = TypeKind.Submission)
Lowering\LocalRewriter\LocalRewriter_Query.vb (1)
11Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_Redim.vb (1)
10Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_RedimClause.vb (1)
12Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_Return.vb (1)
11Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_SelectCase.vb (1)
14Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_StringConcat.vb (1)
12Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_SyncLock.vb (1)
12Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_Throw.vb (1)
11Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_Try.vb (1)
11Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_UnaryOperators.vb (1)
12Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_UnstructuredExceptionHandling.vb (1)
12Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_Using.vb (1)
12Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_While.vb (1)
11Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\LocalRewriter\LocalRewriter_With.vb (1)
12Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\StateMachineRewriter\SynthesizedContainer.vb (1)
110Public MustOverride Overrides ReadOnly Property TypeKind As TypeKind
Lowering\UseTwiceRewriter.vb (1)
13Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Lowering\WithExpressionRewriter.vb (1)
12Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
OptionsValidator.vb (1)
11Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Semantics\AccessCheck.vb (7)
12Imports TypeKind = Microsoft.CodeAnalysis.TypeKind 232If containingType.TypeKind = TypeKind.Submission Then 287If originalContainingType.TypeKind = TypeKind.Submission Then 444Case TypeKind.Interface 446Case TypeKind.TypeParameter 506Case TypeKind.Interface 511Case TypeKind.TypeParameter
Semantics\Conversions.vb (17)
1745If destination.TypeKind = TypeKind.Enum AndAlso 1750If source.TypeKind = TypeKind.Enum AndAlso 1754ElseIf source.TypeKind = TypeKind.Enum AndAlso destination.TypeKind = TypeKind.Enum Then 1996(src.TypeKind <> TypeKind.Class OrElse DirectCast(src, NamedTypeSymbol).IsNotInheritable) AndAlso 2018(dst.TypeKind <> TypeKind.Class OrElse DirectCast(dst, NamedTypeSymbol).IsNotInheritable) AndAlso 2452If Not base.IsErrorType() AndAlso base.TypeKind = TypeKind.Class AndAlso 2865Case TypeKind.Class, 2866TypeKind.Module 2872Case TypeKind.Delegate 2878Case TypeKind.Interface 2884Case TypeKind.Array 2912Return type.TypeKind = TypeKind.Delegate 2916Return type.TypeKind = TypeKind.Array 3365If type.TypeKind = TypeKind.Enum Then 3784ElseIf constraint.TypeKind = TypeKind.Enum AndAlso 3948ElseIf constraint.TypeKind = TypeKind.Enum AndAlso
Semantics\Operators.vb (1)
14Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Semantics\OverloadResolution.vb (5)
15Imports TypeKind = Microsoft.CodeAnalysis.TypeKind 2050left.TypeKind = TypeKind.Enum AndAlso right.TypeKind <> TypeKind.Enum Then 2066right.TypeKind = TypeKind.Enum AndAlso left.TypeKind <> TypeKind.Enum Then
Semantics\TypeInference\TypeArgumentInference.vb (5)
1780Dim fixedTypeTypeKind As TypeKind = fixedType.TypeKind 1782If fixedTypeTypeKind <> TypeKind.Class AndAlso fixedTypeTypeKind <> TypeKind.Interface Then 1806If fixedTypeTypeKind = TypeKind.Class Then 1809Debug.Assert(fixedTypeTypeKind = TypeKind.Interface)
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 (18)
199symbol.TypeKind = TypeKind.Delegate AndAlso 254Case TypeKind.Class, 255TypeKind.Submission 257Case TypeKind.Delegate 259Case TypeKind.Enum 261Case TypeKind.Interface 263Case TypeKind.Module 265Case TypeKind.Struct 267Case TypeKind.Error 324Case TypeKind.Class 335Case TypeKind.Delegate 449Private Shared Function GetTypeKindKeyword(typeKind As TypeKind) As SyntaxKind 451Case TypeKind.Enum 453Case TypeKind.Class 455Case TypeKind.Delegate 457Case TypeKind.Interface 459Case TypeKind.Module 461Case TypeKind.Struct
SymbolDisplay\SymbolDisplayVisitor.vb (2)
349(containingType.TypeKind <> TypeKind.Interface AndAlso Not IsEnumMember(symbol))) Then 396symbol.ContainingType.TypeKind = TypeKind.Enum AndAlso
SymbolDisplay\SymbolDisplayVisitor_Minimal.vb (1)
107If symbol.TypeKind <> TypeKind.Error Then
Symbols\AnonymousTypes\AnonymousType_SymbolCollection.vb (2)
94Case TypeKind.Class 102Case TypeKind.Delegate
Symbols\AnonymousTypes\AnonymousTypeManager_Templates.vb (2)
219Case TypeKind.Delegate 222Case TypeKind.Class
Symbols\AnonymousTypes\PublicSymbols\AnonymousDelegate_TypePublicSymbol.vb (2)
121Public Overrides ReadOnly Property TypeKind As TypeKind 123Return TypeKind.Delegate
Symbols\AnonymousTypes\PublicSymbols\AnonymousType_TypePublicSymbol.vb (2)
147Public Overrides ReadOnly Property TypeKind As TypeKind 149Return TypeKind.Class
Symbols\AnonymousTypes\PublicSymbols\AnonymousTypeOrDelegatePublicSymbol.vb (3)
20Debug.Assert((TypeKind = TypeKind.Class AndAlso TypeOf Me Is AnonymousTypePublicSymbol) OrElse 21(TypeKind = TypeKind.Delegate AndAlso TypeOf Me Is AnonymousDelegatePublicSymbol)) 63Public MustOverride Overrides ReadOnly Property TypeKind As TYPEKIND
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousDelegate_TemplateSymbol.vb (2)
160Public Overrides ReadOnly Property TypeKind As TypeKind 162Return TypeKind.Delegate
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType_TemplateSymbol.vb (2)
134Public Overrides ReadOnly Property TypeKind As TypeKind 136Return TypeKind.Class
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousTypeOrDelegateTemplateSymbol.vb (5)
53Debug.Assert(TypeKind = TypeKind.Class OrElse TypeKind = TypeKind.Delegate) 60If TypeKind = TypeKind.Delegate AndAlso typeDescr.Fields.IsSubDescription() Then 67Debug.Assert(TypeKind = TypeKind.Delegate) 120Public MustOverride Overrides ReadOnly Property TypeKind As TypeKind
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousTypeOrDelegateTypeParameterSymbol.vb (2)
65If _container.TypeKind = TypeKind.Delegate Then 72Debug.Assert(_container.TypeKind = TypeKind.Class)
Symbols\ArrayTypeSymbol.vb (3)
256Public Overrides ReadOnly Property TypeKind As TypeKind 258Return TypeKind.Array 356While (current.TypeKind = TypeKind.Array)
Symbols\AssemblySymbol.vb (1)
721If result Is Nothing OrElse result.TypeKind = TypeKind.Error Then
Symbols\Attributes\AttributeData.vb (1)
16Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Symbols\BaseTypeAnalysis.vb (2)
124If this.TypeKind = TypeKind.Class Then 233If currentNamedType.TypeKind = TypeKind.Class Then
Symbols\ConstraintsHelper.vb (24)
162Case TypeKind.Class 215Case TypeKind.Interface, 216TypeKind.Error 218Case TypeKind.Module 222Case TypeKind.TypeParameter 247Case TypeKind.Array, 248TypeKind.Delegate, 249TypeKind.Enum, 250TypeKind.Structure 837Case TypeKind.Array, 838TypeKind.Enum, 839TypeKind.Structure 844Debug.Assert(baseType.TypeKind <> TypeKind.TypeParameter) 869Case TypeKind.TypeParameter 874Case TypeKind.Error 939Case TypeKind.Enum 942Case TypeKind.TypeParameter 954Dim isStructure As Boolean = typeArgument.TypeKind = TypeKind.Structure 958If typeArgument.TypeKind = TypeKind.Class OrElse isStructure Then 1122If type.TypeKind = TypeKind.TypeParameter Then 1166Debug.Assert(type.TypeKind = TypeKind.Class OrElse type.TypeKind = TypeKind.Structure) 1168Dim sourceClass = If(type.TypeKind = TypeKind.Class, TryCast(type, SourceNamedTypeSymbol), Nothing) 1195If Not type.TypeKind = TypeKind.Structure Then
Symbols\EmbeddedSymbols\EmbeddedSymbolManager.SymbolsCollection.vb (3)
14Imports TypeKind = Microsoft.CodeAnalysis.TypeKind 333Debug.Assert(type.TypeKind = TypeKind.Module OrElse type.TypeKind = TypeKind.Class AndAlso type.IsNotInheritable)
Symbols\ErrorTypeSymbol.vb (3)
13Imports TypeKind = Microsoft.CodeAnalysis.TypeKind 109Public NotOverridable Overrides ReadOnly Property TypeKind As TypeKind 111Return TypeKind.Error
Symbols\EventSymbol.vb (2)
14Imports TypeKind = Microsoft.CodeAnalysis.TypeKind 170If type IsNot Nothing AndAlso type.TypeKind = TypeKind.Delegate Then
Symbols\FieldSymbol.vb (1)
13Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Symbols\Metadata\PE\MetadataDecoder.vb (4)
349Case TypeKind.Interface 359Case TypeKind.Delegate, 360TypeKind.Enum, 361TypeKind.Structure
Symbols\Metadata\PE\PEFieldSymbol.vb (1)
16Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Symbols\Metadata\PE\PEMethodSymbol.vb (1)
408If Not IsShared AndAlso String.Equals(name, WellKnownMemberNames.DelegateInvokeName, StringComparison.Ordinal) AndAlso _containingType.TypeKind = TypeKind.Delegate Then
Symbols\Metadata\PE\PENamedTypeSymbol.vb (20)
376If _lazyEnumUnderlyingType Is Nothing AndAlso TypeKind = TypeKind.Enum Then 414If (_lazyTypeKind = TypeKind.Unknown AndAlso 416Me.TypeKind <> TypeKind.Module Then 438If Me.TypeKind = TypeKind.Module Then 666Dim ensureParameterlessConstructor As Boolean = (TypeKind = TypeKind.Structure OrElse TypeKind = TypeKind.Enum) AndAlso Not IsShared 996Public Overrides ReadOnly Property TypeKind As TypeKind 998If _lazyTypeKind = TypeKind.Unknown Then 1000Dim result As TypeKind 1003result = TypeKind.Interface 1007result = TypeKind.Class 1015result = TypeKind.Enum 1019result = TypeKind.Delegate 1023result = TypeKind.Structure 1027result = TypeKind.Module 1035Return CType(_lazyTypeKind, TypeKind) 1139Case TypeKind.Structure 1171Case TypeKind.Enum 1315If (typeKind = TypeKind.Class OrElse typeKind = TypeKind.Module) AndAlso
Symbols\Metadata\PE\PENamespaceSymbol.vb (2)
64Dim modules = GetTypeMembers().WhereAsArray(Function(t) t.TypeKind = TYPEKIND.Module) 73Return GetTypeMembers(name).WhereAsArray(Function(t) t.TypeKind = TYPEKIND.Module)
Symbols\MethodSymbol.vb (1)
557If firstType.TypeKind <> TypeKind.Array Then
Symbols\MissingModuleSymbol.vb (1)
14Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Symbols\NamedTypeSymbol.vb (12)
15Imports TypeKind = Microsoft.CodeAnalysis.TypeKind 232If TypeKind <> TypeKind.Delegate Then 444Return TypeKind <> TypeKind.Enum AndAlso TypeKind <> TypeKind.Structure AndAlso 445TypeKind <> TypeKind.Error 457Return TypeKind = TypeKind.Enum OrElse TypeKind = TypeKind.Structure 572Return TypeKind = TypeKind.Submission 588Dim name = If(TypeKind = TypeKind.Submission, SynthesizedEntryPointSymbol.FactoryName, SynthesizedEntryPointSymbol.MainName) 820If Me.TypeKind = TypeKind.Interface Then 1272Case TypeKind.Pointer, TypeKind.FunctionPointer
Symbols\NamedTypeSymbolExtensions.vb (1)
110Return container.TypeKind = TypeKind.Module OrElse container.IsScriptClass
Symbols\NamespaceSymbol.vb (1)
53Return GetTypeMembers(name).WhereAsArray(Function(t) t.TypeKind = TypeKind.Module)
Symbols\ParameterSymbol.vb (1)
13Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Symbols\Retargeting\RetargetingModuleSymbol.vb (1)
15Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Symbols\Retargeting\RetargetingNamedTypeSymbol.vb (2)
17Imports TypeKind = Microsoft.CodeAnalysis.TypeKind 413Public Overrides ReadOnly Property TypeKind As TypeKind
Symbols\Source\IAttributeTargetSymbol.vb (1)
13Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Symbols\Source\ImplementsHelper.vb (1)
396ElseIf interfaceType.TypeKind = TypeKind.Error Then
Symbols\Source\ImplicitNamedTypeSymbol.vb (2)
18Imports TypeKind = Microsoft.CodeAnalysis.TypeKind 58Return If(Me.TypeKind = TypeKind.Submission, Nothing, baseType)
Symbols\Source\OverrideHidingHelper.vb (3)
27Case TypeKind.Class, TypeKind.Interface, TypeKind.Structure
Symbols\Source\SourceComplexParameterSymbol.vb (2)
341If (flags And SourceParameterFlags.ParamArray) <> 0 AndAlso paramType.TypeKind <> TypeKind.Error Then 342If paramType.TypeKind <> TypeKind.Array Then
Symbols\Source\SourceDeclareMethodSymbol.vb (1)
44If ContainingType.TypeKind <> TypeKind.Module Then
Symbols\Source\SourceDelegateMethodSymbol.vb (1)
12Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Symbols\Source\SourceFieldSymbol.vb (1)
15Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Symbols\Source\SourceMemberContainerTypeSymbol.vb (36)
35[Class] = CUShort(TypeKind.Class) << TypeKindShift 36[Structure] = CUShort(TypeKind.Structure) << TypeKindShift 37[Interface] = CUShort(TypeKind.Interface) << TypeKindShift 38[Enum] = CUShort(TypeKind.Enum) << TypeKindShift 39[Delegate] = CUShort(TypeKind.Delegate) << TypeKindShift 40[Module] = CUShort(TypeKind.Module) << TypeKindShift 41Submission = CUShort(TypeKind.Submission) << TypeKindShift 243If type.TypeKind = TypeKind.Module Then 337Case TypeKind.Interface 340Case TypeKind.Delegate 343Case TypeKind.Class, TypeKind.Enum, TypeKind.Structure 346Case TypeKind.Module, TypeKind.Submission 1259Public Overrides ReadOnly Property TypeKind As TypeKind 1261Return CType((_flags And SourceTypeFlags.TypeKindMask) >> CUInt(SourceTypeFlags.TypeKindShift), TypeKind) 1267Return Me.TypeKind = TypeKind.Interface 1645If TypeKind <> TypeKind.Delegate Then 2673propertySymbol.ContainingType.TypeKind = TypeKind.Structure Then 2724If TypeKind = TypeKind.Submission Then 2737ElseIf TypeKind = TypeKind.Class OrElse 2738TypeKind = TypeKind.Structure OrElse 2739TypeKind = TypeKind.Enum OrElse 2740(TypeKind = TypeKind.Module AndAlso isShared) Then 2788If TypeKind <> TypeKind.Structure OrElse isShared Then 2803If TypeKind = TypeKind.Submission Then 2806ElseIf TypeKind = TypeKind.Class OrElse TypeKind = TypeKind.Module Then 3499Dim myTypeKind As TypeKind = Me.TypeKind 3502If myTypeKind = TypeKind.Class OrElse myTypeKind = TypeKind.Interface OrElse myTypeKind = TypeKind.Structure OrElse myTypeKind = TypeKind.Module Then 3506Dim canDeclareOperators As Boolean = (myTypeKind <> TypeKind.Module AndAlso myTypeKind <> TypeKind.Interface)
Symbols\Source\SourceMemberFieldSymbol.vb (2)
13Imports TypeKind = Microsoft.CodeAnalysis.TypeKind 528If container.TypeKind = TypeKind.Structure AndAlso
Symbols\Source\SourceMemberMethodSymbol.vb (6)
756Case TypeKind.Interface, TypeKind.Structure, TypeKind.Enum, TypeKind.Delegate 760Case TypeKind.Class, TypeKind.Module
Symbols\Source\SourceMethodSymbol.vb (4)
97If container.TypeKind = TYPEKIND.Structure Then 230If container.TypeKind = TYPEKIND.Module Then 238ElseIf container.TypeKind = TYPEKIND.Structure Then 406If container.TypeKind = TYPEKIND.Structure AndAlso methodSym.ParameterCount = 0 Then
Symbols\Source\SourceNamedTypeSymbol.vb (39)
17Imports TypeKind = Microsoft.CodeAnalysis.TypeKind 240If TypeKind = TypeKind.Delegate Then 268ElseIf TypeKind = TypeKind.Enum Then 1110Case TypeKind.TypeParameter 1114Case TypeKind.Interface, TypeKind.Enum, TypeKind.Delegate, TypeKind.Structure, TypeKind.Module, TypeKind.Array ' array can't really occur 1118Case TypeKind.Error, TypeKind.Unknown 1121Case TypeKind.Class 1181Case TypeKind.TypeParameter 1185Case TypeKind.Unknown 1188Case TypeKind.Interface, TypeKind.Error 1232Case TypeKind.TypeParameter 1236Case TypeKind.Unknown 1239Case TypeKind.Interface, TypeKind.Error 1375Case TypeKind.Submission 1381Case TypeKind.Class 1384Case TypeKind.Interface 1387Case TypeKind.Enum 1390Case TypeKind.Structure 1393Case TypeKind.Delegate 1396Case TypeKind.Module 1503Debug.Assert(Me.TypeKind <> TypeKind.Interface) 1505If TypeKind = TypeKind.Enum Then 1508ElseIf TypeKind = TypeKind.Delegate Then 2188Case TypeKind.Class 2215Case TypeKind.Interface 2235Case TypeKind.Module 2270Dim defaultAutoLayoutSize = If(Me.TypeKind = TypeKind.Structure, 1, 0) 2401If Me.TypeKind = TypeKind.Module Then 2451If Me.TypeKind = TypeKind.Structure Then 2494If Me.TypeKind = TypeKind.Module Then 2619If Me.TypeKind = TypeKind.Class AndAlso Not Me.IsGenericType Then
Symbols\Source\SourceNamedTypeSymbol_ComClass.vb (2)
956Public Overrides ReadOnly Property TypeKind As TypeKind 958Return TypeKind.Interface
Symbols\Source\SourceNamedTypeSymbol_GroupClass.vb (6)
17If Me.TypeKind = TypeKind.Class AndAlso Not Me.IsGenericType Then 216If named.TypeKind = TypeKind.Class AndAlso Not named.IsNotInheritable Then 250named.TypeKind = TypeKind.Class AndAlso 292Debug.Assert(candidate.TypeKind = TypeKind.Class) 302If Me.TypeKind = TypeKind.Class Then 315Debug.Assert(Me.TypeKind = TypeKind.Class)
Symbols\Source\SourcePropertyAccessorSymbol.vb (2)
91Case TypeKind.Structure 96Case TypeKind.Module
Symbols\Source\SourcePropertySymbol.vb (1)
17Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Symbols\Source\SourceWithEventsBackingFieldSymbol.vb (1)
12Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Symbols\Source\SynthesizedMainTypeEntryPoint.vb (1)
14Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Symbols\Source\SynthesizedMyGroupCollectionPropertyAccessorSymbol.vb (1)
15Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Symbols\Source\SynthesizedSubmissionConstructorSymbol.vb (1)
27Debug.Assert(container.TypeKind = TypeKind.Submission)
Symbols\SubstitutedNamedType.vb (2)
14Imports TypeKind = Microsoft.CodeAnalysis.TypeKind 206Public NotOverridable Overrides ReadOnly Property TypeKind As TypeKind
Symbols\Symbol.vb (3)
98If ContainingType.TypeKind = TypeKind.Submission Then 112If ContainingType.TypeKind = TypeKind.Submission Then 119Debug.Assert(ContainingType.TypeKind <> TypeKind.Submission)
Symbols\Symbol_Attributes.vb (8)
13Imports TypeKind = Microsoft.CodeAnalysis.TypeKind 97Case TypeKind.Class, 98TypeKind.Module 101Case TypeKind.Structure 104Case TypeKind.Interface 107Case TypeKind.Enum 110Case TypeKind.Delegate 113Case TypeKind.Submission
Symbols\SymbolExtensions.vb (6)
35Case TypeKind.Class 37Case TypeKind.Enum 39Case TypeKind.Interface 41Case TypeKind.Structure 43Case TypeKind.Module 45Case TypeKind.Delegate
Symbols\SynthesizedSymbols\SynthesizedEventDelegateSymbol.vb (2)
360Public Overrides ReadOnly Property TypeKind As TypeKind 362Return TypeKind.Delegate
Symbols\SynthesizedSymbols\SynthesizedHotReloadExceptionSymbol.vb (2)
265Public Overrides ReadOnly Property TypeKind As TypeKind 267Return TypeKind.Class
Symbols\Tuples\TupleTypeSymbol.vb (2)
144Public Overrides ReadOnly Property TypeKind As TypeKind 148Return TypeKind.Struct
Symbols\TypedConstant.vb (1)
18Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Symbols\TypeParameterSymbol.vb (3)
146Public NotOverridable Overrides ReadOnly Property TypeKind As TypeKind 148Return TypeKind.TypeParameter 246If (constraint.TypeKind = TypeKind.TypeParameter) Then
Symbols\TypeSymbol.vb (2)
276Public MustOverride ReadOnly Property TypeKind As TYPEKIND 581Private ReadOnly Property ITypeSymbol_TypeKind As TypeKind Implements ITypeSymbol.TypeKind, ITypeSymbolInternal.TypeKind
Symbols\TypeSymbolExtensions.vb (46)
118Return type.TypeKind = TypeKind.Enum 140Return type.TypeKind = TypeKind.Class 146Return type.TypeKind = TypeKind.Structure 152Return type.TypeKind = TypeKind.Module 233Return type.TypeKind = TypeKind.Delegate 410Case TypeKind.Array, TypeKind.Delegate, TypeKind.Enum, TypeKind.Structure, TypeKind.Module 412Case TypeKind.Interface, TypeKind.TypeParameter, TypeKind.Unknown 414Case TypeKind.Error, TypeKind.Class, TypeKind.Submission 635Case TypeKind.Array 637Case TypeKind.TypeParameter 735fieldType.TypeKind = TypeKind.Enum 746If type.TypeKind = TypeKind.TypeParameter Then 761Return (type.TypeKind = TypeKind.TypeParameter) AndAlso 774Return (type.TypeKind = TypeKind.TypeParameter) AndAlso 790Private ReadOnly s_isTypeParameterFunc As Func(Of TypeSymbol, Object, Boolean) = Function(type, arg) (type.TypeKind = TypeKind.TypeParameter) 830Case TypeKind.Class, 831TypeKind.Struct, 832TypeKind.Interface, 833TypeKind.Enum, 834TypeKind.Delegate 845Case TypeKind.Submission 855Case TypeKind.Dynamic, 856TypeKind.TypeParameter, 857TypeKind.Submission, 858TypeKind.Enum, 859TypeKind.Module 863Case TypeKind.Class, 864TypeKind.Struct, 865TypeKind.Interface, 866TypeKind.Delegate, 867TypeKind.Error 883Case TypeKind.Array 1060If type.TypeKind = TypeKind.Class Then 1066If typeArgument.TypeKind = TypeKind.Delegate Then 1082If type.TypeKind = TypeKind.Delegate Then 1096If type.TypeKind = TypeKind.Delegate Then 1131If type.TypeKind = TypeKind.TypeParameter Then 1139If type.TypeKind = TypeKind.TypeParameter Then
Symbols\UnboundGenericType.vb (2)
16Imports TypeKind = Microsoft.CodeAnalysis.TypeKind 203Public Overrides ReadOnly Property TypeKind As TypeKind
Symbols\Wrapped\WrappedNamedTypeSymbol.vb (1)
78Public Overrides ReadOnly Property TypeKind As 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 (30)
src\Analyzers\VisualBasic\CodeFixes\GenerateDefaultConstructors\VisualBasicGenerateDefaultConstructorsService.vb (1)
35Return classType IsNot Nothing AndAlso classType.TypeKind = TypeKind.Class
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\VisualBasicGenerateConversionService.vb (5)
55Protected Overrides Function TryInitializeExplicitConversionState(document As SemanticDocument, expression As SyntaxNode, classInterfaceModuleStructTypes As ISet(Of TypeKind), cancellationToken As CancellationToken, ByRef identifierToken As SyntaxToken, ByRef methodSymbol As IMethodSymbol, ByRef typeToGenerateIn As INamedTypeSymbol) As Boolean 69Protected Overrides Function TryInitializeImplicitConversionState(document As SemanticDocument, expression As SyntaxNode, classInterfaceModuleStructTypes As ISet(Of TypeKind), cancellationToken As CancellationToken, ByRef identifierToken As SyntaxToken, ByRef methodSymbol As IMethodSymbol, ByRef typeToGenerateIn As INamedTypeSymbol) As Boolean 83Private Shared Function TryGetConversionMethodAndTypeToGenerateIn(document As SemanticDocument, expression As SyntaxNode, classInterfaceModuleStructTypes As ISet(Of TypeKind), cancellationToken As CancellationToken, ByRef methodSymbol As IMethodSymbol, ByRef typeToGenerateIn As INamedTypeSymbol) As Boolean 113Private Shared Function TryGetExplicitConversionMethodAndTypeToGenerateIn(document As SemanticDocument, castExpression As CastExpressionSyntax, classInterfaceModuleStructTypes As ISet(Of TypeKind), cancellationToken As CancellationToken, ByRef methodSymbol As IMethodSymbol, ByRef typeToGenerateIn As INamedTypeSymbol) As Boolean 129Private Shared Function TryGetImplicitConversionMethodAndTypeToGenerateIn(document As SemanticDocument, expression As SyntaxNode, classInterfaceModuleStructTypes As ISet(Of TypeKind), cancellationToken As CancellationToken, ByRef methodSymbol As IMethodSymbol, ByRef typeToGenerateIn As INamedTypeSymbol) As Boolean
src\Analyzers\VisualBasic\CodeFixes\ImplementInterface\VisualBasicImplementInterfaceService.vb (1)
72interfaceTypes = interfaceTypes.WhereNotNull().Where(Function(t) t.TypeKind = TypeKind.Interface).ToImmutableArray()
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 (3)
328objectCreationType.TypeKind = TypeKind.Delegate Then 800Return DirectCast(symbol, INamedTypeSymbol).TypeKind = TypeKind.Enum 803Return target.IsType AndAlso DirectCast(target, ITypeSymbol).TypeKind = TypeKind.Enum
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 (4)
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 712Return lambdaTypes.Where(Function(t) t.InferredType.TypeKind = TypeKind.Delegate).SelectMany(Function(t) t.InferredType.GetMembers(WellKnownMemberNames.DelegateInvokeName).OfType(Of IMethodSymbol)().Select(Function(m) New TypeInferenceInfo(m.ReturnType)))
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (33)
Attributes\AttributeTests_Conditional.vb (1)
21Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Attributes\AttributeTests_MarshalAs.vb (1)
15Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
CodeGen\CodeGenAsyncTests.vb (2)
52Assert.Equal(TypeKind.Structure, stateMachine.TypeKind) 62Assert.Equal(TypeKind.Class, stateMachine.TypeKind)
CodeGen\CodeGenScriptTests.vb (1)
249Assert.NotEqual(type.TypeKind, TypeKind.Submission)
CodeGen\CodeGenTuples.vb (5)
5749Assert.Equal(TypeKind.Error, mTuple.TupleUnderlyingType.TypeKind) 5752Assert.Equal(TypeKind.Struct, mTuple.TypeKind) 15034Assert.Equal(TypeKind.Struct, m1Tuple.TypeKind) 16292Assert.Equal(TypeKind.Struct, m1Tuple.TypeKind) 20071Assert.Equal(TypeKind.Class, comp.GetWellKnownType(WellKnownType.System_ValueTuple_T2).TypeKind)
Emit\CompilationEmitTests.vb (1)
2040Assert.Equal(m.Single().TypeKind, TypeKind.Module)
Emit\EmitMetadata.vb (5)
388Assert.Equal(TypeKind.Interface, i1.TypeKind) 389Assert.Equal(TypeKind.Interface, i2.TypeKind) 390Assert.Equal(TypeKind.Interface, i3.TypeKind) 391Assert.Equal(TypeKind.Class, classA.TypeKind) 392Assert.Equal(TypeKind.Class, classB.TypeKind)
Emit\NoPiaEmbedTypes.vb (17)
1001Assert.Equal(TypeKind.Interface, itest1.TypeKind) 1023Assert.Equal(TypeKind.Structure, test2.TypeKind) 1044Assert.Equal(TypeKind.Interface, itest3.TypeKind) 1057Assert.Equal(TypeKind.Structure, test5.TypeKind) 1075Assert.Equal(TypeKind.Interface, itest6.TypeKind) 1078Assert.Equal(TypeKind.Interface, itest7.TypeKind) 1081Assert.Equal(TypeKind.Interface, itest8.TypeKind) 1085Assert.Equal(TypeKind.Enum, test9.TypeKind) 1141Assert.Equal(TypeKind.Structure, test10.TypeKind) 1165Assert.Equal(TypeKind.Delegate, test11.TypeKind) 1244Assert.Equal(TypeKind.Interface, itest13.TypeKind) 1265Assert.Equal(TypeKind.Interface, itest14.TypeKind) 1275Assert.Equal(TypeKind.Interface, itest16.TypeKind) 1279Assert.Equal(TypeKind.Interface, itest17.TypeKind) 1328Assert.Equal(TypeKind.Interface, itest18.TypeKind) 1545Assert.Equal(TypeKind.Interface, type1.TypeKind) 1548Assert.Equal(TypeKind.Interface, type2.TypeKind)
Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler (6)
EvaluationContext.vb (1)
515If type.TypeKind <> TypeKind.Class Then
Rewriters\CapturedVariableRewriter.vb (2)
95Debug.Assert(meParameter.Type.TypeKind = TypeKind.Class) ' Illegal in structures and modules. 98Debug.Assert(baseType.TypeKind = TypeKind.Class) ' Illegal in structures and modules.
SymbolExtensions.vb (1)
27If type.TypeKind = TypeKind.TypeParameter Then
Symbols\EENamedTypeSymbol.vb (2)
251Public Overrides ReadOnly Property TypeKind As TypeKind 253Return TypeKind.Module
Microsoft.CodeAnalysis.VisualBasic.Features (34)
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 (7)
180If delegateSymbol.Arity <> 0 AndAlso delegateSymbol.TypeArguments.Any(Function(n) n.TypeKind = TypeKind.TypeParameter) Then 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\EnumCompletionProvider.vb (1)
61If enumType.TypeKind <> TypeKind.Enum Then
Completion\CompletionProviders\NamedParameterCompletionProvider.vb (1)
147If type IsNot Nothing AndAlso within IsNot Nothing AndAlso type.TypeKind <> TypeKind.[Delegate] Then
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (5)
655Return method.ContainingType.TypeKind <> TypeKind.Struct 1430Case TypeKind.Structure 1432Case TypeKind.Module 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
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\VisualBasicGenerateConversionService.vb (5)
55Protected Overrides Function TryInitializeExplicitConversionState(document As SemanticDocument, expression As SyntaxNode, classInterfaceModuleStructTypes As ISet(Of TypeKind), cancellationToken As CancellationToken, ByRef identifierToken As SyntaxToken, ByRef methodSymbol As IMethodSymbol, ByRef typeToGenerateIn As INamedTypeSymbol) As Boolean 69Protected Overrides Function TryInitializeImplicitConversionState(document As SemanticDocument, expression As SyntaxNode, classInterfaceModuleStructTypes As ISet(Of TypeKind), cancellationToken As CancellationToken, ByRef identifierToken As SyntaxToken, ByRef methodSymbol As IMethodSymbol, ByRef typeToGenerateIn As INamedTypeSymbol) As Boolean 83Private Shared Function TryGetConversionMethodAndTypeToGenerateIn(document As SemanticDocument, expression As SyntaxNode, classInterfaceModuleStructTypes As ISet(Of TypeKind), cancellationToken As CancellationToken, ByRef methodSymbol As IMethodSymbol, ByRef typeToGenerateIn As INamedTypeSymbol) As Boolean 113Private Shared Function TryGetExplicitConversionMethodAndTypeToGenerateIn(document As SemanticDocument, castExpression As CastExpressionSyntax, classInterfaceModuleStructTypes As ISet(Of TypeKind), cancellationToken As CancellationToken, ByRef methodSymbol As IMethodSymbol, ByRef typeToGenerateIn As INamedTypeSymbol) As Boolean 129Private Shared Function TryGetImplicitConversionMethodAndTypeToGenerateIn(document As SemanticDocument, expression As SyntaxNode, classInterfaceModuleStructTypes As ISet(Of TypeKind), cancellationToken As CancellationToken, ByRef methodSymbol As IMethodSymbol, ByRef typeToGenerateIn As INamedTypeSymbol) As Boolean
src\Analyzers\VisualBasic\CodeFixes\ImplementInterface\VisualBasicImplementInterfaceService.vb (1)
72interfaceTypes = interfaceTypes.WhereNotNull().Where(Function(t) t.TypeKind = TypeKind.Interface).ToImmutableArray()
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (581)
Binding\ForEachTests.vb (1)
4537Assert.NotEqual(TypeKind.Error, localSymbolType.TypeKind)
Compilation\MyTemplateTests.vb (2)
238Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 240Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind)
Compilation\SemanticModelGetDeclaredSymbolAPITests.vb (12)
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) 730Assert.Equal(TypeKind.Class, typeSymbol7.TypeKind) 735Assert.Equal(TypeKind.Class, typeSymbol8.TypeKind) 740Assert.Equal(TypeKind.Enum, typeSymbol9.TypeKind) 745Assert.Equal(TypeKind.Delegate, typeSymbol10.TypeKind) 2772Assert.Equal(TypeKind.Enum, local.Type.TypeKind) 2954Assert.Equal(TypeKind.Class, symbol.TypeKind)
DeclaringSyntaxNodeTests.vb (2)
552If nt.TypeKind = TypeKind.Delegate AndAlso nt.Name.EndsWith("EventHandler", StringComparison.Ordinal) Then 588If nt.TypeKind = TypeKind.Delegate AndAlso nt.Name.EndsWith("EventHandler", StringComparison.Ordinal) Then
ExtensionMethods\SemanticModelTests.vb (2)
182Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 184Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind)
Semantics\ArrayLiteralTests.vb (5)
1497Assert.Equal(TypeKind.Error, semanticSummary.Type.TypeKind) 1499Assert.Equal(TypeKind.Error, semanticSummary.ConvertedType.TypeKind) 1633Assert.Equal(TypeKind.Array, semanticSummary.ConvertedType.TypeKind) 1689Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 1723Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind)
Semantics\FieldInitializerBindingTests.vb (9)
447Assert.Equal(TypeKind.Array, ary.Type.TypeKind) 452Assert.Equal(TypeKind.Array, ary.Type.TypeKind) 457Assert.Equal(TypeKind.Array, ary.Type.TypeKind) 462Assert.Equal(TypeKind.Class, ary.Type.TypeKind) 506Assert.Equal(TypeKind.Structure, field.Type.TypeKind) 512Assert.Equal(TypeKind.Structure, field.Type.TypeKind) 518Assert.Equal(TypeKind.Structure, field.Type.TypeKind) 523Assert.Equal(TypeKind.Class, field.Type.TypeKind) 528Assert.Equal(TypeKind.Delegate, field.Type.TypeKind)
Semantics\GetExtendedSemanticInfoTests.vb (284)
115Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 117Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 150Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 152Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 187Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 189Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 227Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 229Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 270Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 272Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 313Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 315Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 361Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind) 363Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind) 410Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind) 412Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind) 459Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind) 461Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind) 501Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 503Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 695Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 697Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 793Assert.Equal(TypeKind.[Class], semanticSummary.Type.TypeKind) 851Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 853Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 908Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 910Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 1002Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 1004Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 1053Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 1055Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 1104Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 1106Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 1151Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 1153Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 1197Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 1199Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 1243Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 1245Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 1291Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 1293Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 1336Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 1338Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 1373Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 1375Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 1416Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 1418Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 1430Assert.Equal(TypeKind.Error, paramSym.Type.TypeKind) 1454Assert.Equal(TypeKind.Array, semanticInfo.Type.TypeKind) 1456Assert.Equal(TypeKind.Array, semanticInfo.ConvertedType.TypeKind) 1581Assert.Equal(TypeKind.Interface, semanticInfo.Type.TypeKind) 1583Assert.Equal(TypeKind.Interface, semanticInfo.ConvertedType.TypeKind) 1990Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind) 1992Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind) 2025Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 2045Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 2047Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 2078Assert.Equal(TypeKind.Struct, semanticInfo.Type.TypeKind) 2080Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 2113Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 2115Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 2145Assert.Equal(TypeKind.Array, semanticInfo.Type.TypeKind) 2147Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 2176Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind) 2178Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind) 2207Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 2209Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 2249Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 2251Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 2362Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 2364Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 2401Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 2403Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 2439Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 2441Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 2472Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 2474Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 2515Assert.Equal(TypeKind.Enum, semanticInfo.Type.TypeKind) 2517Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 2596Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 2598Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 2710Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 2779Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 2781Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 2882Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 2884Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 3072Assert.Equal(TypeKind.Array, semanticInfo.Type.TypeKind) 3074Assert.Equal(TypeKind.Array, semanticInfo.ConvertedType.TypeKind) 3093Assert.Equal(TypeKind.Array, semanticInfo.Type.TypeKind) 3095Assert.Equal(TypeKind.Array, semanticInfo.ConvertedType.TypeKind) 3116Assert.Equal(TypeKind.Array, semanticInfo.Type.TypeKind) 3118Assert.Equal(TypeKind.Array, semanticInfo.ConvertedType.TypeKind) 3143Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 3145Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 3179Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 3181Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 3553Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 3555Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 3612Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 3614Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 3663Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 3665Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 3716Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 3718Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 3766Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind) 3768Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind) 3793Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 3795Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 3901Assert.Equal(semanticInfo.Type.TypeKind, TypeKind.Error) 3942Assert.Equal(semanticInfo.Type.TypeKind, TypeKind.Error) 4057Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 4059Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 4095Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 4097Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 4160Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 4162Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 4193Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 4195Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 4234Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 4236Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 4272Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 4274Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 4311Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 4313Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 4345Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 4347Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 4384Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 4386Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 4420Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 4422Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 4459Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 4461Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 4498Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 4500Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 4575Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 4577Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 4617Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 4619Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 4652Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 4654Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 4709Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 4711Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 4752Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 4754Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 4790Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind) 4792Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 4833Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 4835Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 4868Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 4870Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 4899Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 4901Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 4931Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 4933Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 5058Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind) 5060Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind) 5096Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 5098Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 5127Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 5129Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 5232Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind) 5234Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind) 5278Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind) 5280Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 5340Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 5342Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 5371Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 5373Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 5407Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 5409Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 5438Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 5440Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 5471Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 5473Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 5502Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 5504Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 5532Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 5534Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 5650Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 5652Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 5713Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 5715Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 5772Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 5774Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 6097Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 6099Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 6179Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 6181Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 6812Assert.Equal(TypeKind.Delegate, semanticInfo.Type.TypeKind) 6814Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind) 6887Assert.Equal(TypeKind.Delegate, semanticInfo.Type.TypeKind) 6889Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind) 6962Assert.Equal(TypeKind.Delegate, semanticInfo.Type.TypeKind) 6964Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind) 7037Assert.Equal(TypeKind.Delegate, semanticInfo.Type.TypeKind) 7039Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind) 7118Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 7120Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 7202Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 7204Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 7244Assert.Equal(TypeKind.Structure, semanticSummary.Type.TypeKind) 7246Assert.Equal(TypeKind.Structure, semanticSummary.ConvertedType.TypeKind) 7318Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 7320Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 7357Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 7359Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 7452Assert.Equal(TypeKind.Class, semanticInfo1.Type.TypeKind) 7454Assert.Equal(TypeKind.Class, semanticInfo1.ConvertedType.TypeKind) 7463Assert.Equal(TypeKind.Class, semanticInfo2.Type.TypeKind) 7465Assert.Equal(TypeKind.Class, semanticInfo2.ConvertedType.TypeKind) 7507Assert.Equal(TypeKind.Class, semanticInfo1.Type.TypeKind) 7509Assert.Equal(TypeKind.Class, semanticInfo1.ConvertedType.TypeKind) 7518Assert.Equal(TypeKind.Class, semanticInfo2.Type.TypeKind) 7520Assert.Equal(TypeKind.Class, semanticInfo2.ConvertedType.TypeKind) 7567Assert.Equal(TypeKind.Structure, semanticInfo1.Type.TypeKind) 7569Assert.Equal(TypeKind.Structure, semanticInfo1.ConvertedType.TypeKind) 7583Assert.Equal(TypeKind.Structure, semanticInfo2.Type.TypeKind) 7585Assert.Equal(TypeKind.Structure, semanticInfo2.ConvertedType.TypeKind) 7703Assert.Equal(TypeKind.Structure, semanticSummary.Type.TypeKind) 7705Assert.Equal(TypeKind.Structure, semanticSummary.ConvertedType.TypeKind) 7739Assert.Equal(TypeKind.Delegate, semanticSummary.Type.TypeKind) 7741Assert.Equal(TypeKind.Delegate, semanticSummary.ConvertedType.TypeKind) 7774Assert.Equal(TypeKind.Delegate, semanticSummary.Type.TypeKind) 7776Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 7810Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 7812Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 7849Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 7851Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 7888Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 7890Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 7927Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 7929Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 7966Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 7968Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 8004Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 8006Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 8042Assert.Equal(TypeKind.Interface, semanticSummary.Type.TypeKind) 8044Assert.Equal(TypeKind.Interface, semanticSummary.ConvertedType.TypeKind) 8253Assert.Equal(TypeKind.Structure, semanticSummary.Type.TypeKind) 8255Assert.Equal(TypeKind.Structure, semanticSummary.ConvertedType.TypeKind) 8298Assert.Equal(TypeKind.Structure, semanticSummary.Type.TypeKind) 8300Assert.Equal(TypeKind.Structure, semanticSummary.ConvertedType.TypeKind) 8336Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 8338Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 8436Assert.Equal(TypeKind.Structure, semanticSummary.Type.TypeKind) 8438Assert.Equal(TypeKind.Structure, semanticSummary.ConvertedType.TypeKind) 8622Assert.Equal(TypeKind.Module, semanticSummary.Type.TypeKind) 8624Assert.Equal(TypeKind.Module, semanticSummary.ConvertedType.TypeKind) 8702Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 8849Assert.Equal(TypeKind.Module, semanticSummary.Type.TypeKind) 8851Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 8922Assert.Equal(TypeKind.Interface, semanticSummary.Type.TypeKind) 8924Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 8999Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 9001Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 9392Assert.Equal(TypeKind.TypeParameter, semanticSummary.Type.TypeKind) 9469Assert.Equal(TypeKind.Interface, semanticSummary.Type.TypeKind) 9471Assert.Equal(TypeKind.Interface, semanticSummary.ConvertedType.TypeKind) 9505Assert.Equal(TypeKind.[Class], semanticInfo.Type.TypeKind) 9507Assert.Equal(TypeKind.[Class], semanticInfo.ConvertedType.TypeKind) 9538Assert.Equal(TypeKind.[Class], semanticInfo.Type.TypeKind) 9540Assert.Equal(TypeKind.[Class], semanticInfo.ConvertedType.TypeKind) 9573Assert.Equal(TypeKind.[Class], semanticInfo.Type.TypeKind) 9575Assert.Equal(TypeKind.[Class], semanticInfo.ConvertedType.TypeKind) 9608Assert.Equal(TypeKind.[Class], semanticInfo.Type.TypeKind) 9610Assert.Equal(TypeKind.[Class], semanticInfo.ConvertedType.TypeKind) 9643Assert.Equal(TypeKind.[Class], semanticInfo.Type.TypeKind) 9645Assert.Equal(TypeKind.[Class], semanticInfo.ConvertedType.TypeKind) 9691Assert.Equal(TypeKind.[Class], semanticInfo.Type.TypeKind) 9693Assert.Equal(TypeKind.[Class], semanticInfo.ConvertedType.TypeKind) 9731Assert.Equal(TypeKind.[Class], semanticInfo.Type.TypeKind) 9733Assert.Equal(TypeKind.[Class], semanticInfo.ConvertedType.TypeKind) 9771Assert.Equal(TypeKind.[Class], semanticInfo.Type.TypeKind) 9773Assert.Equal(TypeKind.[Class], semanticInfo.ConvertedType.TypeKind) 9814Assert.Equal(TypeKind.[Class], semanticInfo.Type.TypeKind) 9816Assert.Equal(TypeKind.[Class], semanticInfo.ConvertedType.TypeKind) 9846Assert.Equal(TypeKind.[Class], semanticInfo.Type.TypeKind) 9848Assert.Equal(TypeKind.[Class], semanticInfo.ConvertedType.TypeKind) 9880Assert.Equal(TypeKind.[Class], semanticInfo.Type.TypeKind) 9882Assert.Equal(TypeKind.[Class], semanticInfo.ConvertedType.TypeKind) 9926Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 9928Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 9968Assert.Equal(TypeKind.TypeParameter, semanticSummary.Type.TypeKind) 9970Assert.Equal(TypeKind.TypeParameter, semanticSummary.ConvertedType.TypeKind)
Semantics\GetSemanticInfoTests.vb (61)
127Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 129Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 172Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 174Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 218Assert.Equal(TypeKind.Array, semanticInfo.Type.TypeKind) 220Assert.Equal(TypeKind.Array, semanticInfo.ConvertedType.TypeKind) 311Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 313Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 361Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 363Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 411Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind) 413Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind) 461Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind) 463Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind) 511Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind) 513Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind) 561Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 563Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 762Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 764Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 1498Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 1500Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 1535Assert.Equal(TypeKind.Error, semanticSummary.Type.TypeKind) 1537Assert.Equal(TypeKind.Error, semanticSummary.ConvertedType.TypeKind) 2048Assert.Equal(TypeKind.Structure, semanticSummary.Type.TypeKind) 2050Assert.Equal(TypeKind.Structure, semanticSummary.ConvertedType.TypeKind) 2061Assert.Equal(TypeKind.Structure, semanticSummary.Type.TypeKind) 2063Assert.Equal(TypeKind.Structure, semanticSummary.ConvertedType.TypeKind) 2075Assert.Equal(TypeKind.Structure, semanticSummary.Type.TypeKind) 2077Assert.Equal(TypeKind.Structure, semanticSummary.ConvertedType.TypeKind) 2088Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 2090Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 2143Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 2145Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 2163Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 2165Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 2241Assert.Equal(TypeKind.Array, semanticSummary.ConvertedType.TypeKind) 2294Assert.Equal(TypeKind.Structure, semanticSummary.Type.TypeKind) 2296Assert.Equal(TypeKind.Structure, semanticSummary.ConvertedType.TypeKind) 2308Assert.Equal(TypeKind.Structure, semanticSummary.Type.TypeKind) 2310Assert.Equal(TypeKind.Structure, semanticSummary.ConvertedType.TypeKind) 2353Assert.Equal(TypeKind.Structure, semanticSummary.Type.TypeKind) 2355Assert.Equal(TypeKind.Structure, semanticSummary.ConvertedType.TypeKind) 2367Assert.Equal(TypeKind.Structure, semanticSummary.Type.TypeKind) 2369Assert.Equal(TypeKind.Structure, semanticSummary.ConvertedType.TypeKind) 2416Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 2418Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 3379Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 3381Assert.Equal(TypeKind.Structure, semanticSummary.ConvertedType.TypeKind) 3426Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 3428Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 3479Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 3481Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 3533Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 3535Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 3586Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 3588Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 3638Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 3640Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 3683Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 3685Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind)
Semantics\IFOperatorTest.vb (2)
1163semanticInfos(1).ConvertedType.TypeKind <> TypeKind.TypeParameter AndAlso 1164semanticInfos(2).ConvertedType.TypeKind <> TypeKind.TypeParameter) Then
Semantics\LambdaSemanticInfoTests.vb (24)
37Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 39Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 69Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 71Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 103Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 105Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 135Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 137Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 210Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 212Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 245Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 247Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 280Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 282Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 318Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 320Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 353Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 355Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 392Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 394Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 432Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 434Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 718Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 720Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind)
Semantics\NativeIntegerTests.vb (1)
53Assert.Equal(TypeKind.Struct, type.TypeKind)
Semantics\OptionalArgumentTests.vb (2)
1057Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 1059Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind)
Semantics\QueryExpressions_SemanticModel.vb (104)
69Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 71Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 89Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 91Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 108Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 110Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 139Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 141Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 158Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 160Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 187Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 189Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 209Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 211Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 228Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 230Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 295Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 297Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 315Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 317Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 334Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 336Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 361Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 363Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 380Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 382Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 409Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 411Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 431Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 433Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 450Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 452Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 515Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 517Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 535Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 537Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 554Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 556Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 581Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 583Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 600Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 602Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 629Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 631Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 651Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 653Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 670Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 672Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 759Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 761Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 779Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 781Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 798Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 800Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 825Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 827Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 844Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 846Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 873Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 875Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 895Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 897Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 914Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 916Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 993Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 995Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 1076Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 1078Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 1149Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 1151Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 1297Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 1299Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 1323Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 1325Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 1379Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 1381Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 1401Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 1403Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 1545Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 1547Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 1645Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 1647Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 2101Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 2103Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 2149Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 2151Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 2182Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 2184Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 2532Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 2534Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 2667Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 2669Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 2718Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 2720Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 2775Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 2777Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 2900Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 2902Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 3324Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 3326Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind) 3360Assert.Equal(TypeKind.Class, semanticInfo.Type.TypeKind) 3362Assert.Equal(TypeKind.Class, semanticInfo.ConvertedType.TypeKind) 3528Assert.Equal(TypeKind.Structure, semanticInfo.Type.TypeKind) 3530Assert.Equal(TypeKind.Structure, semanticInfo.ConvertedType.TypeKind)
Semantics\SelectCaseTests.vb (23)
30Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 62Assert.Equal(TypeKind.Structure, semanticSummary.Type.TypeKind) 64Assert.Equal(TypeKind.Structure, semanticSummary.ConvertedType.TypeKind) 98Assert.Equal(TypeKind.Structure, semanticSummary.Type.TypeKind) 100Assert.Equal(TypeKind.Structure, semanticSummary.ConvertedType.TypeKind) 137Assert.Equal(TypeKind.Structure, semanticSummary.Type.TypeKind) 139Assert.Equal(TypeKind.Structure, semanticSummary.ConvertedType.TypeKind) 210Assert.Equal(TypeKind.Delegate, semanticSummary.ConvertedType.TypeKind) 241Assert.Equal(TypeKind.Delegate, semanticSummary.Type.TypeKind) 243Assert.Equal(TypeKind.Delegate, semanticSummary.ConvertedType.TypeKind) 278Assert.Equal(TypeKind.Structure, semanticSummary.Type.TypeKind) 280Assert.Equal(TypeKind.Structure, semanticSummary.ConvertedType.TypeKind) 318Assert.Equal(TypeKind.Structure, semanticSummary.Type.TypeKind) 320Assert.Equal(TypeKind.Structure, semanticSummary.ConvertedType.TypeKind) 359Assert.Equal(TypeKind.Structure, semanticSummary.ConvertedType.TypeKind) 397Assert.Equal(TypeKind.Structure, semanticSummary.Type.TypeKind) 399Assert.Equal(TypeKind.Structure, semanticSummary.ConvertedType.TypeKind) 491Assert.Equal(TypeKind.Structure, semanticSummary.Type.TypeKind) 493Assert.Equal(TypeKind.Structure, semanticSummary.ConvertedType.TypeKind) 530Assert.Equal(TypeKind.Structure, semanticSummary.Type.TypeKind) 532Assert.Equal(TypeKind.Structure, semanticSummary.ConvertedType.TypeKind) 574Assert.Equal(TypeKind.Structure, semanticSummary.Type.TypeKind) 576Assert.Equal(TypeKind.Structure, semanticSummary.ConvertedType.TypeKind)
Semantics\SyncLockTests.vb (10)
241Assert.Equal(TypeKind.Delegate, semanticSummary.ConvertedType.TypeKind) 346Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 349Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 375Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 380Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 408Assert.Equal(TypeKind.Class, semanticSummary.ConvertedType.TypeKind) 438Assert.Equal(TypeKind.Delegate, semanticSummary.Type.TypeKind) 443Assert.Equal(TypeKind.Delegate, semanticSummary.Type.TypeKind) 468Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind) 473Assert.Equal(TypeKind.Class, semanticSummary.Type.TypeKind)
Semantics\UseSiteErrorTests.vb (35)
598Assert.Equal(TypeKind.Struct, compilation1.GetTypeByMetadataName("A").TypeKind) 599Assert.Equal(TypeKind.Enum, compilation1.GetTypeByMetadataName("B").TypeKind) 600Assert.Equal(TypeKind.Class, compilation1.GetTypeByMetadataName("C").TypeKind) 601Assert.Equal(TypeKind.Delegate, compilation1.GetTypeByMetadataName("D").TypeKind) 602Assert.Equal(TypeKind.Interface, compilation1.GetTypeByMetadataName("I1").TypeKind) 618Assert.Equal(TypeKind.Struct, compilation2.GetTypeByMetadataName("A").TypeKind) 619Assert.Equal(TypeKind.Enum, compilation2.GetTypeByMetadataName("B").TypeKind) 620Assert.Equal(TypeKind.Class, compilation2.GetTypeByMetadataName("C").TypeKind) 621Assert.Equal(TypeKind.Delegate, compilation2.GetTypeByMetadataName("D").TypeKind) 622Assert.Equal(TypeKind.Interface, compilation2.GetTypeByMetadataName("I1").TypeKind) 629Assert.Equal(TypeKind.Struct, compilation3.GetTypeByMetadataName("A").TypeKind) 630Assert.Equal(TypeKind.Enum, compilation3.GetTypeByMetadataName("B").TypeKind) 631Assert.Equal(TypeKind.Class, compilation3.GetTypeByMetadataName("C").TypeKind) 632Assert.Equal(TypeKind.Delegate, compilation3.GetTypeByMetadataName("D").TypeKind) 633Assert.Equal(TypeKind.Interface, compilation3.GetTypeByMetadataName("I1").TypeKind) 654Assert.Equal(TypeKind.Class, a.TypeKind) 656Assert.Equal(TypeKind.Class, b.TypeKind) 658Assert.Equal(TypeKind.Class, c.TypeKind) 660Assert.Equal(TypeKind.Class, d.TypeKind) 662Assert.Equal(TypeKind.Interface, i1.TypeKind) 671Assert.Equal(TypeKind.Struct, compilation5.GetTypeByMetadataName("A").TypeKind) 672Assert.Equal(TypeKind.Enum, compilation5.GetTypeByMetadataName("B").TypeKind) 673Assert.Equal(TypeKind.Class, compilation5.GetTypeByMetadataName("C").TypeKind) 674Assert.Equal(TypeKind.Delegate, compilation5.GetTypeByMetadataName("D").TypeKind) 675Assert.Equal(TypeKind.Interface, compilation5.GetTypeByMetadataName("I1").TypeKind) 696Assert.Equal(TypeKind.Class, a.TypeKind) 698Assert.Equal(TypeKind.Class, b.TypeKind) 700Assert.Equal(TypeKind.Class, c.TypeKind) 702Assert.Equal(TypeKind.Class, d.TypeKind) 704Assert.Equal(TypeKind.Interface, i1.TypeKind) 712Assert.Equal(TypeKind.Struct, compilation7.GetTypeByMetadataName("A").TypeKind) 713Assert.Equal(TypeKind.Enum, compilation7.GetTypeByMetadataName("B").TypeKind) 714Assert.Equal(TypeKind.Class, compilation7.GetTypeByMetadataName("C").TypeKind) 715Assert.Equal(TypeKind.Delegate, compilation7.GetTypeByMetadataName("D").TypeKind) 716Assert.Equal(TypeKind.Interface, compilation7.GetTypeByMetadataName("I1").TypeKind)
Semantics\XmlLiteralSemanticModelTests.vb (2)
530Assert.Equal(TypeKind.Error, semanticSummary.Type.TypeKind) 532Assert.Equal(TypeKind.Error, semanticSummary.ConvertedType.TypeKind)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (184)
SymbolsTests\AssemblyAndNamespaceTests.vb (1)
527Assert.Equal(TypeKind.Class, objectType.TypeKind)
SymbolsTests\CompilationCreationTests.vb (13)
1921Assert.Equal(TypeKind.[Class], type3.TypeKind) 1922Assert.Equal(TypeKind.[Interface], asm5(1).GlobalNamespace.GetTypeMembers("I1").Single().TypeKind) 2025Private Function HasSingleTypeOfKind(c As VisualBasicCompilation, kind As TypeKind, fullName As String) As Boolean 2047Assert.False(HasSingleTypeOfKind(c, TypeKind.Structure, "System.Int32")) 2049Assert.True(HasSingleTypeOfKind(c, TypeKind.Structure, "System.Int32")) 2050Assert.False(HasSingleTypeOfKind(c, TypeKind.Class, "System.Linq.Enumerable")) 2052Assert.True(HasSingleTypeOfKind(c, TypeKind.Class, "System.Linq.Enumerable")) 2053Assert.False(HasSingleTypeOfKind(c, TypeKind.Class, "System.Uri")) 2055Assert.False(HasSingleTypeOfKind(c, TypeKind.Class, "System.Linq.Enumerable")) 2056Assert.True(HasSingleTypeOfKind(c, TypeKind.Class, "System.Uri")) 2058Assert.False(HasSingleTypeOfKind(c, TypeKind.Class, "System.Uri")) 2059Assert.True(HasSingleTypeOfKind(c, TypeKind.Structure, "System.Int32")) 2061Assert.False(HasSingleTypeOfKind(c, TypeKind.Structure, "System.Int32"))
SymbolsTests\CorLibrary\CorTypes.vb (12)
26Assert.Equal(TypeKind.Error, t.TypeKind) 35Assert.Equal(TypeKind.Error, t.TypeKind) 44Assert.Equal(TypeKind.Error, p.TypeKind) 62Assert.Equal(TypeKind.Error, t.TypeKind) 64Assert.NotEqual(TypeKind.Error, t.TypeKind) 75Assert.Equal(TypeKind.Error, t.TypeKind) 77Assert.NotEqual(TypeKind.Error, t.TypeKind) 125Assert.NotEqual(TypeKind.Error, t.TypeKind) 127Assert.Equal(TypeKind.Error, t.TypeKind) 139Assert.Equal(TypeKind.Error, t.TypeKind) 169Assert.Equal(TypeKind.Error, t.TypeKind) 180Assert.Equal(TypeKind.Error, t.TypeKind)
SymbolsTests\ExtensionMethods\ExtensionMethodTests.vb (1)
1062Assert.Equal(TypeKind.Module, module2.TypeKind)
SymbolsTests\Metadata\MetadataTypeTests.vb (8)
78Assert.Equal(TypeKind.Module, a.TypeKind) 83Assert.Equal(TypeKind.Module, a.TypeKind) 121Assert.Equal(TypeKind.Class, class1.TypeKind) 174Assert.Equal(TypeKind.Class, type1.TypeKind) 229Assert.Equal(TypeKind.Interface, type1.TypeKind) 282Assert.Equal(TypeKind.Structure, type1.TypeKind) 339Assert.Equal(TypeKind.Array, type2.TypeKind) 340Assert.Equal(TypeKind.Array, type3.TypeKind)
SymbolsTests\Metadata\PE\LoadingEvents.vb (13)
162Assert.Equal(TypeKind.[Interface], [interface].TypeKind) 165Assert.Equal(TypeKind.[Class], [class].TypeKind) 177Assert.Equal(TypeKind.[Interface], [interface].TypeKind) 180Assert.Equal(TypeKind.[Class], [class].TypeKind) 195Assert.Equal(TypeKind.[Interface], [interface].TypeKind) 198Assert.Equal(TypeKind.[Class], [class].TypeKind) 213Assert.Equal(TypeKind.[Interface], defInterface.TypeKind) 216Assert.Equal(TypeKind.[Interface], defInterface.TypeKind) 219Assert.Equal(TypeKind.[Class], [class].TypeKind) 235Assert.Equal(TypeKind.[Interface], outerInterface.TypeKind) 239Assert.Equal(TypeKind.[Class], outerClass.TypeKind) 242Assert.Equal(TypeKind.[Interface], innerInterface.TypeKind) 257Assert.Equal(TypeKind.[Class], innerClass.TypeKind)
SymbolsTests\Metadata\PE\LoadingGenericTypeParameters.vb (1)
74Assert.Equal(TypeKind.TypeParameter, C1_T.TypeKind)
SymbolsTests\Metadata\PE\LoadingMethods.vb (18)
384Assert.Equal(TypeKind.Interface, [interface].TypeKind) 389Assert.Equal(TypeKind.Class, [class].TypeKind) 407Assert.Equal(TypeKind.Interface, interface1.TypeKind) 412Assert.Equal(TypeKind.Interface, interface2.TypeKind) 417Assert.Equal(TypeKind.Class, [class].TypeKind) 439Assert.Equal(TypeKind.Interface, [interface].TypeKind) 445Assert.Equal(TypeKind.Class, [class].TypeKind) 471Assert.Equal(TypeKind.Interface, [interface].TypeKind) 477Assert.Equal(TypeKind.Class, [class].TypeKind) 502Assert.Equal(TypeKind.Interface, cyclicInterface.TypeKind) 505Assert.Equal(TypeKind.Interface, implementedInterface.TypeKind) 510Assert.Equal(TypeKind.Class, [class].TypeKind) 534Assert.Equal(TypeKind.Interface, [interface].TypeKind) 537Assert.Equal(TypeKind.Class, [class].TypeKind) 564Assert.Equal(TypeKind.Interface, outerInterface.TypeKind) 570Assert.Equal(TypeKind.Class, outerClass.TypeKind) 574Assert.Equal(TypeKind.Interface, innerInterface.TypeKind) 595Assert.Equal(TypeKind.Class, innerClass.TypeKind)
SymbolsTests\Metadata\PE\NoPia.vb (4)
194Assert.Equal(TypeKind.[Interface], param(0).[Type].TypeKind) 195Assert.Equal(TypeKind.[Interface], param(1).[Type].TypeKind) 468Assert.Equal(TypeKind.[Interface], param(0).[Type].TypeKind) 469Assert.Equal(TypeKind.[Interface], param(1).[Type].TypeKind)
SymbolsTests\Metadata\PE\NoPiaInstantiationOfGenericClassAndStruct.vb (2)
123If m.ReturnType.TypeKind <> TypeKind.Structure Then 374If m.ReturnType.TypeKind <> TypeKind.Structure Then
SymbolsTests\Metadata\PE\TypeForwarders.vb (1)
94Assert.NotEqual(TypeKind.Error, funcType.TypeKind)
SymbolsTests\Metadata\PE\TypeKindTests.vb (7)
36Assert.Equal(TypeKind.Class, obj.TypeKind) 41Assert.Equal(TypeKind.Class, [enum].TypeKind) 46Assert.Equal(TypeKind.Structure, int32.TypeKind) 51Assert.Equal(TypeKind.Delegate, func.TypeKind) 59Assert.Equal(TypeKind.Interface, ienumerable.TypeKind) 65Assert.Equal(TypeKind.Enum, typeCode.TypeKind) 94Assert.Equal(TypeKind.Class, multicastDelegate.TypeKind)
SymbolsTests\MockSymbolTests.vb (2)
48Dim container As NamedTypeSymbol = New MockNamedTypeSymbol("TestClass", Enumerable.Empty(Of Symbol), TypeKind.Class) 94result = New MockNamedTypeSymbol(name, childSymbols, TypeKind.Class)
SymbolsTests\RefStructInterfacesTests.vb (1)
227Assert.Equal(TypeKind.Interface, type2.TypeKind)
SymbolsTests\Retargeting\NoPia.vb (2)
479Assert.Equal(TypeKind.[Interface], param(0).[Type].TypeKind) 480Assert.Equal(TypeKind.[Interface], param(1).[Type].TypeKind)
SymbolsTests\Retargeting\RetargetingTests.vb (14)
363Assert.Equal(TypeKind.Error, sourceType.BaseType.TypeKind) 365Assert.Equal(TypeKind.Error, sourceType.EnumUnderlyingType.TypeKind) 372Assert.Equal(TypeKind.Error, retargetingType.BaseType.TypeKind) 374Assert.Equal(TypeKind.Error, retargetingType.EnumUnderlyingType.TypeKind) 401Assert.Equal(TypeKind.Error, sourceType.BaseType.TypeKind) 403Assert.Equal(TypeKind.Error, sourceType.EnumUnderlyingType.TypeKind) 410Assert.Equal(TypeKind.Error, retargetingType.BaseType.TypeKind) 412Assert.Equal(TypeKind.Error, retargetingType.EnumUnderlyingType.TypeKind) 541Assert.Equal(TypeKind.Error, sourceType.BaseType.TypeKind) 547Assert.Equal(TypeKind.Error, retargetingType.BaseType.TypeKind) 675Assert.Equal(TypeKind.Error, sourceTypeParameterConstraint.TypeKind) 682Assert.Equal(TypeKind.Error, retargetingTypeParameterConstraint.TypeKind) 1014Assert.Equal(TypeKind.Delegate, CType(sourceType.GetMembers.Item(1), SourceNamedTypeSymbol).TypeKind) 1015Assert.Equal(TypeKind.Delegate, CType(sourceType.GetMembers.Item(2), SourceNamedTypeSymbol).TypeKind)
SymbolsTests\Source\BaseClassTests.vb (1)
2229Assert.Equal(TypeKind.Class, derived.TypeKind)
SymbolsTests\Source\BindingsTests.vb (19)
180Assert.Equal(TypeKind.Class, DirectCast(typeContext.ContainingNamespaceOrType, NamedTypeSymbol).TypeKind) 187Assert.Equal(TypeKind.Interface, DirectCast(typeContext.ContainingNamespaceOrType, NamedTypeSymbol).TypeKind) 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) 471Assert.Equal(TypeKind.Error, sysCollectionsType.TypeKind) 477Assert.Equal(TypeKind.Class, importsOrangeSymInfo.Type.TypeKind) 488Assert.Equal(TypeKind.Class, importsYellowSymInfo.Type.TypeKind) 500Assert.Equal(TypeKind.Error, interfaceIAmbigSymInfo.Type.TypeKind) 508Assert.Equal(TypeKind.Interface, DirectCast(sortedSymbols(0), NamedTypeSymbol).TypeKind) 511Assert.Equal(TypeKind.Interface, DirectCast(sortedSymbols(1), NamedTypeSymbol).TypeKind) 518Assert.Equal(TypeKind.Class, classYellowSymInfo.Type.TypeKind) 524Assert.Equal(TypeKind.Class, DirectCast(symbols(0), NamedTypeSymbol).TypeKind) 532Assert.Equal(TypeKind.Error, elvisSymInfo.Type.TypeKind) 539Assert.Equal(TypeKind.Interface, iEnumSymInfo.Type.TypeKind) 681Assert.Equal(TypeKind.Class, info.Type.TypeKind)
SymbolsTests\Source\DelegateTests.vb (1)
246Assert.Equal(TypeKind.Delegate, funcDel.TypeKind)
SymbolsTests\Source\EnumTests.vb (1)
908Assert.Equal(TypeKind.Enum, member.Type.TypeKind)
SymbolsTests\Source\EventTests.vb (10)
22Imports TypeKind = Microsoft.CodeAnalysis.TypeKind 1569Assert.Equal(TypeKind.Structure, semanticSummary.Type.TypeKind) 1571Assert.Equal(TypeKind.Structure, semanticSummary.ConvertedType.TypeKind) 1607Assert.Equal(TypeKind.Delegate, semanticSummary.Type.TypeKind) 1609Assert.Equal(TypeKind.Delegate, semanticSummary.ConvertedType.TypeKind) 1645Assert.Equal(TypeKind.Delegate, semanticSummary.Type.TypeKind) 1647Assert.Equal(TypeKind.Delegate, semanticSummary.ConvertedType.TypeKind) 1685Assert.Equal(TypeKind.Delegate, semanticSummary.Type.TypeKind) 1687Assert.Equal(TypeKind.Delegate, semanticSummary.ConvertedType.TypeKind) 1718Assert.Equal(TypeKind.Delegate, DirectCast(mems(0), NamedTypeSymbol).TypeKind)
SymbolsTests\Source\FieldTests.vb (3)
104Assert.Equal(TypeKind.Class, classD.TypeKind) 149Assert.Equal(TypeKind.Array, fieldU.Type.TypeKind) 158Assert.Equal(TypeKind.Array, fieldV.Type.TypeKind) ' v is a 2d array of a 1d array.
SymbolsTests\Source\MethodTests.vb (5)
61Assert.Equal(TypeKind.Class, classD.TypeKind) 477Assert.Equal(TypeKind.Class, classD.TypeKind) 536Assert.Equal(TypeKind.Array, m2p4.Type.TypeKind) 626Assert.Equal(TypeKind.Class, classD.TypeKind) 996Assert.Equal(TypeKind.Structure, mem4.Type.TypeKind)
SymbolsTests\Source\PropertyTests.vb (4)
5399Assert.Equal(TypeKind.[Interface], [interface].TypeKind) 5404Assert.Equal(TypeKind.[Class], [class].TypeKind) 5442Assert.Equal(TypeKind.[Interface], [interface].TypeKind) 5447Assert.Equal(TypeKind.[Class], [class].TypeKind)
SymbolsTests\Source\TypeBindingTests.vb (4)
44Assert.Equal(TypeKind.Array, typeA.TypeKind) 53Assert.Equal(TypeKind.Array, typeB.TypeKind) 87Assert.Equal(TypeKind.Structure, typeA.TypeKind) 239Assert.Equal(TypeKind.Array, typeH.TypeKind)
SymbolsTests\Source\TypeTests.vb (21)
93Assert.Equal(TypeKind.Interface, ifaceA.TypeKind) 111Assert.Equal(TypeKind.Class, classB.TypeKind) 128Assert.Equal(TypeKind.Delegate, delegateB.TypeKind) 149Assert.Equal(TypeKind.Enum, enumE.TypeKind) 164Assert.Equal(TypeKind.Structure, structI.TypeKind) 179Assert.Equal(TypeKind.Module, moduleM.TypeKind) 241Assert.Equal(TypeKind.Class, outerClass.TypeKind) 257Assert.Equal(TypeKind.Class, i1Class.TypeKind) 267Assert.Equal(TypeKind.Interface, i3Interface.TypeKind) 277Assert.Equal(TypeKind.Enum, i4Enum.TypeKind) 291Assert.Equal(TypeKind.Structure, i2Arity1.TypeKind) 305Assert.Equal(TypeKind.Structure, i2Arity2.TypeKind) 554Assert.Equal(TypeKind.Enum, enumE.TypeKind) 607Assert.Equal(TypeKind.Class, classA.TypeKind) 617Assert.Equal(TypeKind.Interface, igoo.TypeKind) 627Assert.Equal(TypeKind.Structure, structS.TypeKind) 695Assert.Equal(TypeKind.Class, varA.Type.TypeKind) 737Assert.Equal(TypeKind.Structure, mem1.Type.TypeKind) 745Assert.Equal(TypeKind.Array, mem2.ReturnType.TypeKind) 757Assert.Equal(TypeKind.Array, param.Type.TypeKind) 927Assert.Equal(TypeKind.Interface, type2.TypeKind)
SymbolsTests\SymbolErrorTests.vb (1)
22507Assert.Equal(TypeKind.Error, errTypeSym.TypeKind)
SymbolsTests\WellKnownTypeValidationTests.vb (14)
38Assert.Equal(TypeKind.Error, special.TypeKind) 43Assert.Equal(TypeKind.Class, lookup.TypeKind) 122Assert.Equal(TypeKind.Structure, special.TypeKind) 126Assert.Equal(TypeKind.Structure, lookup.TypeKind) 160Assert.Equal(TypeKind.Class, wellKnown.TypeKind) 163Assert.Equal(TypeKind.Error, wellKnown.TypeKind) 168Assert.Equal(TypeKind.Class, lookup.TypeKind) 210Assert.Equal(If(wellKnown.DeclaringCompilation Is comp, TypeKind.Enum, TypeKind.Error), wellKnown.TypeKind) 213Assert.Equal(TypeKind.Enum, lookup.TypeKind) 300Assert.Equal(TypeKind.Class, wellKnown.TypeKind) 303Assert.Equal(TypeKind.Class, lookup.TypeKind) 416Assert.Equal(TypeKind.Class, wellKnown.TypeKind) 441Assert.Equal(TypeKind.Error, wellKnown.TypeKind)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (13)
Extensions.vb (6)
224Dim typeSymTypeKind As TypeKind = typeSym.TypeKind 225If typeSymTypeKind = TypeKind.Interface OrElse typeSymTypeKind = TypeKind.Class OrElse 226typeSymTypeKind = TypeKind.Structure OrElse typeSymTypeKind = TypeKind.Delegate Then 260ElseIf typeSymTypeKind = TypeKind.Array Then
MockSymbols.vb (7)
47Return GetTypeMembers().WhereAsArray(Function(t) t.TypeKind = TypeKind.Module) 51Return GetTypeMembers(name).WhereAsArray(Function(t) t.TypeKind = TypeKind.Module) 125Private ReadOnly _kind As TypeKind 129Public Sub New(name As String, children As IEnumerable(Of Symbol), Optional kind As TypeKind = TypeKind.Class) 347Public Overrides ReadOnly Property TypeKind As TypeKind 355Return _kind = TypeKind.Interface
Microsoft.CodeAnalysis.VisualBasic.Workspaces (36)
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 (3)
328objectCreationType.TypeKind = TypeKind.Delegate Then 800Return DirectCast(symbol, INamedTypeSymbol).TypeKind = TypeKind.Enum 803Return target.IsType AndAlso DirectCast(target, ITypeSymbol).TypeKind = TypeKind.Enum
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 (4)
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 712Return lambdaTypes.Where(Function(t) t.InferredType.TypeKind = TypeKind.Delegate).SelectMany(Function(t) t.InferredType.GetMembers(WellKnownMemberNames.DelegateInvokeName).OfType(Of IMethodSymbol)().Select(Function(m) New TypeInferenceInfo(m.ReturnType)))
Microsoft.CodeAnalysis.Workspaces (145)
Classification\ClassificationExtensions.cs (8)
12TypeKind.Class => type.IsRecord ? ClassificationTypeNames.RecordClassName : ClassificationTypeNames.ClassName, 13TypeKind.Module => ClassificationTypeNames.ModuleName, 14TypeKind.Struct => type.IsRecord ? ClassificationTypeNames.RecordStructName : ClassificationTypeNames.StructName, 15TypeKind.Interface => ClassificationTypeNames.InterfaceName, 16TypeKind.Enum => ClassificationTypeNames.EnumName, 17TypeKind.Delegate => ClassificationTypeNames.DelegateName, 18TypeKind.TypeParameter => ClassificationTypeNames.TypeParameterName, 19TypeKind.Dynamic => ClassificationTypeNames.Keyword,
Editing\SymbolEditorExtensions.cs (1)
30if (baseOrInterfaceType.TypeKind != TypeKind.Error)
Editing\SyntaxGenerator.cs (10)
761TypeKind.Class => ClassDeclaration( 770TypeKind.Struct => StructDeclaration( 778TypeKind.Interface => InterfaceDeclaration( 784TypeKind.Enum => EnumDeclaration( 791TypeKind.Delegate => type.GetMembers(WellKnownMemberNames.DelegateInvokeName) is [IMethodSymbol invoke, ..] 847case TypeKind.Class: 848case TypeKind.Struct: 849case TypeKind.Interface: 850case TypeKind.Enum: 851case TypeKind.Delegate:
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 (5)
22if (type?.TypeKind == TypeKind.Interface) 54t => t.TypeKind is TypeKind.Class or 55TypeKind.Struct or 56TypeKind.Delegate or 57TypeKind.Enum);
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 (2)
129if (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)
147if (namedType.TypeKind == TypeKind.Delegate ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (10)
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)
165return symbol is { ContainingType.TypeKind: TypeKind.Class, IsSealed: false } && 173symbol.ContainingType.TypeKind == TypeKind.Interface) 213=> symbol is ITypeSymbol { TypeKind: TypeKind.Error }; 216=> symbol is ITypeSymbol { TypeKind: TypeKind.Module }; 219=> symbol is ITypeSymbol { TypeKind: TypeKind.Interface }; 270=> symbol is { ContainingType.TypeKind: TypeKind.Module }; 294=> symbol is ITypeSymbol { TypeKind: TypeKind.Delegate }; 685if (!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 (12)
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(); 265case TypeKind.Array: 266case TypeKind.Delegate: 635if (type != null && type.IsValueType && type.TypeKind == TypeKind.Enum) 687if (type.TypeKind != TypeKind.Struct)
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\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (13)
125private static readonly SymbolKindOrTypeKind _class = new(TypeKind.Class); 126private static readonly SymbolKindOrTypeKind _struct = new(TypeKind.Struct); 127private static readonly SymbolKindOrTypeKind _interface = new(TypeKind.Interface); 128private static readonly SymbolKindOrTypeKind _enum = new(TypeKind.Enum); 134private static readonly SymbolKindOrTypeKind _delegate = new(TypeKind.Delegate); 380case TypeKind.Class: 383case TypeKind.Struct: 386case TypeKind.Interface: 389case TypeKind.Enum: 392case TypeKind.Delegate: 395case TypeKind.Module: 398case TypeKind.Pointer: 401case TypeKind.TypeParameter:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleRules.cs (2)
68if (containingType.TypeKind is not TypeKind.Class and not TypeKind.Struct)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (19)
67new SymbolKindOrTypeKind(TypeKind.Class), 68new SymbolKindOrTypeKind(TypeKind.Struct), 69new SymbolKindOrTypeKind(TypeKind.Interface), 70new SymbolKindOrTypeKind(TypeKind.Delegate), 71new SymbolKindOrTypeKind(TypeKind.Enum), 72new SymbolKindOrTypeKind(TypeKind.Module), 73new SymbolKindOrTypeKind(TypeKind.Pointer), 80new SymbolKindOrTypeKind(TypeKind.TypeParameter), 298foreach (var typeKindElement in symbolKindListElement.Elements(nameof(TypeKind))) 349public SymbolKindOrTypeKind(TypeKind typeKind) 360public TypeKind? TypeKind => (_category == SymbolCategory.Type) ? (TypeKind)_kind : null; 367SymbolCategory.Type => symbol is ITypeSymbol type && type.TypeKind == (TypeKind)_kind, 376SymbolCategory.Type => new XElement(nameof(TypeKind), GetTypeKindString((TypeKind)_kind)), 381private static string GetTypeKindString(TypeKind typeKind) 388CodeAnalysis.TypeKind.Structure => nameof(CodeAnalysis.TypeKind.Struct), 438=> new((TypeKind)Enum.Parse(typeof(TypeKind), typeKindElement.Value));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
410if (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 (3)
241private static TypeKind GetTypeKind(INamedTypeSymbol x) 245TypeKind.Module => TypeKind.Class,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (7)
283var xTypeKind = GetTypeKind(x); 284var yTypeKind = GetTypeKind(y); 286if (xTypeKind == TypeKind.Error || 287yTypeKind == TypeKind.Error) 304var typeKind1 = GetTypeKind(type1); 307var typeKind2 = GetTypeKind(type2); 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\CodeGenerationSymbolFactory.cs (3)
422TypeKind typeKind, string name, 441bool isRecord, TypeKind typeKind, string name, 492typeKind: TypeKind.Delegate,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationArrayTypeSymbol.cs (2)
43public override TypeKind TypeKind => TypeKind.Array;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructedNamedTypeSymbol.cs (1)
93public override TypeKind TypeKind => _constructedFrom.TypeKind;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamedTypeSymbol.cs (3)
34TypeKind typeKind, 68public override TypeKind TypeKind { get; } 100return this.TypeKind == TypeKind.Delegate
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPointerTypeSymbol.cs (2)
19public override TypeKind TypeKind => TypeKind.Pointer;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeParameterSymbol.cs (2)
60public override TypeKind TypeKind => TypeKind.TypeParameter;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeSymbol.cs (3)
36public abstract TypeKind TypeKind { get; } 48public bool IsValueType => TypeKind is TypeKind.Struct or TypeKind.Enum;
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.Workspaces.Test.Utilities (1)
Options\OptionsTestHelpers.cs (1)
154ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(TypeKind.Class)),
Microsoft.CodeAnalysis.Workspaces.UnitTests (8)
CodeStyle\NamingStylePreferencesUpgradeTests.cs (3)
190[InlineData(typeof(TypeKind), nameof(TypeKind.Struct), nameof(TypeKind.Structure))]
EditorConfigParsing\NamingStyleParserTests.cs (5)
157symbolKind => Assert.Equal(new SymbolKindOrTypeKind(TypeKind.Class), symbolKind), 158symbolKind => Assert.Equal(new SymbolKindOrTypeKind(TypeKind.Struct), symbolKind), 159symbolKind => Assert.Equal(new SymbolKindOrTypeKind(TypeKind.Interface), symbolKind), 160symbolKind => Assert.Equal(new SymbolKindOrTypeKind(TypeKind.Enum), symbolKind), 166symbolKind => Assert.Equal(new SymbolKindOrTypeKind(TypeKind.Delegate), symbolKind),
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 (7)
Parsing\Parser.LogProperties.cs (5)
20private static readonly HashSet<TypeKind> _allowedTypeKinds = [TypeKind.Class, TypeKind.Struct, TypeKind.Interface]; 308|| (property.Type.TypeKind == TypeKind.Delegate)
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 (6)
Parser.cs (6)
574returnType.TypeKind != TypeKind.Error) 625if (strongTypeSymbol.TypeKind == TypeKind.Class) 685TypeKind kind; 726if (kind == TypeKind.Enum) 756if (kind == TypeKind.Class) 814if (kind == TypeKind.Struct && specialType == SpecialType.None)
Microsoft.Gen.MetricsReports (6)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (6)
574returnType.TypeKind != TypeKind.Error) 625if (strongTypeSymbol.TypeKind == TypeKind.Class) 685TypeKind kind; 726if (kind == TypeKind.Enum) 756if (kind == TypeKind.Class) 814if (kind == TypeKind.Struct && specialType == SpecialType.None)
Microsoft.Interop.ComInterfaceGenerator (7)
Analyzers\AddGeneratedComClassAnalyzer.cs (1)
42if (type.TypeKind != TypeKind.Class)
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (3)
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 (21)
BlittableTypeMarshallingInfoProvider.cs (3)
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 (5)
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 (3)
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 (78)
CommonControls\MemberSelectionViewModel.cs (4)
31TypeKind destinationTypeKind = TypeKind.Class, 141public void UpdateMembersBasedOnDestinationKind(TypeKind destinationType) 146var isInterface = destinationType == TypeKind.Interface;
ExtractClass\ExtractClassViewModel.cs (1)
41destinationTypeKind: TypeKind.Class);
ExtractInterface\ExtractInterfaceDialogViewModel.cs (1)
42destinationTypeKind: TypeKind.Interface,
GenerateType\GenerateTypeDialogViewModel.cs (10)
35private Dictionary<string, TypeKind> _typeKindMap; 135public TypeKind SelectedTypeKind 144private void PopulateTypeKind(TypeKind typeKind, string csharpKey, string visualBasicKey) 153private void PopulateTypeKind(TypeKind typeKind, string visualBasicKey) 209PopulateTypeKind(TypeKind.Class, "class", "Class"); 214PopulateTypeKind(TypeKind.Enum, "enum", "Enum"); 219PopulateTypeKind(TypeKind.Structure, "struct", "Structure"); 224PopulateTypeKind(TypeKind.Interface, "interface", "Interface"); 229PopulateTypeKind(TypeKind.Delegate, "delegate", "Delegate"); 235PopulateTypeKind(TypeKind.Module, "Module");
Implementation\ContainedLanguageRefactorNotifyService.cs (1)
77else if (symbol is INamedTypeSymbol && (symbol as INamedTypeSymbol).TypeKind == TypeKind.Class)
Library\ObjectBrowser\AbstractDescriptionBuilder.cs (5)
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)
19public TypeKind Kind { get; }
Library\ObjectBrowser\ObjectList.cs (8)
198case TypeKind.Interface: 202case TypeKind.Struct: 206case TypeKind.Enum: 210case TypeKind.Delegate: 214case TypeKind.Class: 218case TypeKind.Module: 438if (typeSymbol.TypeKind == TypeKind.Module) 443if (typeSymbol.TypeKind == TypeKind.Interface && typeSymbol.Interfaces.IsEmpty)
Library\VsNavInfo\NavInfoFactory.cs (6)
81else if (typeSymbol.TypeKind == TypeKind.Pointer) 85else if (typeSymbol.TypeKind == TypeKind.Array) 97if (typeSymbol.TypeKind is TypeKind.Error or 98TypeKind.Unknown or 99TypeKind.Dynamic or 100TypeKind.TypeParameter)
Progression\GraphBuilder.cs (8)
572case TypeKind.Class: 577case TypeKind.Delegate: 582case TypeKind.Enum: 587case TypeKind.Interface: 592case TypeKind.Module: 597case TypeKind.Struct: 602case TypeKind.Error: 642if (field.ContainingType.TypeKind == TypeKind.Enum)
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\GraphProvider.cs (18)
200IsAnyTypeKind(n, TypeKind.Class, TypeKind.Interface, TypeKind.Struct, TypeKind.Enum, TypeKind.Delegate))) 227IsAnyTypeKind(n, TypeKind.Class, TypeKind.Struct))) 245IsAnyTypeKind(n, TypeKind.Class, TypeKind.Struct))) 257IsAnyTypeKind(n, TypeKind.Class, TypeKind.Struct) && 273IsAnyTypeKind(n, TypeKind.Interface))) 284IsAnyTypeKind(n, TypeKind.Interface))) 295IsAnyTypeKind(n, TypeKind.Class, TypeKind.Struct) && 307IsAnyTypeKind(n, TypeKind.Class, TypeKind.Struct) && 343private static bool IsAnyTypeKind(GraphNode node, params TypeKind[] typeKinds)
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)
Progression\RoslynGraphProperties.cs (1)
80dataType: typeof(TypeKind),
Microsoft.VisualStudio.LanguageServices.CSharp (29)
CodeModel\CSharpCodeModelService.cs (14)
682if (typeSymbol.TypeKind == TypeKind.Unknown) 695if (typeSymbol.TypeKind == TypeKind.Array) 699else if (typeSymbol.TypeKind == TypeKind.Pointer) 704typeSymbol.TypeKind is TypeKind.Dynamic or 705TypeKind.Unknown) 754if (typeSymbol.TypeKind is TypeKind.Class or 755TypeKind.Interface or 756TypeKind.Enum or 757TypeKind.Struct or 758TypeKind.Delegate) 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 (13)
35Debug.Assert(typeSymbol.TypeKind == TypeKind.Delegate); 71case TypeKind.Enum: 75case TypeKind.Struct: 79case TypeKind.Interface: 83case TypeKind.Class: 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 (16)
GlyphExtensionsTests.cs (16)
71pointedAtType: (INamedTypeSymbol)CreateSymbolMock(SymbolKind.NamedType, typeKind: TypeKind.Class)); 80containingType: (INamedTypeSymbol)CreateSymbolMock(SymbolKind.NamedType, typeKind: TypeKind.Enum)); 100elementType: (INamedTypeSymbol)CreateSymbolMock(SymbolKind.NamedType, typeKind: TypeKind.Class)); 105target: (INamedTypeSymbol)CreateSymbolMock(SymbolKind.NamedType, typeKind: TypeKind.Class)); 115typeKind: TypeKind.Class); 119typeKind: TypeKind.Delegate); 123typeKind: TypeKind.Enum); 127typeKind: TypeKind.Module); 131typeKind: TypeKind.Interface); 135typeKind: TypeKind.Struct); 139typeKind: TypeKind.Error); 145typeKind: TypeKind.Unknown)); 187TypeKind typeKind = TypeKind.Unknown) 204TypeKind typeKind = TypeKind.Unknown)
Microsoft.VisualStudio.LanguageServices.UnitTests (1)
CommonControls\MemberSelectionViewModelTests.vb (1)
98viewModel.UpdateMembersBasedOnDestinationKind(TypeKind.Interface)
Microsoft.VisualStudio.LanguageServices.VisualBasic (49)
CodeModel\Extenders\GenericExtender.vb (19)
12Imports TypeKind = Microsoft.CodeAnalysis.TypeKind 36Case TypeKind.Class, 37TypeKind.Module, 38TypeKind.Structure, 39TypeKind.Delegate, 40TypeKind.Enum 44Case TypeKind.Interface 49Case TypeKind.Class, 50TypeKind.Structure 64Case TypeKind.Class, 65TypeKind.Module, 66TypeKind.Structure, 67TypeKind.Delegate, 68TypeKind.Enum 79Case TypeKind.Interface 86Case TypeKind.Class, 87TypeKind.Structure 93Case TypeKind.Delegate, 94TypeKind.Enum
CodeModel\MethodXML\MethodXmlBuilder.vb (3)
80If type.TypeKind = TypeKind.Array AndAlso 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 (15)
30Debug.Assert(typeSymbol.TypeKind = TypeKind.Delegate) 68Case TypeKind.Class 70Case TypeKind.Interface 72Case TypeKind.Module 74Case TypeKind.Structure 76Case TypeKind.Enum 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)
33public TypeKind TypeKind { get; }