361 references to IsErrorType
Microsoft.CodeAnalysis.CSharp (202)
Binder\Binder.WithQueryLambdaParametersBinder.cs (1)
80if (receiver.Type?.IsErrorType() != true)
Binder\Binder_Attributes.cs (5)
170if (attributeTypeForBinding.IsErrorType()) 190if (attributeTypeForBinding.IsErrorType()) 203suppressResultDiagnostics: attributeType.IsErrorType(), 283if (attributeType.IsErrorType() || attributeType.IsAbstract || attributeConstructor is null) 410Debug.Assert(!attributeType.IsErrorType());
Binder\Binder_Conversions.cs (4)
418Debug.Assert(targetTyped || destination.IsErrorType() || destination.Equals(source.Type, TypeCompareKind.ConsiderEverything)); 421hasErrors |= source.HasErrors || destination.IsErrorType(); 433if (targetTyped && !destination.IsErrorType() && !Compilation.IsFeatureEnabled(MessageID.IDS_FeatureTargetTypedConditional)) 455Debug.Assert(targetTyped || destination.IsErrorType() || destination.Equals(source.Type, TypeCompareKind.ConsiderEverything));
Binder\Binder_Deconstruct.cs (2)
122if ((object?)boundRHS.Type == null || boundRHS.Type.IsErrorType()) 717if (receiver.Type?.IsErrorType() == false)
Binder\Binder_Expressions.cs (17)
1356BoundTypeExpression boundType = new BoundTypeExpression(typeSyntax, alias, typeWithAnnotations, type.IsErrorType()); 1393bool typeHasErrors = type.IsErrorType() || CheckManagedAddr(Compilation, type, node.Location, diagnostics); 1906var constantValueOpt = localSymbol.IsConst && !IsInsideNameof && !type.IsErrorType() 2392if (!rangeType.IsErrorType()) 2496bool suppressErrors = operand.HasAnyErrors || targetType.IsErrorType(); 2520if (operand.HasAnyErrors || targetType.IsErrorType()) 3450if (!bestType.IsErrorType()) 3517if ((object)boundExpression.Type == null || !boundExpression.Type.IsErrorType()) 3601Debug.Assert(init.Type.IsErrorType()); 3808if (!elementType.Type.IsErrorType()) 4253Debug.Assert(initializerType.IsErrorType() || 5333if (!hasEnumerableInitializerType && !initializerSyntax.HasErrors && !initializerType.IsErrorType()) 5371else if (!initializerType.IsErrorType()) 5643bool hasErrors = type.IsErrorType(); 5846if (coClassType.IsErrorType()) 6166if (type.IsErrorType()) 8122if (type.IsErrorType())
Binder\Binder_InterpolatedString.cs (1)
313if (interpolatedStringHandlerType.IsErrorType())
Binder\Binder_Operators.cs (3)
2693if (isOperandNullOrNew || operand.Type?.IsErrorType() == true) 3300return !(targetType?.IsErrorType() == true && bindAsTypeDiagnostics.HasAnyResolvedErrors()); 4239if (bestType.IsErrorType())
Binder\Binder_Patterns.cs (6)
228if (inputType.IsErrorType()) 309if (inputType.IsErrorType() || inputType.IsDynamic()) 698(conversion.ConversionKind == ConversionKind.NoConversion && convertedExpression.Type?.IsErrorType() == true)) 721if (inputType.IsErrorType() || patternType.IsErrorType()) 1485if (!receiverType.IsErrorType())
Binder\Binder_QueryErrors.cs (2)
225if (!t.IsErrorType()) 233if ((object)type == null || type.IsErrorType())
Binder\Binder_Statements.cs (14)
410if ((object)type == null || !type.IsErrorType() && !Compilation.IsExceptionType(type.EffectiveType(ref useSiteInfo), ref useSiteInfo)) 1035if (!declTypeOpt.Type.IsErrorType()) 1979if (targetType.IsErrorType()) 2093if (anonymousFunction.ParameterType(i).IsErrorType()) 2145if (lambdaParameterType.IsErrorType()) 2204if (!sourceType.IsErrorType() && !targetType.IsErrorType()) 2940hasErrors |= arg.HasErrors || ((object)arg.Type != null && arg.Type.IsErrorType()); 3151if (type.IsErrorType()) 3185Debug.Assert(((object)type == null) || !type.IsErrorType()); 3195if (previousBlock.ExceptionFilterOpt == null && (object)previousType != null && !previousType.IsErrorType()) 3235Debug.Assert(local.Type.IsErrorType() || (TypeSymbol.Equals(local.Type, type, TypeCompareKind.ConsiderEverything2))); 3403if (returnType.IsErrorType()) 3731else if (baseType.IsErrorType() || baseType.IsStatic)
Binder\Binder_Symbols.cs (1)
1216if (!unconstructedType.IsErrorType())
Binder\Binder_WithExpression.cs (1)
38else if (!receiverType.IsErrorType())
Binder\DecisionDagBuilder.cs (4)
284Debug.Assert(pattern.HasErrors || pattern.InputType.Equals(input.Type, TypeCompareKind.AllIgnoreOptions) || pattern.InputType.IsErrorType()); 404Debug.Assert(variableAccess.Type!.Equals(input.Type, TypeCompareKind.AllIgnoreOptions) || variableAccess.Type.IsErrorType()); 519RoslynDebug.Assert(input.Type.IsErrorType() || recursive.HasErrors || recursive.InputType.IsErrorType() || input.Type.Equals(recursive.InputType, TypeCompareKind.AllIgnoreOptions));
Binder\DecisionDagBuilder_ListPatterns.cs (2)
15Debug.Assert(input.Type.IsErrorType() || list.HasErrors || list.InputType.IsErrorType() ||
Binder\ExecutableCodeBinder.cs (1)
145else if (!returnType.IsErrorType())
Binder\ForEachLoopBinder.cs (3)
409hasErrors = hasErrors || boundIterationVariableType.HasErrors || iterationVariableType.Type.IsErrorType(); 522(builder.ElementType.IsNullableType() && builder.ElementType.GetMemberTypeArgumentsNoUseSiteDiagnostics().Single().IsErrorType() && collectionExpr.Type.IsArray())); 721if (collectionExprType.IsErrorType())
Binder\Semantics\BestTypeInferrer.cs (5)
76if (type.IsErrorType()) 131if (type1.IsErrorType()) 147if (type2.IsErrorType()) 258if (type1.IsErrorType()) 263if (type2 is null || type2.IsErrorType())
Binder\Semantics\Conversions\ConversionsBase.cs (1)
2479if (source.IsErrorType())
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (2)
451if (!fixedResultType.Type.IsErrorType()) 3091!type.IsErrorType() &&
Binder\Semantics\OverloadResolution\OverloadResolution.cs (2)
2987r1.IsErrorType() || 2988r2.IsErrorType() ||
Binder\SwitchBinder.cs (1)
378if ((object)switchGoverningType != null && !switchGoverningType.IsErrorType())
Binder\SwitchExpressionArmBinder.cs (1)
40bool hasErrors = switchGoverningType.IsErrorType();
Binder\UsingStatementBinder.cs (1)
251if (type is null || !type.IsErrorType())
BoundTree\BoundNode.cs (1)
104return expression?.Type?.IsErrorType() == true;
Compilation\CSharpCompilation.cs (1)
1647Debug.Assert(result?.IsErrorType() != true);
Compilation\CSharpSemanticModel.cs (3)
2849if (bnode != null && !cdestination.IsErrorType()) 2901if (bnode != null && !destination.IsErrorType()) 3584if (namedType.IsErrorType())
Emitter\Model\NamedTypeSymbolAdapter.cs (1)
781Debug.Assert(AdaptedNamedTypeSymbol.IsErrorType() ||
Emitter\Model\PEAssemblyBuilder.cs (1)
519Debug.Assert(userDefinedAttribute?.IsErrorType() != true);
Emitter\NoPia\EmbeddedTypesManager.cs (2)
63if (typeSymbol.IsErrorType()) 243if (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))); 1178else if (!_alreadyReported[slot] && !symbol.GetTypeOrReturnType().Type.IsErrorType())
FlowAnalysis\NullableWalker.cs (15)
719if (symbolType.Type.IsValueType || symbolType.Type.IsErrorType()) 1962(nodeType.IsErrorType() || 2957Debug.Assert(node.Type.IsErrorType() || type.Type.IsErrorType()); 3310Debug.Assert(type.Type.IsErrorType()); 3360return typeA?.IsErrorType() != false && typeB?.IsErrorType() != false; 3372return type.IsErrorType() || type.IsDynamic() || type.HasUseSiteError || (type.IsAnonymousType && canIgnoreAnonymousType((NamedTypeSymbol)type)); 5378oldType.IsVoidType() || oldType.IsErrorType() ? oldType : 7333if (containingType is null || containingType.IsErrorType() || symbol is ErrorMethodSymbol) 8187if (checkConversion && !targetType.IsErrorType()) 8206Debug.Assert(targetType.IsValueType || targetType.IsErrorType()); 8212if (!conversionOperand.HasErrors && !targetType.IsErrorType()) 10906if (isValueType && (!checkNullableValueType || !type.IsNullableTypeOrTypeParameter() || type.GetNullableUnderlyingType().IsErrorType())) 11007Debug.Assert(node.Type is null || node.Type.IsErrorType() || node.Type.IsRefLikeType);
FlowAnalysis\NullableWalker_Patterns.cs (3)
712Debug.Assert(NominalSlotType(slot) is var slotType && (slotType.IsErrorType() || isDerivedType(slotType, type))); 719if (derivedType.IsErrorType() || baseType.IsErrorType())
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (1)
344!builderType.IsErrorType() &&
Lowering\LocalRewriter\LocalRewriter_IsPatternOperator.cs (1)
175if (test.Type?.IsErrorType() != false)
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (2)
52Debug.Assert(loweredLeft.Type is { } && (loweredLeft.Type.IsStringType() || loweredLeft.Type.IsErrorType()) || loweredLeft.ConstantValueOpt?.IsNull == true); 53Debug.Assert(loweredRight.Type is { } && (loweredRight.Type.IsStringType() || loweredRight.Type.IsErrorType()) || loweredRight.ConstantValueOpt?.IsNull == true);
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (1)
329Debug.Assert(result.Type.SpecialType == SpecialType.System_String || result.Type.IsErrorType());
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (3)
633delegateTypeOverMethodTypeParameters.IsErrorType() || 635callSiteTypeGeneric.IsErrorType() || 744if (callSiteType.IsErrorType())
Lowering\SyntheticBoundNodeFactory.cs (3)
439right.Type.IsErrorType() || left.Type.IsErrorType())); 845Debug.Assert(left.Type!.Equals(right.Type, TypeCompareKind.IgnoreCustomModifiersAndArraySizesAndLowerBounds | TypeCompareKind.IgnoreNullableModifiersForReferenceTypes) || left.Type.IsErrorType());
Symbols\ArrayTypeSymbol.cs (2)
112if (!iListOfT.IsErrorType()) 119if (!iReadOnlyListOfT.IsErrorType())
Symbols\AssemblySymbol.cs (11)
616Debug.Assert(result?.IsErrorType() != true); 671Debug.Assert(!type.IsErrorType()); 683Debug.Assert(!type.IsErrorType()); 698Debug.Assert(type?.IsErrorType() != true); 778Debug.Assert(symbol?.IsErrorType() != true); 812Debug.Assert(!symbol.IsErrorType()); 872Debug.Assert(result?.IsErrorType() != true); 894Debug.Assert(corLibCandidate?.IsErrorType() != true); 929Debug.Assert(candidate?.IsErrorType() != true); 974Debug.Assert(result?.IsErrorType() != true); 1011Debug.Assert(result?.IsErrorType() != true);
Symbols\Attributes\AttributeData.cs (2)
91if (this.AttributeClass.IsErrorType() && !(this.AttributeClass is MissingMetadataTypeSymbol)) 114Debug.Assert(!attributeType.IsErrorType());
Symbols\Attributes\PEAttributeData.cs (1)
87else if ((object)attributeClass == null || attributeClass.IsErrorType() || (object)attributeConstructor == null)
Symbols\Compilation_WellKnownMembers.cs (4)
101if (!type.IsErrorType()) 148Debug.Assert(result?.IsErrorType() != true); 178TypeSymbol.Equals(result, _lazyWellKnownTypes[index], TypeCompareKind.ConsiderEverything2) || (_lazyWellKnownTypes[index]!.IsErrorType() && result.IsErrorType())
Symbols\ConstraintsHelper.cs (6)
267if (!deducedBaseType.IsErrorType() && !constraintDeducedBase.IsErrorType()) 966if (typeArgument.Type.IsErrorType()) 1245if (constraintType.Type.IsErrorType()) 1513Debug.Assert(deducedBase.IsErrorType() || 1514effectiveBase.IsErrorType() ||
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (1)
212Debug.Assert(specifierType?.IsErrorType() != true);
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (1)
208Debug.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)
604Debug.Assert(currentModuleResult?.IsErrorType() != true); 704Debug.Assert(result?.IsErrorType() != true);
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
2320var coClassType = ((object)type != null && (type.TypeKind == TypeKind.Class || type.IsErrorType())) ? (NamedTypeSymbol)type : null;
Symbols\MetadataOrSourceAssemblySymbol.cs (2)
58Debug.Assert(result?.IsErrorType() != true); 206if (!type.IsErrorType())
Symbols\NamedTypeSymbol.cs (2)
1170internal static readonly Func<TypeWithAnnotations, bool> TypeWithAnnotationsIsErrorType = type => type.HasType && type.Type.IsErrorType(); 1436if (@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)
58if (_underlyingSymbol.IsErrorType())
Symbols\PublicModel\NonErrorNamedTypeSymbol.cs (1)
19Debug.Assert(!underlying.IsErrorType());
Symbols\Retargeting\RetargetingNamedTypeSymbol.cs (1)
264Debug.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)
134originalType.IsErrorType() ||
Symbols\Source\LambdaSymbol.cs (1)
159Debug.Assert(_returnType.Type.IsErrorType());
Symbols\Source\SourceAssemblySymbol.cs (2)
1406if (forwarded.IsErrorType()) 1886return !obj.IsErrorType() && obj.DeclaredAccessibility == Accessibility.Public;
Symbols\Source\SourceComplexParameterSymbol.cs (1)
612Debug.Assert(!attributeType.IsErrorType());
Symbols\Source\SourceEventSymbol.cs (1)
590else if (!this.Type.IsDelegateType() && !this.Type.IsErrorType())
Symbols\Source\SourceLocalSymbol.cs (2)
398originalType.Value.DefaultType.IsErrorType() && newType.Type.IsErrorType() ||
Symbols\Source\SourceMemberContainerSymbol.cs (5)
1809predicate: (t, a, b) => !t.TupleElementNames.IsDefaultOrEmpty && !t.IsErrorType(), 4052if (deconstruct.ReturnType.SpecialType != SpecialType.System_Void && !deconstruct.ReturnType.IsErrorType()) 4156if (!printMembersMethod.ReturnType.IsErrorType()) 4418if (!equalityContract.Type.IsErrorType()) 4476if (thisEquals.ReturnType.SpecialType != SpecialType.System_Boolean && !thisEquals.ReturnType.IsErrorType())
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (2)
504if (this.BaseTypeNoUseSiteDiagnostics?.IsErrorType() == true) 1193return (object)typeSymbol.VisitType((currentTypeSymbol, unused1, unused2) => currentTypeSymbol.IsErrorType(), (object)null) != null;
Symbols\Source\SourceMemberFieldSymbol.cs (1)
539if ((object)initializerOpt.Type != null && !initializerOpt.Type.IsErrorType())
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1164return !returnType.IsErrorType() &&
Symbols\Source\SourceNamedTypeSymbol.cs (1)
1217Debug.Assert(!this.IsErrorType());
Symbols\SubstitutedNamedTypeSymbol.cs (1)
52Debug.Assert(!originalDefinition.IsErrorType());
Symbols\Symbol_Attributes.cs (2)
765if (!boundAttributeType.IsErrorType()) 802if (!attributeType.IsErrorType())
Symbols\Synthesized\Records\SynthesizedRecordBaseEquals.cs (1)
68if (parameter.Type.IsErrorType())
Symbols\Synthesized\Records\SynthesizedRecordClone.cs (1)
119if (ReturnType.IsErrorType())
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (2)
124if (ReturnType.IsErrorType() || 125printableMembers.Any(static m => m.GetTypeOrReturnType().Type.IsErrorType()))
Symbols\Tuples\TupleTypeSymbol.cs (2)
55if (numElements >= ValueTupleRestPosition && diagnostics != null && !underlyingType.IsErrorType()) 746var diagnosticInfo = container.IsErrorType() ?
Symbols\TypeSymbolExtensions.cs (4)
482return type.IsErrorType() || type.IsRefLikeType; 566if (type.IsErrorType()) 1171var result = type.VisitType((type, unused1, unused2) => type.IsErrorType(), (object?)null, canDigThroughNullable: true); 1214RoslynDebug.Assert((object?)result == null || !result.IsErrorType());
Symbols\TypeWithAnnotations.cs (2)
194if (!typeSymbol.IsValueType && !typeSymbol.IsErrorType()) 568typeWithAnnotationsPredicate: (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()); 22320Assert.True(methodM.ReturnType.IsErrorType()); 22360Assert.True(methodM.ReturnType.IsErrorType()); 25368Assert.False(found.IsErrorType()); 25373Assert.False(tuple2.IsErrorType()); 25379Assert.False(tuple3.IsErrorType()); 25385Assert.True(tuple4.IsErrorType()); 26794Assert.True(tuple.IsErrorType()); 26800Assert.True(tuple.IsErrorType()); 26864Assert.True(tuple.IsErrorType()); 26926Assert.True(container.IsErrorType()); 26939Assert.False(tuple.TupleUnderlyingType.IsErrorType()); 26940Assert.False(tuple.IsErrorType()); 26998Assert.True(contained.IsErrorType()); 27006Assert.False(tuple1.TupleUnderlyingType.IsErrorType()); 27007Assert.False(tuple1.IsErrorType()); 27014Assert.True(container.IsErrorType()); 27022Assert.False(tuple2.TupleUnderlyingType.IsErrorType()); 27023Assert.False(tuple2.IsErrorType());
Emit\CompilationEmitTests.cs (2)
5552Assert.False(b.IsErrorType()); 5557Assert.False(a.IsErrorType());
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Attributes\AttributeTests.cs (1)
355Assert.False(c.IsErrorType());
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (1)
CompilationContext.cs (1)
1065if (typeSymbol.IsErrorType())
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (28)
Semantics\InitOnlyMemberTests.cs (4)
3281Assert.False(property1.SetMethod.Parameters[0].Type.IsErrorType()); 3286Assert.False(property2.SetMethod.Parameters[0].Type.IsErrorType()); 3373Assert.False(property1.SetMethod.Parameters[0].Type.IsErrorType()); 3379Assert.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)
1155Assert.False(type1.IsErrorType()); 1176Assert.True(type2.IsErrorType()); 1230Assert.False(typeA.IsErrorType()); 1248Assert.True(typeB.IsErrorType());
Semantics\NullableReferenceTypesTests.cs (1)
56876Assert.True(type.Type.IsErrorType());
Semantics\TopLevelStatementsTests.cs (1)
1089Assert.False(entryPoint.ReturnType.IsErrorType());
Semantics\ValueTupleTests.cs (8)
168Assert.True(comp.GetWellKnownType(WellKnownType.System_ValueTuple_T1).IsErrorType()); 171Assert.True(comp.GetWellKnownType(WellKnownType.System_ValueTuple_T2).IsErrorType()); 175Assert.True(comp.GetWellKnownType(WellKnownType.System_ValueTuple_T3).IsErrorType()); 180Assert.True(comp.GetWellKnownType(WellKnownType.System_ValueTuple_T4).IsErrorType()); 186Assert.True(comp.GetWellKnownType(WellKnownType.System_ValueTuple_T5).IsErrorType()); 193Assert.True(comp.GetWellKnownType(WellKnownType.System_ValueTuple_T6).IsErrorType()); 200Assert.True(comp.GetWellKnownType(WellKnownType.System_ValueTuple_T7).IsErrorType()); 208Assert.True(comp.GetWellKnownType(WellKnownType.System_ValueTuple_TRest).IsErrorType());
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (91)
Compilation\SemanticModelAPITests.cs (1)
3627Assert.False(((NamedTypeSymbol)newSymbol).TypeArguments().Single().IsErrorType());
Symbols\CompilationCreationTests.cs (2)
84Assert.True(type.IsErrorType()); // Not available 88Assert.False(type.IsErrorType());
Symbols\CorLibrary\Choosing.cs (2)
42Assert.False(obj.IsErrorType()); 72Assert.True(consumer.GetSpecialType(SpecialType.System_Object).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)
3750Assert.False(i2.IsErrorType()); 3784Assert.False(i2.IsErrorType()); 3818Assert.False(i2.IsErrorType()); 3852Assert.False(i2.IsErrorType()); 3901Assert.False(i2.IsErrorType()); 3909Assert.False(iEquatable.IsErrorType()); 3914Assert.True(iQueryable_T.IsErrorType()); 3918Assert.True(iQueryable.IsErrorType()); 3927Assert.False(t.IsErrorType()); 3934Assert.True(t.IsErrorType()); 3941Assert.False(t.IsErrorType()); 3948Assert.True(t.IsErrorType()); 3955Assert.False(t.IsErrorType()); 3969Assert.False(t.IsErrorType()); 3983Assert.False(t.IsErrorType()); 3990Assert.False(t.IsErrorType()); 3997Assert.True(t.IsErrorType()); 4004Assert.False(t.IsErrorType()); 4011Assert.False(t.IsErrorType()); 4025Assert.False(t.IsErrorType()); 4032Assert.False(t.IsErrorType()); 4039Assert.True(t.IsErrorType()); 4046Assert.True(t.IsErrorType()); 4053Assert.True(t.IsErrorType()); 4067Assert.True(t.IsErrorType()); 4081Assert.False(t.IsErrorType()); 4088Assert.True(t.IsErrorType()); 4095Assert.False(t.IsErrorType()); 4102Assert.True(t.IsErrorType()); 4109Assert.True(t.IsErrorType()); 4130Assert.True(t.IsErrorType()); 4139Assert.False(t.IsErrorType()); 4150Assert.False(t.IsErrorType()); 4161Assert.False(t.IsErrorType()); 4175Assert.False(t.IsErrorType()); 4189Assert.False(t.IsErrorType()); 4196Assert.False(t.IsErrorType()); 4207Assert.False(t.IsErrorType()); 4214Assert.False(t.IsErrorType()); 4228Assert.False(t.IsErrorType()); 4235Assert.False(t.IsErrorType()); 4272Assert.False(t.IsErrorType()); 4283Assert.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\TypeForwarders.cs (5)
186Assert.False(baseType.IsErrorType()); 426Assert.False(baseType.IsErrorType()); 429Assert.True(ilAssembly1.ResolveForwardedType("Base").IsErrorType()); 431Assert.True(ilAssembly2.ResolveForwardedType("Base").IsErrorType()); 1891Assert.False(resolved.IsErrorType());
Symbols\Retargeting\RetargetCustomAttributes.cs (1)
393Assert.False(a.AttributeClass.IsErrorType());
Symbols\Retargeting\RetargetingTests.cs (2)
915Assert.False(originalType.IsErrorType()); 916Assert.False(retargetedType.IsErrorType());
Symbols\Source\BaseClassTests.cs (16)
465Assert.False(cBase.IsErrorType()); 467Assert.True(c.Interfaces().Single().TypeArguments().Single().IsErrorType()); //can't see base of C while evaluating C.B 534Assert.True(m.BaseType().IsErrorType()); 549Assert.False(o.BaseType().IsErrorType()); 567Assert.False(p.BaseType().IsErrorType()); 588Assert.False(rBase.IsErrorType()); 608Assert.False(ifaces[0].IsErrorType()); 628Assert.False(ifaces[0].IsErrorType()); 633Assert.False(ixFaces[0].IsErrorType()); 653Assert.False(ifaces[0].IsErrorType()); 670Assert.True(b.BaseType().IsErrorType()); 687Assert.True(z.BaseType().IsErrorType()); 1528Assert.False(baseB.IsErrorType()); 1532Assert.True(baseY.IsErrorType()); 1544Assert.True(baseY.IsErrorType()); 1548Assert.False(baseB.IsErrorType());
Symbols\TypeTests.cs (1)
1457Assert.False(errSymbol.IsErrorType(), "ErrorType");
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
FunctionPointerUtilities.cs (1)
352=> typeSymbol => Assert.True(typeSymbol.IsErrorType());
UsesIsNullableVisitor.cs (1)
158return (type.NullableAnnotation != NullableAnnotation.Oblivious && typeSymbol.IsReferenceType && !typeSymbol.IsErrorType()) ||