381 references to Error
ConfigurationSchemaGenerator (2)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (2)
69type.TypeKind is TypeKind.TypeParameter or TypeKind.Pointer or TypeKind.Error || 841if (typeArg.TypeKind is TypeKind.TypeParameter or TypeKind.Error ||
ILLink.RoslynAnalyzer (1)
TrimAnalysis\SingleValueExtensions.cs (1)
23 TypeKind.Error => new SystemTypeValue (new TypeProxy (type)),
Microsoft.AspNetCore.Mvc.Analyzers (3)
AttributesShouldNotBeAppliedToPageModelAnalyzer.cs (1)
26if (typeCache.PageModelAttribute == null || typeCache.PageModelAttribute.TypeKind == TypeKind.Error)
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 (2)
ApiControllerFacts.cs (1)
18if (method.ReturnsVoid || method.ReturnType.TypeKind == TypeKind.Error)
ApiControllerSymbolCache.cs (1)
129return typeSymbol != null && typeSymbol.TypeKind != TypeKind.Error;
Microsoft.CodeAnalysis (4)
MetadataReader\MetadataDecoder.cs (3)
400Debug.Assert(!refersToNoPiaLocalType || generic.TypeKind == TypeKind.Error); 2144if (type.TypeKind == TypeKind.Error) 2155if (type.TypeKind == TypeKind.Error)
Symbols\TypedConstant.cs (1)
186case TypeKind.Error:
Microsoft.CodeAnalysis.CodeStyle (6)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
213=> symbol is ITypeSymbol { TypeKind: TypeKind.Error };
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (1)
193typeArg.TypeKind != TypeKind.Error &&
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\SymbolEquivalenceComparer.EquivalenceVisitor.cs (2)
286if (xTypeKind == TypeKind.Error || 287yTypeKind == TypeKind.Error)
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorsService.State.cs (1)
58baseType.TypeKind == TypeKind.Error)
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.CSharp (49)
Binder\Binder_Attributes.cs (1)
58if (boundTypeSymbol.TypeKind != TypeKind.Error)
Binder\Binder_Constraints.cs (1)
584case TypeKind.Error:
Binder\Binder_Crefs.cs (2)
581case TypeKind.Error: 994Debug.Assert(type.TypeKind != TypeKind.Error || typeSyntax.ContainsDiagnostics || !typeSyntax.SyntaxTree.ReportDocumentationCommentDiagnostics(), "Why wasn't there a diagnostic?");
Binder\Binder_Expressions.cs (2)
5156case TypeKind.Error: 6909Debug.Assert(coClassType.TypeKind == TypeKind.Class || coClassType.TypeKind == TypeKind.Error);
Binder\Binder_Lookup.cs (1)
202case TypeKind.Error:
Binder\Binder_Operators.cs (2)
3211return targetType.TypeKind == TypeKind.Error; 3728if (operand.HasAnyErrors || targetTypeKind == TypeKind.Error)
Binder\Binder_Statements.cs (1)
2309if (targetType.TypeKind == TypeKind.Error)
Binder\Semantics\Conversions\UserDefinedExplicitConversions.cs (1)
262if (op.ReturnsVoid || op.ParameterCount != 1 || op.ReturnType.TypeKind == TypeKind.Error)
BoundTree\BoundDagTest.cs (1)
83var typeName = b.Type.TypeKind == TypeKind.Error ? "<error type>" : b.Type.ToString();
Compilation\CSharpSemanticModel.cs (2)
546if (varTypeInfo.Type is { TypeKind: not TypeKind.Error }) 976if (varTypeInfo.Type is { TypeKind: not TypeKind.Error })
Compiler\ClsComplianceChecker.cs (2)
995case TypeKind.Error: 1032if (type.TypeKind == TypeKind.Error)
SymbolDisplay\SymbolDisplayVisitor.cs (1)
312if (type != null && type.TypeKind != TypeKind.Error)
SymbolDisplay\SymbolDisplayVisitor.Types.cs (4)
279var shouldSkip = namespaceSymbol.IsGlobalNamespace && symbol.TypeKind == TypeKind.Error; 502if (tupleSymbol.TypeKind == TypeKind.Error || 570if (symbol.TypeKind == TypeKind.Error && 610case TypeKind.Error:
SymbolDisplay\SymbolDisplayVisitor_Minimal.cs (1)
152if (symbol.TypeKind != TypeKind.Error)
Symbols\AssemblySymbol.cs (1)
1029if (result is null || result.TypeKind == TypeKind.Error)
Symbols\ConstraintsHelper.cs (1)
274case TypeKind.Error:
Symbols\ErrorTypeSymbol.cs (1)
229return TypeKind.Error;
Symbols\ExtendedErrorTypeSymbol.cs (6)
224if ((object?)oldSymbol == null || oldSymbol.TypeKind != TypeKind.Error) 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\Metadata\PE\NativeIntegerTypeDecoder.cs (1)
102Debug.Assert(type.TypeKind == TypeKind.Error);
Symbols\NamedTypeSymbol.cs (1)
390return kind != TypeKind.Enum && kind != TypeKind.Struct && kind != TypeKind.Error;
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\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\SourceNamedTypeSymbol_Bases.cs (4)
312else if (baseType.TypeKind == TypeKind.Error && (object)partBase != null) 319else if ((object)partBase != null && !TypeSymbol.Equals(partBase, baseType, TypeCompareKind.ConsiderEverything) && partBase.TypeKind != TypeKind.Error) 508if (baseType.TypeKind == TypeKind.Error) 604case TypeKind.Error:
Symbols\TypeParameterSymbol.cs (1)
415case TypeKind.Error:
Symbols\TypeSymbolExtensions.cs (3)
849case TypeKind.Error: 1516case TypeKind.Error: 2003if (taskType.TypeKind == TypeKind.Error)
Symbols\VarianceSafety.cs (1)
375case TypeKind.Error:
Utilities\TypeSymbolExtensions.cs (2)
188case TypeKind.Error: 278case TypeKind.Error:
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (2)
308if (originalConvertedType is null || originalConvertedType.TypeKind == TypeKind.Error) 349if (rewrittenConvertedType is null || rewrittenConvertedType.TypeKind == TypeKind.Error || !rewrittenConversion.Exists)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
85if (type != null && type.TypeKind != TypeKind.Error)
src\Analyzers\CSharp\CodeFixes\UseExplicitTypeForConst\UseExplicitTypeForConstCodeFixProvider.cs (1)
47if (type == null || type.TypeKind == TypeKind.Error || type.IsAnonymousType)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.ExpressionSyntaxGeneratorVisitor.cs (1)
67if (symbol.TypeKind != TypeKind.Error)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (2)
195if (symbol.TypeKind == TypeKind.Error && symbol.Name == "var") 294if (symbol.TypeKind != TypeKind.Error)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (6)
Workspaces\WorkspaceTests_EditorFeatures.cs (6)
502Assert.NotEqual(TypeKind.Error, classC.TypeKind); 524Assert.Equal(TypeKind.Error, 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 (3)
CodeGen\CodeGenAwaitUsingTests.cs (1)
3057Assert.Equal(TypeKind.Error, comp.GetWellKnownType(WellKnownType.System_IAsyncDisposable).TypeKind);
CodeGen\CodeGenTupleTest.cs (2)
3350Assert.Equal(TypeKind.Error, mTuple.TupleUnderlyingType.TypeKind); 3353Assert.Equal(TypeKind.Error, mTuple.TypeKind);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (12)
Semantics\OutVarTests.cs (7)
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);
Semantics\PatternMatchingTests2.cs (5)
2352Assert.Equal(TypeKind.Error, ti.Type.TypeKind); 2358Assert.Equal(TypeKind.Error, ti.Type.TypeKind); 2364Assert.Equal(TypeKind.Error, ti.Type.TypeKind); 2366Assert.Equal(TypeKind.Error, ti.ConvertedType.TypeKind); 2372Assert.Equal(TypeKind.Error, ti.ConvertedType.TypeKind);
Microsoft.CodeAnalysis.CSharp.Features (4)
ExtractMethod\CSharpMethodExtractor.PostProcessor.cs (1)
187semanticInfo.TypeKind is TypeKind.Error or TypeKind.Unknown)
Snippets\CSharpConsoleSnippetProvider.cs (1)
42if (lambdaSymbol is IMethodSymbol { ReturnType: { SpecialType: SpecialType.System_Void } or { TypeKind: TypeKind.Error } })
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
85if (type != null && type.TypeKind != TypeKind.Error)
src\Analyzers\CSharp\CodeFixes\UseExplicitTypeForConst\UseExplicitTypeForConstCodeFixProvider.cs (1)
47if (type == null || type.TypeKind == TypeKind.Error || type.IsAnonymousType)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (27)
Semantics\DeconstructionTests.cs (4)
4273Assert.Equal(TypeKind.Error, ((INamedTypeSymbol)typeInfo.Type).TypeArguments[0].TypeKind); 4274Assert.Equal(TypeKind.Error, ((INamedTypeSymbol)typeInfo.Type).TypeArguments[1].TypeKind); 4532Assert.Equal(TypeKind.Error, ((INamedTypeSymbol)typeInfo.Type).TypeArguments[0].TypeKind); 4533Assert.Equal(TypeKind.Error, ((INamedTypeSymbol)typeInfo.Type).TypeArguments[1].TypeKind);
Semantics\ForEachTests.cs (1)
2891Assert.NotEqual(TypeKind.Error, localSymbolType.TypeKind);
Semantics\InteractiveSemanticModelTests.cs (5)
46Assert.Equal(TypeKind.Error, baseType.TypeKind); 183Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 185Assert.Equal(TypeKind.Error, 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 (2)
3002Assert.Equal(TypeKind.Error, model.GetTypeInfo(contentType).Type.TypeKind); 3011Assert.Equal(TypeKind.Error, model.GetTypeInfo(b).Type.TypeKind);
Semantics\LocalFunctionTests.cs (2)
1779Assert.Equal(TypeKind.Error, aTypeInfo.Type.TypeKind); 1854Assert.Equal(TypeKind.Error, aTypeInfo.Type.TypeKind);
Semantics\NativeIntegerTests.cs (2)
727Assert.Equal(TypeKind.Error, type.TypeKind); 735Assert.Equal(TypeKind.Error, type.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\ScriptSemanticsTests.cs (4)
251Assert.Equal(TypeKind.Error, summary.Type.TypeKind); 252Assert.Equal(TypeKind.Error, summary.ConvertedType.TypeKind); 568Assert.Equal(TypeKind.Error, summary.Type.TypeKind); 569Assert.Equal(TypeKind.Error, summary.ConvertedType.TypeKind);
Semantics\UnsafeTests.cs (2)
7341Assert.Equal(TypeKind.Error, ((IPointerTypeSymbol)typeInfo.Type).PointedAtType.TypeKind); 7379Assert.Equal(TypeKind.Error, ((IPointerTypeSymbol)typeInfo.Type).PointedAtType.TypeKind);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (113)
Compilation\GetSemanticInfoTests.cs (1)
1497Assert.Equal(TypeKind.Error, bindInfo.Type.TypeKind);
Compilation\SemanticModelAPITests.cs (2)
3134Assert.Equal(TypeKind.Error, ((IParameterSymbol)symbol).Type.TypeKind); 3167Assert.Equal(TypeKind.Error, info.ConvertedType.TypeKind);
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (1)
2330Assert.Equal(TypeKind.Error, info.Type.TypeKind);
Compilation\SemanticModelGetSemanticInfoTests.cs (56)
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); 3523Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 3525Assert.Equal(TypeKind.Error, 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); 3972Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 3974Assert.Equal(TypeKind.Error, 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); 4372Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 4374Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 5444Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 5446Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 5704Assert.Equal(TypeKind.Error, lambdaSym.Parameters[0].Type.TypeKind); 6344Assert.Equal(TypeKind.Error, param.Type.TypeKind); 7201Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 7203Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 8303Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 8646Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 8686Assert.Equal(TypeKind.Error, 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); 9614Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 9616Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 9780Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 9782Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 9886Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 9888Assert.Equal(TypeKind.Error, 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); 13070Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind); 13804Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind); 13806Assert.Equal(TypeKind.Error, 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); 15216Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind);
DocumentationComments\CrefTests.cs (1)
6540Assert.Equal(TypeKind.Error, ((INamedTypeSymbol)actualSymbol1).TypeArguments.Single().TypeKind);
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\Metadata\PE\TypeForwarders.cs (3)
106Assert.NotEqual(TypeKind.Error, funcType.TypeKind); 1498Assert.NotEqual(TypeKind.Error, type.TypeKind); 1767Assert.NotEqual(TypeKind.Error, type.TypeKind);
Symbols\MissingSpecialMember.cs (2)
158Assert.Equal(TypeKind.Error, specialType.TypeKind); 305Assert.Equal(TypeKind.Error, wellKnownType.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\SymbolDistinguisherTests.cs (2)
318Assert.NotEqual(TypeKind.Error, validType.TypeKind); 319Assert.Equal(TypeKind.Error, errorType.TypeKind);
Symbols\SymbolErrorTests.cs (13)
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);
Symbols\TypeTests.cs (3)
1331Assert.Equal(TypeKind.Error, derived.BaseType().TypeKind); 1335Assert.Equal(TypeKind.Error, i.TypeKind); 1368Assert.Equal(TypeKind.Error, typeSymbol.TypeKind);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
UsesIsNullableVisitor.cs (1)
187case TypeKind.Error:
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (1)
Metadata\WinMdEventTests.cs (1)
3347Assert.Equal(TypeKind.Error, fieldType.TypeKind);
Microsoft.CodeAnalysis.CSharp.Workspaces (6)
Classification\SyntaxClassification\SyntaxTokenClassifier.cs (1)
24private static readonly Func<ITypeSymbol, bool> s_shouldInclude = t => t.TypeKind != TypeKind.Error && t.GetArity() > 0;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (2)
308if (originalConvertedType is null || originalConvertedType.TypeKind == TypeKind.Error) 349if (rewrittenConvertedType is null || rewrittenConvertedType.TypeKind == TypeKind.Error || !rewrittenConversion.Exists)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.ExpressionSyntaxGeneratorVisitor.cs (1)
67if (symbol.TypeKind != TypeKind.Error)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (2)
195if (symbol.TypeKind == TypeKind.Error && symbol.Name == "var") 294if (symbol.TypeKind != TypeKind.Error)
Microsoft.CodeAnalysis.Features (7)
Completion\Providers\ImportCompletionProvider\AbstractTypeImportCompletionProvider.cs (1)
80TypeKind: not TypeKind.Error
ConvertCast\AbstractConvertCastCodeRefactoringProvider.cs (1)
52if (type is { TypeKind: TypeKind.Error })
ExtractMethod\MethodExtractor.cs (1)
271if (type.TypeKind is TypeKind.Error or TypeKind.Unknown)
Shared\Extensions\ISymbolExtensions_2.cs (1)
84case TypeKind.Error:
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorsService.State.cs (1)
58baseType.TypeKind == TypeKind.Error)
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.VisualBasic (26)
Binding\Binder.vb (1)
456If type.TypeKind = TypeKind.Error AndAlso TypeOf type Is MissingMetadataTypeSymbol.TopLevel Then
Binding\Binder_Conversions.vb (1)
1231If targetType.TypeKind <> TypeKind.Delegate AndAlso targetType.TypeKind <> TypeKind.Error Then
Binding\Binder_Delegates.vb (1)
236If targetType.TypeKind <> TypeKind.Error Then
Binding\Binder_Expressions.vb (1)
3843Case TYPEKIND.Error
Binding\Binder_Lookup.vb (2)
592Case TypeKind.Error 621Case TypeKind.Error
Binding\Binder_ObjectInitializer.vb (2)
226Case TypeKind.Error, 297Case TypeKind.Error
Compilation\ClsComplianceChecker.vb (3)
593Case TypeKind.Error, TypeKind.TypeParameter 619Case TypeKind.Error, TypeKind.TypeParameter 636If type.TypeKind = TypeKind.Error Then
Compilation\SemanticModel.vb (1)
972If highestExpr.Type IsNot Nothing AndAlso highestExpr.Type.TypeKind <> TypeKind.Error Then
SymbolDisplay\SymbolDisplayVisitor.Types.vb (1)
267Case TypeKind.Error
SymbolDisplay\SymbolDisplayVisitor_Minimal.vb (1)
107If symbol.TypeKind <> TypeKind.Error Then
Symbols\AssemblySymbol.vb (1)
721If result Is Nothing OrElse result.TypeKind = TypeKind.Error Then
Symbols\ConstraintsHelper.vb (2)
216TypeKind.Error 874Case TypeKind.Error
Symbols\ErrorTypeSymbol.vb (1)
111Return TypeKind.Error
Symbols\NamedTypeSymbol.vb (1)
445TypeKind <> TypeKind.Error
Symbols\Source\ImplementsHelper.vb (1)
396ElseIf interfaceType.TypeKind = TypeKind.Error Then
Symbols\Source\SourceComplexParameterSymbol.vb (1)
341If (flags And SourceParameterFlags.ParamArray) <> 0 AndAlso paramType.TypeKind <> TypeKind.Error Then
Symbols\Source\SourceNamedTypeSymbol.vb (3)
1118Case TypeKind.Error, TypeKind.Unknown 1188Case TypeKind.Interface, TypeKind.Error 1239Case TypeKind.Interface, TypeKind.Error
Symbols\TypeSymbolExtensions.vb (2)
414Case TypeKind.Error, TypeKind.Class, TypeKind.Submission 867TypeKind.Error
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (4)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ExpressionSyntaxGeneratorVisitor.vb (1)
48If symbol.TypeKind <> TypeKind.[Error] Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (1)
167If _addGlobal AndAlso symbol.TypeKind <> TypeKind.[Error] Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (2)
30If info.Type IsNot Nothing AndAlso info.Type.TypeKind <> TypeKind.Error Then 34If info.ConvertedType IsNot Nothing AndAlso info.ConvertedType.TypeKind <> TypeKind.Error Then
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
CodeGen\CodeGenTuples.vb (1)
5749Assert.Equal(TypeKind.Error, mTuple.TupleUnderlyingType.TypeKind)
Microsoft.CodeAnalysis.VisualBasic.Features (1)
ExtractMethod\VisualBasicMethodExtractor.PostProcessor.vb (1)
137type.TypeKind = TypeKind.Error OrElse
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (34)
Binding\ForEachTests.vb (1)
4537Assert.NotEqual(TypeKind.Error, localSymbolType.TypeKind)
Semantics\ArrayLiteralTests.vb (2)
1497Assert.Equal(TypeKind.Error, semanticSummary.Type.TypeKind) 1499Assert.Equal(TypeKind.Error, semanticSummary.ConvertedType.TypeKind)
Semantics\GetExtendedSemanticInfoTests.vb (21)
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) 1430Assert.Equal(TypeKind.Error, paramSym.Type.TypeKind) 1990Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind) 1992Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind) 2176Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind) 2178Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind) 3766Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind) 3768Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind) 3901Assert.Equal(semanticInfo.Type.TypeKind, TypeKind.Error) 3942Assert.Equal(semanticInfo.Type.TypeKind, TypeKind.Error) 4790Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind) 5058Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind) 5060Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind) 5232Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind) 5234Assert.Equal(TypeKind.Error, semanticInfo.ConvertedType.TypeKind) 5278Assert.Equal(TypeKind.Error, semanticInfo.Type.TypeKind)
Semantics\GetSemanticInfoTests.vb (8)
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) 1535Assert.Equal(TypeKind.Error, semanticSummary.Type.TypeKind) 1537Assert.Equal(TypeKind.Error, semanticSummary.ConvertedType.TypeKind)
Semantics\XmlLiteralSemanticModelTests.vb (2)
530Assert.Equal(TypeKind.Error, semanticSummary.Type.TypeKind) 532Assert.Equal(TypeKind.Error, semanticSummary.ConvertedType.TypeKind)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (33)
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\Metadata\PE\TypeForwarders.vb (1)
94Assert.NotEqual(TypeKind.Error, funcType.TypeKind)
SymbolsTests\Retargeting\RetargetingTests.vb (12)
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)
SymbolsTests\Source\BindingsTests.vb (3)
471Assert.Equal(TypeKind.Error, sysCollectionsType.TypeKind) 500Assert.Equal(TypeKind.Error, interfaceIAmbigSymInfo.Type.TypeKind) 532Assert.Equal(TypeKind.Error, elvisSymInfo.Type.TypeKind)
SymbolsTests\SymbolErrorTests.vb (1)
22507Assert.Equal(TypeKind.Error, errTypeSym.TypeKind)
SymbolsTests\WellKnownTypeValidationTests.vb (4)
38Assert.Equal(TypeKind.Error, special.TypeKind) 163Assert.Equal(TypeKind.Error, wellKnown.TypeKind) 210Assert.Equal(If(wellKnown.DeclaringCompilation Is comp, TypeKind.Enum, TypeKind.Error), wellKnown.TypeKind) 441Assert.Equal(TypeKind.Error, wellKnown.TypeKind)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (5)
CaseCorrection\VisualBasicCaseCorrectionService.Rewriter.vb (1)
148If TypeOf symbol Is ITypeSymbol AndAlso DirectCast(symbol, ITypeSymbol).TypeKind = TypeKind.Error Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ExpressionSyntaxGeneratorVisitor.vb (1)
48If symbol.TypeKind <> TypeKind.[Error] Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (1)
167If _addGlobal AndAlso symbol.TypeKind <> TypeKind.[Error] Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (2)
30If info.Type IsNot Nothing AndAlso info.Type.TypeKind <> TypeKind.Error Then 34If info.ConvertedType IsNot Nothing AndAlso info.ConvertedType.TypeKind <> TypeKind.Error Then
Microsoft.CodeAnalysis.Workspaces (8)
Editing\SymbolEditorExtensions.cs (1)
30if (baseOrInterfaceType.TypeKind != TypeKind.Error)
FindSymbols\FindReferences\Finders\NamedTypeSymbolReferenceFinder.cs (1)
20=> symbol.TypeKind != TypeKind.Error;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
213=> symbol is ITypeSymbol { TypeKind: TypeKind.Error };
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (1)
193typeArg.TypeKind != TypeKind.Error &&
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\SymbolEquivalenceComparer.EquivalenceVisitor.cs (2)
286if (xTypeKind == TypeKind.Error || 287yTypeKind == TypeKind.Error)
Microsoft.Gen.Metrics (1)
Parser.cs (1)
574returnType.TypeKind != TypeKind.Error)
Microsoft.Gen.MetricsReports (1)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (1)
574returnType.TypeKind != TypeKind.Error)
Microsoft.Interop.ComInterfaceGenerator (1)
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 (1)
LibraryImportGenerator.cs (1)
190if (attrData.AttributeClass?.TypeKind is null or TypeKind.Error)
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
DownlevelLibraryImportGenerator.cs (1)
132if (attrData.AttributeClass?.TypeKind is null or TypeKind.Error)
Microsoft.VisualStudio.LanguageServices (3)
Library\ObjectBrowser\AbstractDescriptionBuilder.cs (1)
91if (typeSymbol.TypeKind is TypeKind.Unknown or TypeKind.Error or TypeKind.TypeParameter ||
Library\VsNavInfo\NavInfoFactory.cs (1)
97if (typeSymbol.TypeKind is TypeKind.Error or
Progression\GraphBuilder.cs (1)
602case TypeKind.Error:
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
GlyphExtensionsTests.cs (1)
139typeKind: TypeKind.Error);
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
CodeModel\VisualBasicCodeModelService.vb (1)
765If typeSymbol IsNot Nothing AndAlso Not typeSymbol.TypeKind = TypeKind.Error Then