372 references to IsErrorType
Microsoft.CodeAnalysis.CSharp (209)
Binder\Binder.WithQueryLambdaParametersBinder.cs (1)
80if (receiver.Type?.IsErrorType() != true)
Binder\Binder_Attributes.cs (6)
170if (attributeTypeForBinding.IsErrorType()) 189if (attributeTypeForBinding.IsErrorType()) 203suppressResultDiagnostics: attributeType.IsErrorType(), 292if (attributeType.IsErrorType() || attributeType.IsAbstract || attributeConstructor is null) 421Debug.Assert(!attributeType.IsErrorType()); 519if (attributeType.IsErrorType())
Binder\Binder_Conversions.cs (6)
715if (stringFactory.IsErrorType() || haveErrors) 1739BindToNaturalType(expression, diagnostics, reportNoTargetType: !targetType.IsErrorType()) : 1948Debug.Assert(targetTyped || destination.IsErrorType() || destination.Equals(source.Type, TypeCompareKind.ConsiderEverything)); 1952hasErrors |= source.HasErrors || destination.IsErrorType(); 1965if (targetTyped && !destination.IsErrorType() && !Compilation.IsFeatureEnabled(MessageID.IDS_FeatureTargetTypedConditional)) 1987Debug.Assert(targetTyped || destination.IsErrorType() || destination.Equals(source.Type, TypeCompareKind.ConsiderEverything));
Binder\Binder_Deconstruct.cs (2)
122if ((object?)boundRHS.Type == null || boundRHS.Type.IsErrorType()) 718if (receiver.Type?.IsErrorType() == false)
Binder\Binder_Expressions.cs (17)
1399BoundTypeExpression boundType = new BoundTypeExpression(typeSyntax, alias, typeWithAnnotations, type.IsErrorType()); 1436bool typeHasErrors = type.IsErrorType() || CheckManagedAddr(Compilation, type, node.Location, diagnostics); 2109var constantValueOpt = localSymbol.IsConst && !IsInsideNameof && !type.IsErrorType() 2652if (!rangeType.IsErrorType()) 2756bool suppressErrors = operand.HasAnyErrors || targetType.IsErrorType(); 2780if (operand.HasAnyErrors || targetType.IsErrorType()) 4169if (!bestType.IsErrorType()) 4236if ((object)boundExpression.Type == null || !boundExpression.Type.IsErrorType()) 4320Debug.Assert(init.Type.IsErrorType()); 4527if (!elementType.Type.IsErrorType()) 5011Debug.Assert(initializerType.IsErrorType() || 6273if (!hasEnumerableInitializerType && !initializerSyntax.HasErrors && !initializerType.IsErrorType()) 6311else if (!initializerType.IsErrorType()) 6694bool hasErrors = type.IsErrorType(); 6973if (coClassType.IsErrorType()) 7293if (type.IsErrorType()) 9804if (type.IsErrorType())
Binder\Binder_InterpolatedString.cs (2)
259if (unconvertedInterpolatedString.Type.IsErrorType() || haveErrors || canLowerToStringConcatenation(parts)) 451if (interpolatedStringHandlerType.IsErrorType())
Binder\Binder_Operators.cs (3)
4163if (isOperandNullOrNew || operand.Type?.IsErrorType() == true) 4770return !(targetType?.IsErrorType() == true && bindAsTypeDiagnostics.HasAnyResolvedErrors()); 5742if (bestType.IsErrorType())
Binder\Binder_Patterns.cs (6)
229if (inputType.IsErrorType()) 310if (inputType.IsErrorType() || inputType.IsDynamic()) 708(conversion.ConversionKind == ConversionKind.NoConversion && convertedExpression.Type?.IsErrorType() == true)) 731if (inputType.IsErrorType() || patternType.IsErrorType()) 1495if (!receiverType.IsErrorType())
Binder\Binder_QueryErrors.cs (2)
225if (!t.IsErrorType()) 233if ((object)type == null || type.IsErrorType())
Binder\Binder_Statements.cs (13)
413if ((object)type == null || !type.IsErrorType() && !Compilation.IsExceptionType(type.EffectiveType(ref useSiteInfo), ref useSiteInfo)) 1034if (!declTypeOpt.Type.IsErrorType()) 1485if (op1.Type is { } lhsType && !lhsType.IsErrorType()) 2024if (targetType.IsErrorType()) 2138if (anonymousFunction.ParameterType(i).IsErrorType()) 2210Debug.Assert(!lambdaParameterType.IsErrorType()); 3055hasErrors |= arg.HasErrors || ((object)arg.Type != null && arg.Type.IsErrorType()); 3266if (type.IsErrorType()) 3300Debug.Assert(((object)type == null) || !type.IsErrorType()); 3310if (previousBlock.ExceptionFilterOpt == null && (object)previousType != null && !previousType.IsErrorType()) 3350Debug.Assert(local.Type.IsErrorType() || (TypeSymbol.Equals(local.Type, type, TypeCompareKind.ConsiderEverything2))); 3520if (returnType.IsErrorType()) 3848else if (baseType.IsErrorType() || baseType.IsStatic)
Binder\Binder_Symbols.cs (1)
1226if (!unconstructedType.IsErrorType())
Binder\Binder_WithExpression.cs (1)
38else if (!receiverType.IsErrorType())
Binder\DecisionDagBuilder.cs (4)
287Debug.Assert(pattern.HasErrors || pattern.InputType.Equals(input.Type, TypeCompareKind.AllIgnoreOptions) || pattern.InputType.IsErrorType()); 407Debug.Assert(variableAccess.Type!.Equals(input.Type, TypeCompareKind.AllIgnoreOptions) || variableAccess.Type.IsErrorType()); 522RoslynDebug.Assert(input.Type.IsErrorType() || recursive.HasErrors || recursive.InputType.IsErrorType() || input.Type.Equals(recursive.InputType, TypeCompareKind.AllIgnoreOptions));
Binder\DecisionDagBuilder_ListPatterns.cs (2)
16Debug.Assert(input.Type.IsErrorType() || list.HasErrors || list.InputType.IsErrorType() ||
Binder\ExecutableCodeBinder.cs (1)
150else if (!returnType.IsErrorType())
Binder\ForEachLoopBinder.cs (4)
441hasErrors = hasErrors || boundIterationVariableType.HasErrors || iterationVariableType.Type.IsErrorType(); 558(builder.ElementType.IsNullableType() && builder.ElementType.GetMemberTypeArgumentsNoUseSiteDiagnostics().Single().IsErrorType() && collectionExpr.Type.IsArray())); 798if (collectionExprType.IsErrorType()) 852if (spanType.IsErrorType())
Binder\Semantics\BestTypeInferrer.cs (4)
140if (type1.IsErrorType()) 155if (type2.IsErrorType()) 266if (type1.IsErrorType()) 271if (type2 is null || type2.IsErrorType())
Binder\Semantics\Conversions\ConversionsBase.cs (3)
2626if (source.IsErrorType()) 3001Debug.Assert(targetInterfaceType.IsErrorType() || targetInterfaceType.IsInterface); 3035Debug.Assert(targetInterfaceType.IsErrorType() || targetInterfaceType.IsInterface);
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (2)
468if (!fixedResultType.Type.IsErrorType()) 3354!type.IsErrorType() &&
Binder\Semantics\OverloadResolution\OverloadResolution.cs (2)
3744r1.IsErrorType() || 3745r2.IsErrorType() ||
Binder\SwitchBinder.cs (1)
382if ((object)switchGoverningType != null && !switchGoverningType.IsErrorType())
Binder\SwitchExpressionArmBinder.cs (1)
40bool hasErrors = switchGoverningType.IsErrorType();
Binder\UsingStatementBinder.cs (1)
253if (type is null || !type.IsErrorType())
BoundTree\BoundNode.cs (1)
111return expression?.Type?.IsErrorType() == true;
Compilation\CSharpCompilation.cs (1)
1825Debug.Assert(result?.IsErrorType() != true);
Compilation\CSharpSemanticModel.cs (3)
2867if (bnode != null && !cdestination.IsErrorType()) 2919if (bnode != null && !destination.IsErrorType()) 3603if (namedType.IsErrorType())
Emitter\Model\NamedTypeSymbolAdapter.cs (1)
797Debug.Assert(AdaptedNamedTypeSymbol.IsErrorType() ||
Emitter\Model\PEAssemblyBuilder.cs (1)
598Debug.Assert(userDefinedAttribute?.IsErrorType() != true);
Emitter\NoPia\EmbeddedTypesManager.cs (2)
62if (typeSymbol.IsErrorType()) 258if (namedType.SpecialType != SpecialType.None || namedType.IsErrorType() || !namedType.ContainingAssembly.IsLinked)
Errors\LazyMissingNonNullTypesContextDiagnosticInfo.cs (1)
84=> type is null || !(type.IsValueType || type.IsErrorType());
FlowAnalysis\DefiniteAssignment.cs (2)
246(type.IsErrorType() || compilation.IsAttributeType(type))); 1223else if (!_alreadyReported[slot] && !symbol.GetTypeOrReturnType().Type.IsErrorType())
FlowAnalysis\NullableWalker.cs (16)
771if (symbolType.Type.IsValueType || symbolType.Type.IsErrorType()) 2114(nodeType.IsErrorType() || 3199Debug.Assert(node.Type.IsErrorType() || type.Type.IsErrorType()); 3673Debug.Assert(type.Type.IsErrorType()); 3736return typeA?.IsErrorType() != false && typeB?.IsErrorType() != false; 3748return type.IsErrorType() || type.IsDynamic() || type.HasUseSiteError || (type.IsAnonymousType && canIgnoreAnonymousType((NamedTypeSymbol)type)); 3795&& (type.SpecialType == SpecialType.System_Boolean || type.IsDynamic() || type.IsErrorType()); 6121oldType.IsVoidType() || oldType.IsErrorType() ? oldType : 8670if (containingType is null || containingType.IsErrorType() || symbol is ErrorMethodSymbol) 9552if (checkConversion && !targetType.IsErrorType()) 9590Debug.Assert(targetType.IsValueType || targetType.IsErrorType()); 9596if (!conversionOperand.HasErrors && !targetType.IsErrorType()) 12641if (isValueType && (!checkNullableValueType || !type.IsNullableTypeOrTypeParameter() || type.GetNullableUnderlyingType().IsErrorType())) 12742Debug.Assert(node.Type is null || node.Type.IsErrorType() || node.Type.IsRefLikeType);
FlowAnalysis\NullableWalker_Patterns.cs (3)
754Debug.Assert(NominalSlotType(slot) is var slotType && (slotType.IsErrorType() || isDerivedType(slotType, type))); 761if (derivedType.IsErrorType() || baseType.IsErrorType())
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (1)
344!builderType.IsErrorType() &&
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (1)
431if (synthesizedType.IsErrorType())
Lowering\LocalRewriter\LocalRewriter_IsPatternOperator.cs (1)
175if (test.Type?.IsErrorType() != false)
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (1)
195Debug.Assert(result.Type.SpecialType == SpecialType.System_String || result.Type.IsErrorType());
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (3)
619delegateTypeOverMethodTypeParameters.IsErrorType() || 621callSiteTypeGeneric.IsErrorType() || 730if (callSiteType.IsErrorType())
Lowering\SyntheticBoundNodeFactory.cs (5)
442right.Type.IsErrorType() || left.Type.IsErrorType())); 926Debug.Assert(left.Type!.Equals(right.Type, TypeCompareKind.IgnoreCustomModifiersAndArraySizesAndLowerBounds | TypeCompareKind.IgnoreNullableModifiersForReferenceTypes) || left.Type.IsErrorType()); 1326Debug.Assert(result.Type.IsErrorType() || result.Type!.IsDerivedFrom(result.GetMethodFromHandle!.ReturnType, TypeCompareKind.AllIgnoreOptions, ref discardedUseSiteInfo)); 1433Debug.Assert(result.Type.IsErrorType() || result.Type!.IsDerivedFrom(result.GetMethodFromHandle!.ReturnType, TypeCompareKind.AllIgnoreOptions, ref discardedUseSiteInfo));
Symbols\ArrayTypeSymbol.cs (2)
114if (!iListOfT.IsErrorType()) 121if (!iReadOnlyListOfT.IsErrorType())
Symbols\AssemblySymbol.cs (11)
653Debug.Assert(result?.IsErrorType() != true); 708Debug.Assert(!type.IsErrorType()); 720Debug.Assert(!type.IsErrorType()); 735Debug.Assert(type?.IsErrorType() != true); 815Debug.Assert(symbol?.IsErrorType() != true); 849Debug.Assert(!symbol.IsErrorType()); 909Debug.Assert(result?.IsErrorType() != true); 931Debug.Assert(corLibCandidate?.IsErrorType() != true); 966Debug.Assert(candidate?.IsErrorType() != true); 1011Debug.Assert(result?.IsErrorType() != true); 1048Debug.Assert(result?.IsErrorType() != true);
Symbols\Attributes\AttributeData.cs (1)
88Debug.Assert(!attributeType.IsErrorType());
Symbols\Attributes\PEAttributeData.cs (1)
88else if ((object)attributeClass == null || attributeClass.IsErrorType() || (object)attributeConstructor == null)
Symbols\Attributes\SourceAttributeData.cs (1)
482if (attributeClass.IsErrorType() && !(attributeClass is MissingMetadataTypeSymbol))
Symbols\Compilation_WellKnownMembers.cs (4)
104if (!type.IsErrorType()) 151Debug.Assert(result?.IsErrorType() != true); 183TypeSymbol.Equals(result, _lazyWellKnownTypes[index], TypeCompareKind.ConsiderEverything2) || (_lazyWellKnownTypes[index]!.IsErrorType() && result.IsErrorType())
Symbols\ConstraintsHelper.cs (6)
296if (!deducedBaseType.IsErrorType() && !constraintDeducedBase.IsErrorType()) 1071if (typeArgument.Type.IsErrorType()) 1352if (constraintType.Type.IsErrorType()) 1629Debug.Assert(deducedBase.IsErrorType() || 1630effectiveBase.IsErrorType() ||
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (1)
212Debug.Assert(specifierType?.IsErrorType() != true);
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (1)
210Debug.Assert(modifierType.ContainingAssembly is not null || modifierType.IsErrorType());
Symbols\Metadata\PE\MetadataDecoder.cs (3)
121Debug.Assert(result?.IsErrorType() != true); 169Debug.Assert(result?.IsErrorType() != true); 373Debug.Assert(candidate?.IsErrorType() != true);
Symbols\Metadata\PE\PEEventSymbol.cs (1)
419(eventType.IsDelegateType() || eventType.IsErrorType()) &&
Symbols\Metadata\PE\PEModuleSymbol.cs (2)
606Debug.Assert(currentModuleResult?.IsErrorType() != true); 714Debug.Assert(result?.IsErrorType() != true);
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
2638var coClassType = ((object)type != null && (type.TypeKind == TypeKind.Class || type.IsErrorType())) ? (NamedTypeSymbol)type : null;
Symbols\MetadataOrSourceAssemblySymbol.cs (2)
60Debug.Assert(result?.IsErrorType() != true); 208if (!type.IsErrorType())
Symbols\NamedTypeSymbol.cs (2)
1179internal static readonly Func<TypeWithAnnotations, bool> TypeWithAnnotationsIsErrorType = type => type.HasType && type.Type.IsErrorType(); 1445if (@base.IsErrorType() && @base is NoPiaIllegalGenericInstantiationSymbol)
Symbols\NonMissingAssemblySymbol.cs (3)
109if (!result.IsErrorType() && (object)result.ContainingAssembly == (object)this) 121Debug.Assert(result is null || ((object)result.ContainingAssembly == (object)this && !result.IsErrorType())); 173Debug.Assert(result is null || ((object)result.ContainingAssembly == (object)this && !result.IsErrorType()));
Symbols\NonMissingModuleSymbol.cs (1)
203Debug.Assert(result?.IsErrorType() != true);
Symbols\NoPiaIllegalGenericInstantiationSymbol.cs (1)
59if (_underlyingSymbol.IsErrorType())
Symbols\PublicModel\NonErrorNamedTypeSymbol.cs (1)
19Debug.Assert(!underlying.IsErrorType());
Symbols\Retargeting\RetargetingNamedTypeSymbol.cs (1)
292Debug.Assert(!underlyingResult.IsErrorType());
Symbols\Retargeting\RetargetingNamespaceSymbol.cs (1)
221Debug.Assert(!underlying.IsErrorType());
Symbols\Retargeting\RetargetingSymbolTranslator.cs (1)
461Debug.Assert(result1?.IsErrorType() != true);
Symbols\Source\GlobalExpressionVariable.cs (1)
136originalType.IsErrorType() ||
Symbols\Source\LambdaSymbol.cs (1)
163Debug.Assert(_returnType.Type.IsErrorType());
Symbols\Source\SourceAssemblySymbol.cs (2)
1416if (forwarded.IsErrorType()) 1896return !obj.IsErrorType() && obj.DeclaredAccessibility == Accessibility.Public;
Symbols\Source\SourceComplexParameterSymbol.cs (1)
615Debug.Assert(!attributeType.IsErrorType());
Symbols\Source\SourceEventSymbol.cs (1)
665else if (!this.Type.IsDelegateType() && !this.Type.IsErrorType())
Symbols\Source\SourceLocalSymbol.cs (2)
397originalType.Value.DefaultType.IsErrorType() && newType.Type.IsErrorType() ||
Symbols\Source\SourceMemberContainerSymbol.cs (5)
1960predicate: (t, a, b) => !t.TupleElementNames.IsDefaultOrEmpty && !t.IsErrorType(), 4959if (deconstruct.ReturnType.SpecialType != SpecialType.System_Void && !deconstruct.ReturnType.IsErrorType()) 5069if (!printMembersMethod.ReturnType.IsErrorType()) 5331if (!equalityContract.Type.IsErrorType()) 5390if (thisEquals.ReturnType.SpecialType != SpecialType.System_Boolean && !thisEquals.ReturnType.IsErrorType())
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (2)
504if (this.BaseTypeNoUseSiteDiagnostics?.IsErrorType() == true) 1197return (object)typeSymbol.VisitType((currentTypeSymbol, unused1, unused2) => currentTypeSymbol.IsErrorType(), (object)null) != null;
Symbols\Source\SourceMemberFieldSymbol.cs (1)
554if ((object)initializerOpt.Type != null && !initializerOpt.Type.IsErrorType())
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1605return !returnType.IsErrorType() &&
Symbols\Source\SourceNamedTypeSymbol.cs (1)
1305Debug.Assert(!this.IsErrorType());
Symbols\Source\SourceOrdinaryMethodSymbol.cs (1)
697if (this.ReturnType?.IsErrorType() == true && GetSyntax().ReturnType is IdentifierNameSyntax { Identifier.RawContextualKind: (int)SyntaxKind.PartialKeyword })
Symbols\SubstitutedNamedTypeSymbol.cs (1)
61Debug.Assert(!originalDefinition.IsErrorType());
Symbols\Symbol_Attributes.cs (2)
786if (!boundAttributeType.IsErrorType()) 823if (!attributeType.IsErrorType())
Symbols\Synthesized\Records\SynthesizedRecordBaseEquals.cs (1)
59if (parameter.Type.IsErrorType())
Symbols\Synthesized\Records\SynthesizedRecordClone.cs (1)
114if (ReturnType.IsErrorType())
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (2)
123if (ReturnType.IsErrorType() || 124printableMembers.Any(static m => m.GetTypeOrReturnType().Type.IsErrorType()))
Symbols\Tuples\TupleTypeSymbol.cs (1)
739var diagnosticInfo = container.IsErrorType() ?
Symbols\TypeSymbolExtensions.cs (4)
542return type.IsErrorType() || type.IsRefLikeOrAllowsRefLikeType(); 631if (type.IsErrorType()) 1261var result = type.VisitType((type, unused1, unused2) => type.IsErrorType(), (object?)null, canDigThroughNullable: true); 1304RoslynDebug.Assert((object?)result == null || !result.IsErrorType());
Symbols\TypeWithAnnotations.cs (2)
202if (!typeSymbol.IsValueType && !typeSymbol.IsErrorType()) 596typeWithAnnotationsPredicate: (t, a, b) => t.NullableAnnotation != NullableAnnotation.Oblivious && !t.Type.IsErrorType() && !t.Type.IsValueType,
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (36)
CodeGen\CodeGenDeconstructTests.cs (3)
3588if (local.IsVar && local.Type.IsErrorType()) 5608Assert.True(xType.Type.IsErrorType()); 7070Assert.True(symbol.TypeWithAnnotations.Type.IsErrorType());
CodeGen\CodeGenTupleTest.cs (31)
838Assert.False(validField.Type.IsErrorType()); 843Assert.True(validFieldWithAttribute.Type.IsErrorType()); 848Assert.True(tooFewNames.Type.IsErrorType()); 853Assert.True(tooManyNames.Type.IsErrorType()); 857Assert.True(tooFewNamesMethod.ReturnType.IsErrorType()); 861Assert.True(tooManyNamesMethod.ReturnType.IsErrorType()); 931Assert.False(validField.Type.IsErrorType()); 936Assert.True(validFieldWithAttribute.Type.IsErrorType()); 941Assert.False(partialNames.Type.IsErrorType()); 946Assert.False(allNullNames.Type.IsErrorType()); 952Assert.False(partialParamType.Type.IsErrorType()); 958Assert.False(allNullParamType.Type.IsErrorType()); 997Assert.False(field1.Type.IsErrorType()); 22288Assert.True(methodM.ReturnType.IsErrorType()); 22328Assert.True(methodM.ReturnType.IsErrorType()); 25330Assert.False(found.IsErrorType()); 25335Assert.False(tuple2.IsErrorType()); 25341Assert.False(tuple3.IsErrorType()); 25347Assert.True(tuple4.IsErrorType()); 26756Assert.True(tuple.IsErrorType()); 26762Assert.True(tuple.IsErrorType()); 26826Assert.True(tuple.IsErrorType()); 26888Assert.True(container.IsErrorType()); 26901Assert.False(tuple.TupleUnderlyingType.IsErrorType()); 26902Assert.False(tuple.IsErrorType()); 26960Assert.True(contained.IsErrorType()); 26968Assert.False(tuple1.TupleUnderlyingType.IsErrorType()); 26969Assert.False(tuple1.IsErrorType()); 26976Assert.True(container.IsErrorType()); 26984Assert.False(tuple2.TupleUnderlyingType.IsErrorType()); 26985Assert.False(tuple2.IsErrorType());
Emit\CompilationEmitTests.cs (2)
5558Assert.False(b.IsErrorType()); 5563Assert.False(a.IsErrorType());
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Attributes\AttributeTests.cs (1)
355Assert.False(c.IsErrorType());
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (28)
Semantics\InitOnlyMemberTests.cs (4)
3286Assert.False(property1.SetMethod.Parameters[0].Type.IsErrorType()); 3291Assert.False(property2.SetMethod.Parameters[0].Type.IsErrorType()); 3378Assert.False(property1.SetMethod.Parameters[0].Type.IsErrorType()); 3384Assert.False(property2.SetMethod.Parameters[0].Type.IsErrorType());
Semantics\LocalFunctionTests.cs (10)
1725Assert.True(attrs[0].AttributeClass.IsErrorType()); 1726Assert.True(attrs[1].AttributeClass.IsErrorType()); 1727Assert.False(attrs[2].AttributeClass.IsErrorType()); 1732Assert.True(attrs[3].AttributeClass.IsErrorType()); 1930Assert.True(attrs[0].AttributeClass.IsErrorType()); 1931Assert.True(attrs[1].AttributeClass.IsErrorType()); 1932Assert.False(attrs[2].AttributeClass.IsErrorType()); 1937Assert.True(attrs[3].AttributeClass.IsErrorType()); 1980Assert.True(attrs[0].AttributeClass.IsErrorType()); 1981Assert.True(attrs[1].AttributeClass.IsErrorType());
Semantics\NativeIntegerTests.cs (4)
1160Assert.False(type1.IsErrorType()); 1181Assert.True(type2.IsErrorType()); 1235Assert.False(typeA.IsErrorType()); 1253Assert.True(typeB.IsErrorType());
Semantics\NullableReferenceTypesTests.cs (1)
59372Assert.True(type.Type.IsErrorType());
Semantics\TopLevelStatementsTests.cs (1)
1090Assert.False(entryPoint.ReturnType.IsErrorType());
Semantics\ValueTupleTests.cs (8)
173Assert.True(comp.GetWellKnownType(WellKnownType.System_ValueTuple_T1).IsErrorType()); 176Assert.True(comp.GetWellKnownType(WellKnownType.System_ValueTuple_T2).IsErrorType()); 180Assert.True(comp.GetWellKnownType(WellKnownType.System_ValueTuple_T3).IsErrorType()); 185Assert.True(comp.GetWellKnownType(WellKnownType.System_ValueTuple_T4).IsErrorType()); 191Assert.True(comp.GetWellKnownType(WellKnownType.System_ValueTuple_T5).IsErrorType()); 198Assert.True(comp.GetWellKnownType(WellKnownType.System_ValueTuple_T6).IsErrorType()); 205Assert.True(comp.GetWellKnownType(WellKnownType.System_ValueTuple_T7).IsErrorType()); 213Assert.True(comp.GetWellKnownType(WellKnownType.System_ValueTuple_TRest).IsErrorType());
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (96)
Compilation\SemanticModelAPITests.cs (1)
3658Assert.False(((NamedTypeSymbol)newSymbol).TypeArguments().Single().IsErrorType());
Symbols\CompilationCreationTests.cs (2)
85Assert.True(type.IsErrorType()); // Not available 89Assert.False(type.IsErrorType());
Symbols\CorLibrary\Choosing.cs (2)
43Assert.False(obj.IsErrorType()); 73Assert.True(consumer.GetSpecialType(SpecialType.System_Object).IsErrorType());
Symbols\CorLibrary\CorTypes.cs (4)
291Assert.False(comp.GetSpecialType(InternalSpecialType.System_Type).IsErrorType()); 355Assert.True(comp1.GetSpecialType(InternalSpecialType.System_Type).IsErrorType()); 428Assert.False(comp.GetSpecialType(InternalSpecialType.System_Type).IsErrorType()); 536Assert.True(comp1.GetSpecialType(InternalSpecialType.System_Type).IsErrorType());
Symbols\ErrorTypeSymbolTests.cs (4)
78Assert.True(type.IsErrorType()); 79Assert.True(constructedFrom.IsErrorType()); 92Assert.False(type.IsErrorType()); 93Assert.False(constructedFrom.IsErrorType());
Symbols\GenericConstraintTests.cs (43)
3752Assert.False(i2.IsErrorType()); 3786Assert.False(i2.IsErrorType()); 3820Assert.False(i2.IsErrorType()); 3854Assert.False(i2.IsErrorType()); 3903Assert.False(i2.IsErrorType()); 3911Assert.False(iEquatable.IsErrorType()); 3916Assert.True(iQueryable_T.IsErrorType()); 3920Assert.True(iQueryable.IsErrorType()); 3929Assert.False(t.IsErrorType()); 3936Assert.True(t.IsErrorType()); 3943Assert.False(t.IsErrorType()); 3950Assert.True(t.IsErrorType()); 3957Assert.False(t.IsErrorType()); 3971Assert.False(t.IsErrorType()); 3985Assert.False(t.IsErrorType()); 3992Assert.False(t.IsErrorType()); 3999Assert.True(t.IsErrorType()); 4006Assert.False(t.IsErrorType()); 4013Assert.False(t.IsErrorType()); 4027Assert.False(t.IsErrorType()); 4034Assert.False(t.IsErrorType()); 4041Assert.True(t.IsErrorType()); 4048Assert.True(t.IsErrorType()); 4055Assert.True(t.IsErrorType()); 4069Assert.True(t.IsErrorType()); 4083Assert.False(t.IsErrorType()); 4090Assert.True(t.IsErrorType()); 4097Assert.False(t.IsErrorType()); 4104Assert.True(t.IsErrorType()); 4111Assert.True(t.IsErrorType()); 4132Assert.True(t.IsErrorType()); 4141Assert.False(t.IsErrorType()); 4152Assert.False(t.IsErrorType()); 4163Assert.False(t.IsErrorType()); 4177Assert.False(t.IsErrorType()); 4191Assert.False(t.IsErrorType()); 4198Assert.False(t.IsErrorType()); 4209Assert.False(t.IsErrorType()); 4216Assert.False(t.IsErrorType()); 4230Assert.False(t.IsErrorType()); 4237Assert.False(t.IsErrorType()); 4274Assert.False(t.IsErrorType()); 4285Assert.False(t.IsErrorType());
Symbols\Metadata\PE\BaseTypeResolution.cs (12)
344Assert.False(test1.BaseType().IsErrorType()); 345Assert.False(test1.BaseType().BaseType().IsErrorType()); 346Assert.False(test2.BaseType().IsErrorType()); 347Assert.False(test2.BaseType().BaseType().IsErrorType()); 348Assert.False(test2.BaseType().BaseType().BaseType().IsErrorType()); 364Assert.False(m3.BaseType().IsErrorType()); 365Assert.False(m3.BaseType().BaseType().IsErrorType()); 366Assert.False(m4.BaseType().IsErrorType()); 367Assert.False(m4.BaseType().BaseType().IsErrorType()); 374Assert.True(m3.BaseType().IsErrorType()); 375Assert.False(m4.BaseType().IsErrorType()); 376Assert.True(m4.BaseType().BaseType().IsErrorType());
Symbols\Metadata\PE\LoadCustomModifiers.cs (2)
238Assert.True(@class.GetMember<EventSymbol>("Event11").Type.IsErrorType()); //Can't have modopt on event type 240Assert.True(@class.GetMember<EventSymbol>("Event01").Type.IsErrorType()); //Can't have modopt on event type
Symbols\Metadata\PE\LoadingFields.cs (1)
151Assert.False(readOnlySpanType.IsErrorType());
Symbols\Metadata\PE\TypeForwarders.cs (5)
186Assert.False(baseType.IsErrorType()); 426Assert.False(baseType.IsErrorType()); 429Assert.True(ilAssembly1.ResolveForwardedType("Base").IsErrorType()); 431Assert.True(ilAssembly2.ResolveForwardedType("Base").IsErrorType()); 1897Assert.False(resolved.IsErrorType());
Symbols\Retargeting\RetargetCustomAttributes.cs (1)
394Assert.False(a.AttributeClass.IsErrorType());
Symbols\Retargeting\RetargetingTests.cs (2)
915Assert.False(originalType.IsErrorType()); 916Assert.False(retargetedType.IsErrorType());
Symbols\Source\BaseClassTests.cs (16)
466Assert.False(cBase.IsErrorType()); 468Assert.True(c.Interfaces().Single().TypeArguments().Single().IsErrorType()); //can't see base of C while evaluating C.B 535Assert.True(m.BaseType().IsErrorType()); 550Assert.False(o.BaseType().IsErrorType()); 568Assert.False(p.BaseType().IsErrorType()); 589Assert.False(rBase.IsErrorType()); 609Assert.False(ifaces[0].IsErrorType()); 629Assert.False(ifaces[0].IsErrorType()); 634Assert.False(ixFaces[0].IsErrorType()); 654Assert.False(ifaces[0].IsErrorType()); 671Assert.True(b.BaseType().IsErrorType()); 688Assert.True(z.BaseType().IsErrorType()); 1529Assert.False(baseB.IsErrorType()); 1533Assert.True(baseY.IsErrorType()); 1545Assert.True(baseY.IsErrorType()); 1549Assert.False(baseB.IsErrorType());
Symbols\TypeTests.cs (1)
1458Assert.False(errSymbol.IsErrorType(), "ErrorType");
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
FunctionPointerUtilities.cs (1)
354=> typeSymbol => Assert.True(typeSymbol.IsErrorType());
UsesIsNullableVisitor.cs (1)
158return (type.NullableAnnotation != NullableAnnotation.Oblivious && typeSymbol.IsReferenceType && !typeSymbol.IsErrorType()) ||