205 references to IsErrorType
Microsoft.CodeAnalysis.CSharp (205)
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
(),
292
if (attributeType.
IsErrorType
() || attributeType.IsAbstract || attributeConstructor is null)
421
Debug.Assert(!attributeType.
IsErrorType
());
519
if (attributeType.
IsErrorType
())
Binder\Binder_Conversions.cs (5)
1722
BindToNaturalType(expression, diagnostics, reportNoTargetType: !targetType.
IsErrorType
()) :
1931
Debug.Assert(targetTyped || destination.
IsErrorType
() || destination.Equals(source.Type, TypeCompareKind.ConsiderEverything));
1935
hasErrors |= source.HasErrors || destination.
IsErrorType
();
1948
if (targetTyped && !destination.
IsErrorType
() && !Compilation.IsFeatureEnabled(MessageID.IDS_FeatureTargetTypedConditional))
1970
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)
1392
BoundTypeExpression boundType = new BoundTypeExpression(typeSyntax, alias, typeWithAnnotations, type.
IsErrorType
());
1429
bool typeHasErrors = type.
IsErrorType
() || CheckManagedAddr(Compilation, type, node.Location, diagnostics);
2100
var constantValueOpt = localSymbol.IsConst && !IsInsideNameof && !type.
IsErrorType
()
2635
if (!rangeType.
IsErrorType
())
2739
bool suppressErrors = operand.HasAnyErrors || targetType.
IsErrorType
();
2763
if (operand.HasAnyErrors || targetType.
IsErrorType
())
4139
if (!bestType.
IsErrorType
())
4206
if ((object)boundExpression.Type == null || !boundExpression.Type.
IsErrorType
())
4290
Debug.Assert(init.Type.
IsErrorType
());
4497
if (!elementType.Type.
IsErrorType
())
4981
Debug.Assert(initializerType.
IsErrorType
() ||
6243
if (!hasEnumerableInitializerType && !initializerSyntax.HasErrors && !initializerType.
IsErrorType
())
6281
else if (!initializerType.
IsErrorType
())
6664
bool hasErrors = type.
IsErrorType
();
6943
if (coClassType.
IsErrorType
())
7263
if (type.
IsErrorType
())
9493
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)
2741
if (isOperandNullOrNew || operand.Type?.
IsErrorType
() == true)
3348
return !(targetType?.
IsErrorType
() == true && bindAsTypeDiagnostics.HasAnyResolvedErrors());
4320
if (bestType.
IsErrorType
())
Binder\Binder_Patterns.cs (6)
228
if (inputType.
IsErrorType
())
309
if (inputType.
IsErrorType
() || inputType.IsDynamic())
707
(conversion.ConversionKind == ConversionKind.NoConversion && convertedExpression.Type?.
IsErrorType
() == true))
730
if (inputType.
IsErrorType
() || patternType.
IsErrorType
())
1494
if (!receiverType.
IsErrorType
())
Binder\Binder_QueryErrors.cs (2)
225
if (!t.
IsErrorType
())
233
if ((object)type == null || type.
IsErrorType
())
Binder\Binder_Statements.cs (12)
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
())
2024
if (targetType.
IsErrorType
())
2138
if (anonymousFunction.ParameterType(i).
IsErrorType
())
2210
Debug.Assert(!lambdaParameterType.
IsErrorType
());
3057
hasErrors |= arg.HasErrors || ((object)arg.Type != null && arg.Type.
IsErrorType
());
3268
if (type.
IsErrorType
())
3302
Debug.Assert(((object)type == null) || !type.
IsErrorType
());
3352
Debug.Assert(local.Type.
IsErrorType
() || (TypeSymbol.Equals(local.Type, type, TypeCompareKind.ConsiderEverything2)));
3522
if (returnType.
IsErrorType
())
3850
else if (baseType.
IsErrorType
() || baseType.IsStatic)
Binder\Binder_Symbols.cs (1)
1218
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)
15
Debug.Assert(input.Type.
IsErrorType
() || list.HasErrors || list.InputType.
IsErrorType
() ||
Binder\ExecutableCodeBinder.cs (1)
145
else if (!returnType.
IsErrorType
())
Binder\ForEachLoopBinder.cs (4)
433
hasErrors = hasErrors || boundIterationVariableType.HasErrors || iterationVariableType.Type.
IsErrorType
();
546
(builder.ElementType.IsNullableType() && builder.ElementType.GetMemberTypeArgumentsNoUseSiteDiagnostics().Single().
IsErrorType
() && collectionExpr.Type.IsArray()));
785
if (collectionExprType.
IsErrorType
())
839
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)
452
if (!fixedResultType.Type.
IsErrorType
())
3287
!type.
IsErrorType
() &&
Binder\Semantics\OverloadResolution\OverloadResolution.cs (2)
3712
r1.
IsErrorType
() ||
3713
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)
253
if (type is null || !type.
IsErrorType
())
BoundTree\BoundNode.cs (1)
111
return expression?.Type?.
IsErrorType
() == true;
Compilation\CSharpCompilation.cs (1)
1825
Debug.Assert(result?.
IsErrorType
() != true);
Compilation\CSharpSemanticModel.cs (3)
2856
if (bnode != null && !cdestination.
IsErrorType
())
2908
if (bnode != null && !destination.
IsErrorType
())
3591
if (namedType.
IsErrorType
())
Emitter\Model\NamedTypeSymbolAdapter.cs (1)
791
Debug.Assert(AdaptedNamedTypeSymbol.
IsErrorType
() ||
Emitter\Model\PEAssemblyBuilder.cs (1)
598
Debug.Assert(userDefinedAttribute?.
IsErrorType
() != true);
Emitter\NoPia\EmbeddedTypesManager.cs (1)
259
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)
245
(type.
IsErrorType
() || compilation.IsAttributeType(type)));
1222
else if (!_alreadyReported[slot] && !symbol.GetTypeOrReturnType().Type.
IsErrorType
())
FlowAnalysis\NullableWalker.cs (16)
752
if (symbolType.Type.IsValueType || symbolType.Type.
IsErrorType
())
2073
(nodeType.
IsErrorType
() ||
3098
Debug.Assert(node.Type.
IsErrorType
() || type.Type.
IsErrorType
());
3572
Debug.Assert(type.Type.
IsErrorType
());
3635
return typeA?.
IsErrorType
() != false && typeB?.
IsErrorType
() != false;
3647
return type.
IsErrorType
() || type.IsDynamic() || type.HasUseSiteError || (type.IsAnonymousType && canIgnoreAnonymousType((NamedTypeSymbol)type));
3694
&& (type.SpecialType == SpecialType.System_Boolean || type.IsDynamic() || type.
IsErrorType
());
5905
oldType.IsVoidType() || oldType.
IsErrorType
() ? oldType :
8245
if (containingType is null || containingType.
IsErrorType
() || symbol is ErrorMethodSymbol)
9126
if (checkConversion && !targetType.
IsErrorType
())
9164
Debug.Assert(targetType.IsValueType || targetType.
IsErrorType
());
9170
if (!conversionOperand.HasErrors && !targetType.
IsErrorType
())
11894
if (isValueType && (!checkNullableValueType || !type.IsNullableTypeOrTypeParameter() || type.GetNullableUnderlyingType().
IsErrorType
()))
11995
Debug.Assert(node.Type is null || node.Type.
IsErrorType
() || node.Type.IsRefLikeType);
FlowAnalysis\NullableWalker_Patterns.cs (3)
752
Debug.Assert(NominalSlotType(slot) is var slotType && (slotType.
IsErrorType
() || isDerivedType(slotType, type)));
759
if (derivedType.
IsErrorType
() || baseType.
IsErrorType
())
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (1)
344
!builderType.
IsErrorType
() &&
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (1)
432
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)
618
delegateTypeOverMethodTypeParameters.
IsErrorType
() ||
620
callSiteTypeGeneric.
IsErrorType
() ||
729
if (callSiteType.
IsErrorType
())
Lowering\SyntheticBoundNodeFactory.cs (5)
442
right.Type.
IsErrorType
() || left.Type.
IsErrorType
()));
916
Debug.Assert(left.Type!.Equals(right.Type, TypeCompareKind.IgnoreCustomModifiersAndArraySizesAndLowerBounds | TypeCompareKind.IgnoreNullableModifiersForReferenceTypes) || left.Type.
IsErrorType
());
1316
Debug.Assert(result.Type.
IsErrorType
() || result.Type!.IsDerivedFrom(result.GetMethodFromHandle!.ReturnType, TypeCompareKind.AllIgnoreOptions, ref discardedUseSiteInfo));
1423
Debug.Assert(result.Type.
IsErrorType
() || result.Type!.IsDerivedFrom(result.GetMethodFromHandle!.ReturnType, TypeCompareKind.AllIgnoreOptions, ref discardedUseSiteInfo));
Symbols\ArrayTypeSymbol.cs (2)
113
if (!iListOfT.
IsErrorType
())
120
if (!iReadOnlyListOfT.
IsErrorType
())
Symbols\AssemblySymbol.cs (11)
653
Debug.Assert(result?.
IsErrorType
() != true);
708
Debug.Assert(!type.
IsErrorType
());
720
Debug.Assert(!type.
IsErrorType
());
735
Debug.Assert(type?.
IsErrorType
() != true);
815
Debug.Assert(symbol?.
IsErrorType
() != true);
849
Debug.Assert(!symbol.
IsErrorType
());
909
Debug.Assert(result?.
IsErrorType
() != true);
931
Debug.Assert(corLibCandidate?.
IsErrorType
() != true);
966
Debug.Assert(candidate?.
IsErrorType
() != true);
1011
Debug.Assert(result?.
IsErrorType
() != true);
1048
Debug.Assert(result?.
IsErrorType
() != true);
Symbols\Attributes\AttributeData.cs (1)
90
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);
181
TypeSymbol.Equals(result, _lazyWellKnownTypes[index], TypeCompareKind.ConsiderEverything2) || (_lazyWellKnownTypes[index]!.
IsErrorType
() && result.
IsErrorType
())
Symbols\ConstraintsHelper.cs (6)
296
if (!deducedBaseType.
IsErrorType
() && !constraintDeducedBase.
IsErrorType
())
1044
if (typeArgument.Type.
IsErrorType
())
1323
if (constraintType.Type.
IsErrorType
())
1599
Debug.Assert(deducedBase.
IsErrorType
() ||
1600
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)
606
Debug.Assert(currentModuleResult?.
IsErrorType
() != true);
714
Debug.Assert(result?.
IsErrorType
() != true);
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
2382
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)
1161
internal static readonly Func<TypeWithAnnotations, bool> TypeWithAnnotationsIsErrorType = type => type.HasType && type.Type.
IsErrorType
();
1427
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)
259
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)
135
originalType.
IsErrorType
() ||
Symbols\Source\LambdaSymbol.cs (1)
162
Debug.Assert(_returnType.Type.
IsErrorType
());
Symbols\Source\SourceAssemblySymbol.cs (2)
1415
if (forwarded.
IsErrorType
())
1895
return !obj.
IsErrorType
() && obj.DeclaredAccessibility == Accessibility.Public;
Symbols\Source\SourceComplexParameterSymbol.cs (1)
624
Debug.Assert(!attributeType.
IsErrorType
());
Symbols\Source\SourceEventSymbol.cs (1)
598
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)
1919
predicate: (t, a, b) => !t.TupleElementNames.IsDefaultOrEmpty && !t.
IsErrorType
(),
4405
if (deconstruct.ReturnType.SpecialType != SpecialType.System_Void && !deconstruct.ReturnType.
IsErrorType
())
4511
if (!printMembersMethod.ReturnType.
IsErrorType
())
4773
if (!equalityContract.Type.
IsErrorType
())
4832
if (thisEquals.ReturnType.SpecialType != SpecialType.System_Boolean && !thisEquals.ReturnType.
IsErrorType
())
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (2)
504
if (this.BaseTypeNoUseSiteDiagnostics?.
IsErrorType
() == true)
1192
return (object)typeSymbol.VisitType((currentTypeSymbol, unused1, unused2) => currentTypeSymbol.
IsErrorType
(), (object)null) != null;
Symbols\Source\SourceMemberFieldSymbol.cs (1)
553
if ((object)initializerOpt.Type != null && !initializerOpt.Type.
IsErrorType
())
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1609
return !returnType.
IsErrorType
() &&
Symbols\Source\SourceNamedTypeSymbol.cs (1)
1301
Debug.Assert(!this.
IsErrorType
());
Symbols\SubstitutedNamedTypeSymbol.cs (1)
57
Debug.Assert(!originalDefinition.
IsErrorType
());
Symbols\Symbol_Attributes.cs (2)
786
if (!boundAttributeType.
IsErrorType
())
823
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)
740
var diagnosticInfo = container.
IsErrorType
() ?
Symbols\TypeSymbolExtensions.cs (4)
541
return type.
IsErrorType
() || type.IsRefLikeOrAllowsRefLikeType();
630
if (type.
IsErrorType
())
1259
var result = type.VisitType((type, unused1, unused2) => type.
IsErrorType
(), (object?)null, canDigThroughNullable: true);
1302
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,