373 references to IsErrorType
Microsoft.CodeAnalysis.CSharp (210)
Binder\Binder.WithQueryLambdaParametersBinder.cs (1)
80
if (receiver.Type?.
IsErrorType
() != true)
Binder\Binder_Attributes.cs (6)
170
if (attributeTypeForBinding.
IsErrorType
())
189
if (attributeTypeForBinding.
IsErrorType
())
203
suppressResultDiagnostics: attributeType.
IsErrorType
(),
294
if (attributeType.
IsErrorType
() || attributeType.IsAbstract || attributeConstructor is null)
423
Debug.Assert(!attributeType.
IsErrorType
());
521
if (attributeType.
IsErrorType
())
Binder\Binder_Await.cs (1)
339
if (asyncHelpersType.
IsErrorType
())
Binder\Binder_Conversions.cs (6)
715
if (stringFactory.
IsErrorType
() || haveErrors)
1721
BindToNaturalType(expression, diagnostics, reportNoTargetType: !targetType.
IsErrorType
()) :
1930
Debug.Assert(targetTyped || destination.
IsErrorType
() || destination.Equals(source.Type, TypeCompareKind.ConsiderEverything));
1934
hasErrors |= source.HasErrors || destination.
IsErrorType
();
1947
if (targetTyped && !destination.
IsErrorType
() && !Compilation.IsFeatureEnabled(MessageID.IDS_FeatureTargetTypedConditional))
1969
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
())
718
if (receiver.Type?.
IsErrorType
() == false)
Binder\Binder_Expressions.cs (17)
1400
BoundTypeExpression boundType = new BoundTypeExpression(typeSyntax, alias, typeWithAnnotations, type.
IsErrorType
());
1437
bool typeHasErrors = type.
IsErrorType
() || CheckManagedAddr(Compilation, type, node.Location, diagnostics);
2132
var constantValueOpt = localSymbol.IsConst && !IsInsideNameof && !type.
IsErrorType
()
2675
if (!rangeType.
IsErrorType
())
2779
bool suppressErrors = operand.HasAnyErrors || targetType.
IsErrorType
();
2803
if (operand.HasAnyErrors || targetType.
IsErrorType
())
4192
if (!bestType.
IsErrorType
())
4259
if ((object)boundExpression.Type == null || !boundExpression.Type.
IsErrorType
())
4343
Debug.Assert(init.Type.
IsErrorType
());
4550
if (!elementType.Type.
IsErrorType
())
5034
Debug.Assert(initializerType.
IsErrorType
() ||
6301
if (!hasEnumerableInitializerType && !initializerSyntax.HasErrors && !initializerType.
IsErrorType
())
6339
else if (!initializerType.
IsErrorType
())
6722
bool hasErrors = type.
IsErrorType
();
7002
if (coClassType.
IsErrorType
())
7322
if (type.
IsErrorType
())
9833
if (type.
IsErrorType
())
Binder\Binder_InterpolatedString.cs (2)
259
if (unconvertedInterpolatedString.Type.
IsErrorType
() || haveErrors || canLowerToStringConcatenation(parts))
451
if (interpolatedStringHandlerType.
IsErrorType
())
Binder\Binder_Operators.cs (3)
4195
if (isOperandNullOrNew || operand.Type?.
IsErrorType
() == true)
4802
return !(targetType?.
IsErrorType
() == true && bindAsTypeDiagnostics.HasAnyResolvedErrors());
5774
if (bestType.
IsErrorType
())
Binder\Binder_Patterns.cs (6)
229
if (inputType.
IsErrorType
())
310
if (inputType.
IsErrorType
() || inputType.IsDynamic())
708
(conversion.ConversionKind == ConversionKind.NoConversion && convertedExpression.Type?.
IsErrorType
() == true))
731
if (inputType.
IsErrorType
() || patternType.
IsErrorType
())
1495
if (!receiverType.
IsErrorType
())
Binder\Binder_QueryErrors.cs (2)
225
if (!t.
IsErrorType
())
233
if ((object)type == null || type.
IsErrorType
())
Binder\Binder_Statements.cs (13)
413
if ((object)type == null || !type.
IsErrorType
() && !Compilation.IsExceptionType(type.EffectiveType(ref useSiteInfo), ref useSiteInfo))
1034
if (!declTypeOpt.Type.
IsErrorType
())
1485
if (op1.Type is { } lhsType && !lhsType.
IsErrorType
())
2047
if (targetType.
IsErrorType
())
2161
if (anonymousFunction.ParameterType(i).
IsErrorType
())
2233
Debug.Assert(!lambdaParameterType.
IsErrorType
());
3078
hasErrors |= arg.HasErrors || ((object)arg.Type != null && arg.Type.
IsErrorType
());
3289
if (type.
IsErrorType
())
3323
Debug.Assert(((object)type == null) || !type.
IsErrorType
());
3333
if (previousBlock.ExceptionFilterOpt == null && (object)previousType != null && !previousType.
IsErrorType
())
3373
Debug.Assert(local.Type.
IsErrorType
() || (TypeSymbol.Equals(local.Type, type, TypeCompareKind.ConsiderEverything2)));
3543
if (returnType.
IsErrorType
())
3871
else if (baseType.
IsErrorType
() || baseType.IsStatic)
Binder\Binder_Symbols.cs (1)
1226
if (!unconstructedType.
IsErrorType
())
Binder\Binder_WithExpression.cs (1)
38
else if (!receiverType.
IsErrorType
())
Binder\DecisionDagBuilder.cs (4)
287
Debug.Assert(pattern.HasErrors || pattern.InputType.Equals(input.Type, TypeCompareKind.AllIgnoreOptions) || pattern.InputType.
IsErrorType
());
407
Debug.Assert(variableAccess.Type!.Equals(input.Type, TypeCompareKind.AllIgnoreOptions) || variableAccess.Type.
IsErrorType
());
522
RoslynDebug.Assert(input.Type.
IsErrorType
() || recursive.HasErrors || recursive.InputType.
IsErrorType
() || input.Type.Equals(recursive.InputType, TypeCompareKind.AllIgnoreOptions));
Binder\DecisionDagBuilder_ListPatterns.cs (2)
16
Debug.Assert(input.Type.
IsErrorType
() || list.HasErrors || list.InputType.
IsErrorType
() ||
Binder\ExecutableCodeBinder.cs (1)
150
else if (!returnType.
IsErrorType
())
Binder\ForEachLoopBinder.cs (4)
441
hasErrors = hasErrors || boundIterationVariableType.HasErrors || iterationVariableType.Type.
IsErrorType
();
557
(builder.ElementType.IsNullableType() && builder.ElementType.GetMemberTypeArgumentsNoUseSiteDiagnostics().Single().
IsErrorType
() && collectionExpr.Type.IsArray()));
801
if (collectionExprType.
IsErrorType
())
855
if (spanType.
IsErrorType
())
Binder\Semantics\BestTypeInferrer.cs (4)
140
if (type1.
IsErrorType
())
155
if (type2.
IsErrorType
())
266
if (type1.
IsErrorType
())
271
if (type2 is null || type2.
IsErrorType
())
Binder\Semantics\Conversions\ConversionsBase.cs (3)
2626
if (source.
IsErrorType
())
3001
Debug.Assert(targetInterfaceType.
IsErrorType
() || targetInterfaceType.IsInterface);
3035
Debug.Assert(targetInterfaceType.
IsErrorType
() || targetInterfaceType.IsInterface);
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (2)
468
if (!fixedResultType.Type.
IsErrorType
())
3354
!type.
IsErrorType
() &&
Binder\Semantics\OverloadResolution\OverloadResolution.cs (2)
3757
r1.
IsErrorType
() ||
3758
r2.
IsErrorType
() ||
Binder\SwitchBinder.cs (1)
382
if ((object)switchGoverningType != null && !switchGoverningType.
IsErrorType
())
Binder\SwitchExpressionArmBinder.cs (1)
40
bool hasErrors = switchGoverningType.
IsErrorType
();
Binder\UsingStatementBinder.cs (1)
257
if (type is null || !type.
IsErrorType
())
BoundTree\BoundNode.cs (1)
111
return expression?.Type?.
IsErrorType
() == true;
Compilation\CSharpCompilation.cs (1)
1861
Debug.Assert(result?.
IsErrorType
() != true);
Compilation\CSharpSemanticModel.cs (3)
2870
if (bnode != null && !cdestination.
IsErrorType
())
2922
if (bnode != null && !destination.
IsErrorType
())
3606
if (namedType.
IsErrorType
())
Emitter\Model\NamedTypeSymbolAdapter.cs (1)
812
Debug.Assert(AdaptedNamedTypeSymbol.
IsErrorType
() ||
Emitter\Model\PEAssemblyBuilder.cs (1)
636
Debug.Assert(userDefinedAttribute?.
IsErrorType
() != true);
Emitter\NoPia\EmbeddedTypesManager.cs (2)
62
if (typeSymbol.
IsErrorType
())
258
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)));
1174
else if (!_alreadyReported[slot] && !symbol.GetTypeOrReturnType().Type.
IsErrorType
())
FlowAnalysis\NullableWalker.cs (16)
788
if (symbolType.Type.IsValueType || symbolType.Type.
IsErrorType
())
2132
(nodeType.
IsErrorType
() ||
3217
Debug.Assert(node.Type.
IsErrorType
() || type.Type.
IsErrorType
());
3689
Debug.Assert(type.Type.
IsErrorType
());
3752
return typeA?.
IsErrorType
() != false && typeB?.
IsErrorType
() != false;
3764
return type.
IsErrorType
() || type.IsDynamic() || type.HasUseSiteError || (type.IsAnonymousType && canIgnoreAnonymousType((NamedTypeSymbol)type));
3811
&& (type.SpecialType == SpecialType.System_Boolean || type.IsDynamic() || type.
IsErrorType
());
6173
oldType.IsVoidType() || oldType.
IsErrorType
() ? oldType :
8810
if (containingType is null || containingType.
IsErrorType
() || symbol is ErrorMethodSymbol)
9692
if (checkConversion && !targetType.
IsErrorType
())
9730
Debug.Assert(targetType.IsValueType || targetType.
IsErrorType
());
9736
if (!conversionOperand.HasErrors && !targetType.
IsErrorType
())
12781
if (isValueType && (!checkNullableValueType || !type.IsNullableTypeOrTypeParameter() || type.GetNullableUnderlyingType().
IsErrorType
()))
12882
Debug.Assert(node.Type is null || node.Type.
IsErrorType
() || node.Type.IsRefLikeType);
FlowAnalysis\NullableWalker_Patterns.cs (3)
754
Debug.Assert(NominalSlotType(slot) is var slotType && (slotType.
IsErrorType
() || isDerivedType(slotType, type)));
761
if (derivedType.
IsErrorType
() || baseType.
IsErrorType
())
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (1)
344
!builderType.
IsErrorType
() &&
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (1)
431
if (synthesizedType.
IsErrorType
())
Lowering\LocalRewriter\LocalRewriter_IsPatternOperator.cs (1)
175
if (test.Type?.
IsErrorType
() != false)
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (1)
195
Debug.Assert(result.Type.SpecialType == SpecialType.System_String || result.Type.
IsErrorType
());
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (3)
619
delegateTypeOverMethodTypeParameters.
IsErrorType
() ||
621
callSiteTypeGeneric.
IsErrorType
() ||
730
if (callSiteType.
IsErrorType
())
Lowering\SyntheticBoundNodeFactory.cs (5)
442
right.Type.
IsErrorType
() || left.Type.
IsErrorType
()));
926
Debug.Assert(left.Type!.Equals(right.Type, TypeCompareKind.IgnoreCustomModifiersAndArraySizesAndLowerBounds | TypeCompareKind.IgnoreNullableModifiersForReferenceTypes) || left.Type.
IsErrorType
());
1326
Debug.Assert(result.Type.
IsErrorType
() || result.Type!.IsDerivedFrom(result.GetMethodFromHandle!.ReturnType, TypeCompareKind.AllIgnoreOptions, ref discardedUseSiteInfo));
1433
Debug.Assert(result.Type.
IsErrorType
() || result.Type!.IsDerivedFrom(result.GetMethodFromHandle!.ReturnType, TypeCompareKind.AllIgnoreOptions, ref discardedUseSiteInfo));
Symbols\ArrayTypeSymbol.cs (2)
114
if (!iListOfT.
IsErrorType
())
121
if (!iReadOnlyListOfT.
IsErrorType
())
Symbols\AssemblySymbol.cs (11)
666
Debug.Assert(result?.
IsErrorType
() != true);
721
Debug.Assert(!type.
IsErrorType
());
733
Debug.Assert(!type.
IsErrorType
());
748
Debug.Assert(type?.
IsErrorType
() != true);
828
Debug.Assert(symbol?.
IsErrorType
() != true);
862
Debug.Assert(!symbol.
IsErrorType
());
922
Debug.Assert(result?.
IsErrorType
() != true);
944
Debug.Assert(corLibCandidate?.
IsErrorType
() != true);
979
Debug.Assert(candidate?.
IsErrorType
() != true);
1030
Debug.Assert(result?.
IsErrorType
() != true);
1067
Debug.Assert(result?.
IsErrorType
() != true);
Symbols\Attributes\AttributeData.cs (1)
88
Debug.Assert(!attributeType.
IsErrorType
());
Symbols\Attributes\PEAttributeData.cs (1)
88
else if ((object)attributeClass == null || attributeClass.
IsErrorType
() || (object)attributeConstructor == null)
Symbols\Attributes\SourceAttributeData.cs (1)
482
if (attributeClass.
IsErrorType
() && !(attributeClass is MissingMetadataTypeSymbol))
Symbols\Compilation_WellKnownMembers.cs (4)
104
if (!type.
IsErrorType
())
151
Debug.Assert(result?.
IsErrorType
() != true);
183
TypeSymbol.Equals(result, _lazyWellKnownTypes[index], TypeCompareKind.ConsiderEverything2) || (_lazyWellKnownTypes[index]!.
IsErrorType
() && result.
IsErrorType
())
Symbols\ConstraintsHelper.cs (6)
296
if (!deducedBaseType.
IsErrorType
() && !constraintDeducedBase.
IsErrorType
())
1071
if (typeArgument.Type.
IsErrorType
())
1352
if (constraintType.Type.
IsErrorType
())
1629
Debug.Assert(deducedBase.
IsErrorType
() ||
1630
effectiveBase.
IsErrorType
() ||
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (1)
212
Debug.Assert(specifierType?.
IsErrorType
() != true);
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (1)
209
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)
612
Debug.Assert(currentModuleResult?.
IsErrorType
() != true);
720
Debug.Assert(result?.
IsErrorType
() != true);
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
2778
var coClassType = ((object)type != null && (type.TypeKind == TypeKind.Class || type.
IsErrorType
())) ? (NamedTypeSymbol)type : null;
Symbols\MetadataOrSourceAssemblySymbol.cs (2)
60
Debug.Assert(result?.
IsErrorType
() != true);
208
if (!type.
IsErrorType
())
Symbols\NamedTypeSymbol.cs (2)
1307
internal static readonly Func<TypeWithAnnotations, bool> TypeWithAnnotationsIsErrorType = type => type.HasType && type.Type.
IsErrorType
();
1573
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)
59
if (_underlyingSymbol.
IsErrorType
())
Symbols\PublicModel\NonErrorNamedTypeSymbol.cs (1)
19
Debug.Assert(!underlying.
IsErrorType
());
Symbols\Retargeting\RetargetingNamedTypeSymbol.cs (1)
298
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)
136
originalType.
IsErrorType
() ||
Symbols\Source\LambdaSymbol.cs (1)
163
Debug.Assert(_returnType.Type.
IsErrorType
());
Symbols\Source\SourceAssemblySymbol.cs (2)
1416
if (forwarded.
IsErrorType
())
1896
return !obj.
IsErrorType
() && obj.DeclaredAccessibility == Accessibility.Public;
Symbols\Source\SourceComplexParameterSymbol.cs (1)
621
Debug.Assert(!attributeType.
IsErrorType
());
Symbols\Source\SourceEventSymbol.cs (1)
669
else if (!this.Type.IsDelegateType() && !this.Type.
IsErrorType
())
Symbols\Source\SourceLocalSymbol.cs (2)
397
originalType.Value.DefaultType.
IsErrorType
() && newType.Type.
IsErrorType
() ||
Symbols\Source\SourceMemberContainerSymbol.cs (5)
1974
predicate: (t, a, b) => !t.TupleElementNames.IsDefaultOrEmpty && !t.
IsErrorType
(),
4905
if (deconstruct.ReturnType.SpecialType != SpecialType.System_Void && !deconstruct.ReturnType.
IsErrorType
())
5015
if (!printMembersMethod.ReturnType.
IsErrorType
())
5277
if (!equalityContract.Type.
IsErrorType
())
5336
if (thisEquals.ReturnType.SpecialType != SpecialType.System_Boolean && !thisEquals.ReturnType.
IsErrorType
())
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (2)
504
if (this.BaseTypeNoUseSiteDiagnostics?.
IsErrorType
() == true)
1197
return (object)typeSymbol.VisitType((currentTypeSymbol, unused1, unused2) => currentTypeSymbol.
IsErrorType
(), (object)null) != null;
Symbols\Source\SourceMemberFieldSymbol.cs (1)
554
if ((object)initializerOpt.Type != null && !initializerOpt.Type.
IsErrorType
())
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1617
return !returnType.
IsErrorType
() &&
Symbols\Source\SourceNamedTypeSymbol.cs (1)
1306
Debug.Assert(!this.
IsErrorType
());
Symbols\Source\SourceOrdinaryMethodSymbol.cs (1)
715
if (this.ReturnType?.
IsErrorType
() == true && GetSyntax().ReturnType is IdentifierNameSyntax { Identifier.RawContextualKind: (int)SyntaxKind.PartialKeyword })
Symbols\SubstitutedNamedTypeSymbol.cs (1)
61
Debug.Assert(!originalDefinition.
IsErrorType
());
Symbols\Symbol_Attributes.cs (2)
790
if (!boundAttributeType.
IsErrorType
())
827
if (!attributeType.
IsErrorType
())
Symbols\Synthesized\Records\SynthesizedRecordBaseEquals.cs (1)
59
if (parameter.Type.
IsErrorType
())
Symbols\Synthesized\Records\SynthesizedRecordClone.cs (1)
114
if (ReturnType.
IsErrorType
())
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (2)
123
if (ReturnType.
IsErrorType
() ||
124
printableMembers.Any(static m => m.GetTypeOrReturnType().Type.
IsErrorType
()))
Symbols\Tuples\TupleTypeSymbol.cs (1)
739
var diagnosticInfo = container.
IsErrorType
() ?
Symbols\TypeSymbolExtensions.cs (4)
542
return type.
IsErrorType
() || type.IsRefLikeOrAllowsRefLikeType();
631
if (type.
IsErrorType
())
1261
var result = type.VisitType((type, unused1, unused2) => type.
IsErrorType
(), (object?)null, canDigThroughNullable: true);
1304
RoslynDebug.Assert((object?)result == null || !result.
IsErrorType
());
Symbols\TypeWithAnnotations.cs (2)
202
if (!typeSymbol.IsValueType && !typeSymbol.
IsErrorType
())
596
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
());
22288
Assert.True(methodM.ReturnType.
IsErrorType
());
22328
Assert.True(methodM.ReturnType.
IsErrorType
());
25330
Assert.False(found.
IsErrorType
());
25335
Assert.False(tuple2.
IsErrorType
());
25341
Assert.False(tuple3.
IsErrorType
());
25347
Assert.True(tuple4.
IsErrorType
());
26756
Assert.True(tuple.
IsErrorType
());
26762
Assert.True(tuple.
IsErrorType
());
26826
Assert.True(tuple.
IsErrorType
());
26888
Assert.True(container.
IsErrorType
());
26901
Assert.False(tuple.TupleUnderlyingType.
IsErrorType
());
26902
Assert.False(tuple.
IsErrorType
());
26960
Assert.True(contained.
IsErrorType
());
26968
Assert.False(tuple1.TupleUnderlyingType.
IsErrorType
());
26969
Assert.False(tuple1.
IsErrorType
());
26976
Assert.True(container.
IsErrorType
());
26984
Assert.False(tuple2.TupleUnderlyingType.
IsErrorType
());
26985
Assert.False(tuple2.
IsErrorType
());
Emit\CompilationEmitTests.cs (2)
5558
Assert.False(b.
IsErrorType
());
5563
Assert.False(a.
IsErrorType
());
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Attributes\AttributeTests.cs (1)
355
Assert.False(c.
IsErrorType
());
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (28)
Semantics\InitOnlyMemberTests.cs (4)
3286
Assert.False(property1.SetMethod.Parameters[0].Type.
IsErrorType
());
3291
Assert.False(property2.SetMethod.Parameters[0].Type.
IsErrorType
());
3378
Assert.False(property1.SetMethod.Parameters[0].Type.
IsErrorType
());
3384
Assert.False(property2.SetMethod.Parameters[0].Type.
IsErrorType
());
Semantics\LocalFunctionTests.cs (10)
1719
Assert.True(attrs[0].AttributeClass.
IsErrorType
());
1720
Assert.True(attrs[1].AttributeClass.
IsErrorType
());
1721
Assert.False(attrs[2].AttributeClass.
IsErrorType
());
1726
Assert.True(attrs[3].AttributeClass.
IsErrorType
());
1924
Assert.True(attrs[0].AttributeClass.
IsErrorType
());
1925
Assert.True(attrs[1].AttributeClass.
IsErrorType
());
1926
Assert.False(attrs[2].AttributeClass.
IsErrorType
());
1931
Assert.True(attrs[3].AttributeClass.
IsErrorType
());
1974
Assert.True(attrs[0].AttributeClass.
IsErrorType
());
1975
Assert.True(attrs[1].AttributeClass.
IsErrorType
());
Semantics\NativeIntegerTests.cs (4)
1160
Assert.False(type1.
IsErrorType
());
1181
Assert.True(type2.
IsErrorType
());
1235
Assert.False(typeA.
IsErrorType
());
1253
Assert.True(typeB.
IsErrorType
());
Semantics\NullableReferenceTypesTests.cs (1)
59373
Assert.True(type.Type.
IsErrorType
());
Semantics\TopLevelStatementsTests.cs (1)
1090
Assert.False(entryPoint.ReturnType.
IsErrorType
());
Semantics\ValueTupleTests.cs (8)
173
Assert.True(comp.GetWellKnownType(WellKnownType.System_ValueTuple_T1).
IsErrorType
());
176
Assert.True(comp.GetWellKnownType(WellKnownType.System_ValueTuple_T2).
IsErrorType
());
180
Assert.True(comp.GetWellKnownType(WellKnownType.System_ValueTuple_T3).
IsErrorType
());
185
Assert.True(comp.GetWellKnownType(WellKnownType.System_ValueTuple_T4).
IsErrorType
());
191
Assert.True(comp.GetWellKnownType(WellKnownType.System_ValueTuple_T5).
IsErrorType
());
198
Assert.True(comp.GetWellKnownType(WellKnownType.System_ValueTuple_T6).
IsErrorType
());
205
Assert.True(comp.GetWellKnownType(WellKnownType.System_ValueTuple_T7).
IsErrorType
());
213
Assert.True(comp.GetWellKnownType(WellKnownType.System_ValueTuple_TRest).
IsErrorType
());
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (96)
Compilation\SemanticModelAPITests.cs (1)
3658
Assert.False(((NamedTypeSymbol)newSymbol).TypeArguments().Single().
IsErrorType
());
Symbols\CompilationCreationTests.cs (2)
85
Assert.True(type.
IsErrorType
()); // Not available
89
Assert.False(type.
IsErrorType
());
Symbols\CorLibrary\Choosing.cs (2)
43
Assert.False(obj.
IsErrorType
());
73
Assert.True(consumer.GetSpecialType(SpecialType.System_Object).
IsErrorType
());
Symbols\CorLibrary\CorTypes.cs (4)
298
Assert.False(comp.GetSpecialType(InternalSpecialType.System_Type).
IsErrorType
());
362
Assert.True(comp1.GetSpecialType(InternalSpecialType.System_Type).
IsErrorType
());
435
Assert.False(comp.GetSpecialType(InternalSpecialType.System_Type).
IsErrorType
());
543
Assert.True(comp1.GetSpecialType(InternalSpecialType.System_Type).
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)
3752
Assert.False(i2.
IsErrorType
());
3786
Assert.False(i2.
IsErrorType
());
3820
Assert.False(i2.
IsErrorType
());
3854
Assert.False(i2.
IsErrorType
());
3903
Assert.False(i2.
IsErrorType
());
3911
Assert.False(iEquatable.
IsErrorType
());
3916
Assert.True(iQueryable_T.
IsErrorType
());
3920
Assert.True(iQueryable.
IsErrorType
());
3929
Assert.False(t.
IsErrorType
());
3936
Assert.True(t.
IsErrorType
());
3943
Assert.False(t.
IsErrorType
());
3950
Assert.True(t.
IsErrorType
());
3957
Assert.False(t.
IsErrorType
());
3971
Assert.False(t.
IsErrorType
());
3985
Assert.False(t.
IsErrorType
());
3992
Assert.False(t.
IsErrorType
());
3999
Assert.True(t.
IsErrorType
());
4006
Assert.False(t.
IsErrorType
());
4013
Assert.False(t.
IsErrorType
());
4027
Assert.False(t.
IsErrorType
());
4034
Assert.False(t.
IsErrorType
());
4041
Assert.True(t.
IsErrorType
());
4048
Assert.True(t.
IsErrorType
());
4055
Assert.True(t.
IsErrorType
());
4069
Assert.True(t.
IsErrorType
());
4083
Assert.False(t.
IsErrorType
());
4090
Assert.True(t.
IsErrorType
());
4097
Assert.False(t.
IsErrorType
());
4104
Assert.True(t.
IsErrorType
());
4111
Assert.True(t.
IsErrorType
());
4132
Assert.True(t.
IsErrorType
());
4141
Assert.False(t.
IsErrorType
());
4152
Assert.False(t.
IsErrorType
());
4163
Assert.False(t.
IsErrorType
());
4177
Assert.False(t.
IsErrorType
());
4191
Assert.False(t.
IsErrorType
());
4198
Assert.False(t.
IsErrorType
());
4209
Assert.False(t.
IsErrorType
());
4216
Assert.False(t.
IsErrorType
());
4230
Assert.False(t.
IsErrorType
());
4237
Assert.False(t.
IsErrorType
());
4274
Assert.False(t.
IsErrorType
());
4285
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\LoadingFields.cs (1)
151
Assert.False(readOnlySpanType.
IsErrorType
());
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
());
1934
Assert.False(resolved.
IsErrorType
());
Symbols\Retargeting\RetargetCustomAttributes.cs (1)
394
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)
466
Assert.False(cBase.
IsErrorType
());
468
Assert.True(c.Interfaces().Single().TypeArguments().Single().
IsErrorType
()); //can't see base of C while evaluating C.B
535
Assert.True(m.BaseType().
IsErrorType
());
550
Assert.False(o.BaseType().
IsErrorType
());
568
Assert.False(p.BaseType().
IsErrorType
());
589
Assert.False(rBase.
IsErrorType
());
609
Assert.False(ifaces[0].
IsErrorType
());
629
Assert.False(ifaces[0].
IsErrorType
());
634
Assert.False(ixFaces[0].
IsErrorType
());
654
Assert.False(ifaces[0].
IsErrorType
());
671
Assert.True(b.BaseType().
IsErrorType
());
688
Assert.True(z.BaseType().
IsErrorType
());
1529
Assert.False(baseB.
IsErrorType
());
1533
Assert.True(baseY.
IsErrorType
());
1545
Assert.True(baseY.
IsErrorType
());
1549
Assert.False(baseB.
IsErrorType
());
Symbols\TypeTests.cs (1)
1458
Assert.False(errSymbol.
IsErrorType
(), "ErrorType");
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
FunctionPointerUtilities.cs (1)
354
=> typeSymbol => Assert.True(typeSymbol.
IsErrorType
());
UsesIsNullableVisitor.cs (1)
158
return (type.NullableAnnotation != NullableAnnotation.Oblivious && typeSymbol.IsReferenceType && !typeSymbol.
IsErrorType
()) ||