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