207 references to IsErrorType
Microsoft.CodeAnalysis.CSharp (207)
Binder\Binder.WithQueryLambdaParametersBinder.cs (1)
80if (receiver.Type?.IsErrorType() != true)
Binder\Binder_Attributes.cs (6)
170if (attributeTypeForBinding.IsErrorType()) 189if (attributeTypeForBinding.IsErrorType()) 203suppressResultDiagnostics: attributeType.IsErrorType(), 292if (attributeType.IsErrorType() || attributeType.IsAbstract || attributeConstructor is null) 421Debug.Assert(!attributeType.IsErrorType()); 519if (attributeType.IsErrorType())
Binder\Binder_Conversions.cs (5)
1722BindToNaturalType(expression, diagnostics, reportNoTargetType: !targetType.IsErrorType()) : 1931Debug.Assert(targetTyped || destination.IsErrorType() || destination.Equals(source.Type, TypeCompareKind.ConsiderEverything)); 1935hasErrors |= source.HasErrors || destination.IsErrorType(); 1948if (targetTyped && !destination.IsErrorType() && !Compilation.IsFeatureEnabled(MessageID.IDS_FeatureTargetTypedConditional)) 1970Debug.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)
1392BoundTypeExpression boundType = new BoundTypeExpression(typeSyntax, alias, typeWithAnnotations, type.IsErrorType()); 1429bool typeHasErrors = type.IsErrorType() || CheckManagedAddr(Compilation, type, node.Location, diagnostics); 2067var constantValueOpt = localSymbol.IsConst && !IsInsideNameof && !type.IsErrorType() 2602if (!rangeType.IsErrorType()) 2706bool suppressErrors = operand.HasAnyErrors || targetType.IsErrorType(); 2730if (operand.HasAnyErrors || targetType.IsErrorType()) 4104if (!bestType.IsErrorType()) 4171if ((object)boundExpression.Type == null || !boundExpression.Type.IsErrorType()) 4255Debug.Assert(init.Type.IsErrorType()); 4462if (!elementType.Type.IsErrorType()) 4946Debug.Assert(initializerType.IsErrorType() || 6208if (!hasEnumerableInitializerType && !initializerSyntax.HasErrors && !initializerType.IsErrorType()) 6246else if (!initializerType.IsErrorType()) 6629bool hasErrors = type.IsErrorType(); 6908if (coClassType.IsErrorType()) 7230if (type.IsErrorType()) 9460if (type.IsErrorType())
Binder\Binder_InterpolatedString.cs (2)
259if (unconvertedInterpolatedString.Type.IsErrorType() || haveErrors || canLowerToStringConcatenation(parts)) 451if (interpolatedStringHandlerType.IsErrorType())
Binder\Binder_Operators.cs (3)
2736if (isOperandNullOrNew || operand.Type?.IsErrorType() == true) 3343return !(targetType?.IsErrorType() == true && bindAsTypeDiagnostics.HasAnyResolvedErrors()); 4315if (bestType.IsErrorType())
Binder\Binder_Patterns.cs (6)
228if (inputType.IsErrorType()) 309if (inputType.IsErrorType() || inputType.IsDynamic()) 707(conversion.ConversionKind == ConversionKind.NoConversion && convertedExpression.Type?.IsErrorType() == true)) 730if (inputType.IsErrorType() || patternType.IsErrorType()) 1494if (!receiverType.IsErrorType())
Binder\Binder_QueryErrors.cs (2)
225if (!t.IsErrorType()) 233if ((object)type == null || type.IsErrorType())
Binder\Binder_Statements.cs (12)
242if (!argument.HasErrors && ((object)argument.Type == null || !argument.Type.IsErrorType())) 413if ((object)type == null || !type.IsErrorType() && !Compilation.IsExceptionType(type.EffectiveType(ref useSiteInfo), ref useSiteInfo)) 1032if (!declTypeOpt.Type.IsErrorType()) 2009if (targetType.IsErrorType()) 2123if (anonymousFunction.ParameterType(i).IsErrorType()) 2175if (lambdaParameterType.IsErrorType()) 3038hasErrors |= arg.HasErrors || ((object)arg.Type != null && arg.Type.IsErrorType()); 3249if (type.IsErrorType()) 3283Debug.Assert(((object)type == null) || !type.IsErrorType()); 3333Debug.Assert(local.Type.IsErrorType() || (TypeSymbol.Equals(local.Type, type, TypeCompareKind.ConsiderEverything2))); 3501if (returnType.IsErrorType()) 3829else if (baseType.IsErrorType() || baseType.IsStatic)
Binder\Binder_Symbols.cs (1)
1218if (!unconstructedType.IsErrorType())
Binder\Binder_WithExpression.cs (1)
38else if (!receiverType.IsErrorType())
Binder\DecisionDagBuilder.cs (4)
287Debug.Assert(pattern.HasErrors || pattern.InputType.Equals(input.Type, TypeCompareKind.AllIgnoreOptions) || pattern.InputType.IsErrorType()); 407Debug.Assert(variableAccess.Type!.Equals(input.Type, TypeCompareKind.AllIgnoreOptions) || variableAccess.Type.IsErrorType()); 522RoslynDebug.Assert(input.Type.IsErrorType() || recursive.HasErrors || recursive.InputType.IsErrorType() || input.Type.Equals(recursive.InputType, TypeCompareKind.AllIgnoreOptions));
Binder\DecisionDagBuilder_ListPatterns.cs (2)
15Debug.Assert(input.Type.IsErrorType() || list.HasErrors || list.InputType.IsErrorType() ||
Binder\ExecutableCodeBinder.cs (1)
145else if (!returnType.IsErrorType())
Binder\ForEachLoopBinder.cs (4)
431hasErrors = hasErrors || boundIterationVariableType.HasErrors || iterationVariableType.Type.IsErrorType(); 544(builder.ElementType.IsNullableType() && builder.ElementType.GetMemberTypeArgumentsNoUseSiteDiagnostics().Single().IsErrorType() && collectionExpr.Type.IsArray())); 783if (collectionExprType.IsErrorType()) 837if (spanType.IsErrorType())
Binder\Semantics\BestTypeInferrer.cs (4)
140if (type1.IsErrorType()) 155if (type2.IsErrorType()) 266if (type1.IsErrorType()) 271if (type2 is null || type2.IsErrorType())
Binder\Semantics\Conversions\ConversionsBase.cs (3)
2628if (source.IsErrorType()) 3003Debug.Assert(targetInterfaceType.IsErrorType() || targetInterfaceType.IsInterface); 3037Debug.Assert(targetInterfaceType.IsErrorType() || targetInterfaceType.IsInterface);
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (2)
452if (!fixedResultType.Type.IsErrorType()) 3287!type.IsErrorType() &&
Binder\Semantics\OverloadResolution\OverloadResolution.cs (2)
3667r1.IsErrorType() || 3668r2.IsErrorType() ||
Binder\SwitchBinder.cs (1)
382if ((object)switchGoverningType != null && !switchGoverningType.IsErrorType())
Binder\SwitchExpressionArmBinder.cs (1)
40bool hasErrors = switchGoverningType.IsErrorType();
Binder\UsingStatementBinder.cs (1)
253if (type is null || !type.IsErrorType())
BoundTree\BoundNode.cs (1)
111return expression?.Type?.IsErrorType() == true;
Compilation\CSharpCompilation.cs (1)
1820Debug.Assert(result?.IsErrorType() != true);
Compilation\CSharpSemanticModel.cs (3)
2856if (bnode != null && !cdestination.IsErrorType()) 2908if (bnode != null && !destination.IsErrorType()) 3591if (namedType.IsErrorType())
Emitter\Model\NamedTypeSymbolAdapter.cs (1)
791Debug.Assert(AdaptedNamedTypeSymbol.IsErrorType() ||
Emitter\Model\PEAssemblyBuilder.cs (1)
579Debug.Assert(userDefinedAttribute?.IsErrorType() != true);
Emitter\NoPia\EmbeddedTypesManager.cs (1)
259if (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))); 1222else if (!_alreadyReported[slot] && !symbol.GetTypeOrReturnType().Type.IsErrorType())
FlowAnalysis\NullableWalker.cs (16)
751if (symbolType.Type.IsValueType || symbolType.Type.IsErrorType()) 2010(nodeType.IsErrorType() || 3035Debug.Assert(node.Type.IsErrorType() || type.Type.IsErrorType()); 3509Debug.Assert(type.Type.IsErrorType()); 3572return typeA?.IsErrorType() != false && typeB?.IsErrorType() != false; 3584return type.IsErrorType() || type.IsDynamic() || type.HasUseSiteError || (type.IsAnonymousType && canIgnoreAnonymousType((NamedTypeSymbol)type)); 3631&& (type.SpecialType == SpecialType.System_Boolean || type.IsDynamic() || type.IsErrorType()); 5839oldType.IsVoidType() || oldType.IsErrorType() ? oldType : 8176if (containingType is null || containingType.IsErrorType() || symbol is ErrorMethodSymbol) 9057if (checkConversion && !targetType.IsErrorType()) 9095Debug.Assert(targetType.IsValueType || targetType.IsErrorType()); 9101if (!conversionOperand.HasErrors && !targetType.IsErrorType()) 11825if (isValueType && (!checkNullableValueType || !type.IsNullableTypeOrTypeParameter() || type.GetNullableUnderlyingType().IsErrorType())) 11926Debug.Assert(node.Type is null || node.Type.IsErrorType() || node.Type.IsRefLikeType);
FlowAnalysis\NullableWalker_Patterns.cs (3)
752Debug.Assert(NominalSlotType(slot) is var slotType && (slotType.IsErrorType() || isDerivedType(slotType, type))); 759if (derivedType.IsErrorType() || baseType.IsErrorType())
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (1)
344!builderType.IsErrorType() &&
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (1)
425if (synthesizedType.IsErrorType())
Lowering\LocalRewriter\LocalRewriter_IsPatternOperator.cs (1)
175if (test.Type?.IsErrorType() != false)
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (2)
53Debug.Assert(loweredLeft.Type is { } && (loweredLeft.Type.IsStringType() || loweredLeft.Type.IsErrorType()) || loweredLeft.ConstantValueOpt?.IsNull == true); 54Debug.Assert(loweredRight.Type is { } && (loweredRight.Type.IsStringType() || loweredRight.Type.IsErrorType()) || loweredRight.ConstantValueOpt?.IsNull == true);
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (1)
195Debug.Assert(result.Type.SpecialType == SpecialType.System_String || result.Type.IsErrorType());
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (3)
618delegateTypeOverMethodTypeParameters.IsErrorType() || 620callSiteTypeGeneric.IsErrorType() || 729if (callSiteType.IsErrorType())
Lowering\SyntheticBoundNodeFactory.cs (5)
434right.Type.IsErrorType() || left.Type.IsErrorType())); 908Debug.Assert(left.Type!.Equals(right.Type, TypeCompareKind.IgnoreCustomModifiersAndArraySizesAndLowerBounds | TypeCompareKind.IgnoreNullableModifiersForReferenceTypes) || left.Type.IsErrorType()); 1308Debug.Assert(result.Type.IsErrorType() || result.Type!.IsDerivedFrom(result.GetMethodFromHandle!.ReturnType, TypeCompareKind.AllIgnoreOptions, ref discardedUseSiteInfo)); 1415Debug.Assert(result.Type.IsErrorType() || result.Type!.IsDerivedFrom(result.GetMethodFromHandle!.ReturnType, TypeCompareKind.AllIgnoreOptions, ref discardedUseSiteInfo));
Symbols\ArrayTypeSymbol.cs (2)
113if (!iListOfT.IsErrorType()) 120if (!iReadOnlyListOfT.IsErrorType())
Symbols\AssemblySymbol.cs (11)
653Debug.Assert(result?.IsErrorType() != true); 708Debug.Assert(!type.IsErrorType()); 720Debug.Assert(!type.IsErrorType()); 735Debug.Assert(type?.IsErrorType() != true); 815Debug.Assert(symbol?.IsErrorType() != true); 849Debug.Assert(!symbol.IsErrorType()); 909Debug.Assert(result?.IsErrorType() != true); 931Debug.Assert(corLibCandidate?.IsErrorType() != true); 966Debug.Assert(candidate?.IsErrorType() != true); 1011Debug.Assert(result?.IsErrorType() != true); 1048Debug.Assert(result?.IsErrorType() != true);
Symbols\Attributes\AttributeData.cs (1)
90Debug.Assert(!attributeType.IsErrorType());
Symbols\Attributes\PEAttributeData.cs (1)
87else if ((object)attributeClass == null || attributeClass.IsErrorType() || (object)attributeConstructor == null)
Symbols\Attributes\SourceAttributeData.cs (1)
482if (attributeClass.IsErrorType() && !(attributeClass is MissingMetadataTypeSymbol))
Symbols\Compilation_WellKnownMembers.cs (4)
104if (!type.IsErrorType()) 151Debug.Assert(result?.IsErrorType() != true); 181TypeSymbol.Equals(result, _lazyWellKnownTypes[index], TypeCompareKind.ConsiderEverything2) || (_lazyWellKnownTypes[index]!.IsErrorType() && result.IsErrorType())
Symbols\ConstraintsHelper.cs (6)
296if (!deducedBaseType.IsErrorType() && !constraintDeducedBase.IsErrorType()) 1044if (typeArgument.Type.IsErrorType()) 1323if (constraintType.Type.IsErrorType()) 1599Debug.Assert(deducedBase.IsErrorType() || 1600effectiveBase.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)
606Debug.Assert(currentModuleResult?.IsErrorType() != true); 714Debug.Assert(result?.IsErrorType() != true);
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
2361var coClassType = ((object)type != null && (type.TypeKind == TypeKind.Class || type.IsErrorType())) ? (NamedTypeSymbol)type : null;
Symbols\MetadataOrSourceAssemblySymbol.cs (2)
60Debug.Assert(result?.IsErrorType() != true); 208if (!type.IsErrorType())
Symbols\NamedTypeSymbol.cs (2)
1164internal static readonly Func<TypeWithAnnotations, bool> TypeWithAnnotationsIsErrorType = type => type.HasType && type.Type.IsErrorType(); 1430if (@base.IsErrorType() && @base is NoPiaIllegalGenericInstantiationSymbol)
Symbols\NonMissingAssemblySymbol.cs (3)
109if (!result.IsErrorType() && (object)result.ContainingAssembly == (object)this) 121Debug.Assert(result is null || ((object)result.ContainingAssembly == (object)this && !result.IsErrorType())); 173Debug.Assert(result is null || ((object)result.ContainingAssembly == (object)this && !result.IsErrorType()));
Symbols\NonMissingModuleSymbol.cs (1)
203Debug.Assert(result?.IsErrorType() != true);
Symbols\NoPiaIllegalGenericInstantiationSymbol.cs (1)
59if (_underlyingSymbol.IsErrorType())
Symbols\PublicModel\NonErrorNamedTypeSymbol.cs (1)
19Debug.Assert(!underlying.IsErrorType());
Symbols\Retargeting\RetargetingNamedTypeSymbol.cs (1)
259Debug.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)
135originalType.IsErrorType() ||
Symbols\Source\LambdaSymbol.cs (1)
162Debug.Assert(_returnType.Type.IsErrorType());
Symbols\Source\SourceAssemblySymbol.cs (2)
1415if (forwarded.IsErrorType()) 1895return !obj.IsErrorType() && obj.DeclaredAccessibility == Accessibility.Public;
Symbols\Source\SourceComplexParameterSymbol.cs (1)
623Debug.Assert(!attributeType.IsErrorType());
Symbols\Source\SourceEventSymbol.cs (1)
598else if (!this.Type.IsDelegateType() && !this.Type.IsErrorType())
Symbols\Source\SourceLocalSymbol.cs (2)
397originalType.Value.DefaultType.IsErrorType() && newType.Type.IsErrorType() ||
Symbols\Source\SourceMemberContainerSymbol.cs (5)
1908predicate: (t, a, b) => !t.TupleElementNames.IsDefaultOrEmpty && !t.IsErrorType(), 4316if (deconstruct.ReturnType.SpecialType != SpecialType.System_Void && !deconstruct.ReturnType.IsErrorType()) 4422if (!printMembersMethod.ReturnType.IsErrorType()) 4684if (!equalityContract.Type.IsErrorType()) 4743if (thisEquals.ReturnType.SpecialType != SpecialType.System_Boolean && !thisEquals.ReturnType.IsErrorType())
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (2)
504if (this.BaseTypeNoUseSiteDiagnostics?.IsErrorType() == true) 1192return (object)typeSymbol.VisitType((currentTypeSymbol, unused1, unused2) => currentTypeSymbol.IsErrorType(), (object)null) != null;
Symbols\Source\SourceMemberFieldSymbol.cs (1)
543if ((object)initializerOpt.Type != null && !initializerOpt.Type.IsErrorType())
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1603return !returnType.IsErrorType() &&
Symbols\Source\SourceNamedTypeSymbol.cs (1)
1296Debug.Assert(!this.IsErrorType());
Symbols\SubstitutedNamedTypeSymbol.cs (1)
56Debug.Assert(!originalDefinition.IsErrorType());
Symbols\Symbol_Attributes.cs (2)
786if (!boundAttributeType.IsErrorType()) 823if (!attributeType.IsErrorType())
Symbols\Synthesized\Records\SynthesizedRecordBaseEquals.cs (1)
59if (parameter.Type.IsErrorType())
Symbols\Synthesized\Records\SynthesizedRecordClone.cs (1)
114if (ReturnType.IsErrorType())
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (2)
123if (ReturnType.IsErrorType() || 124printableMembers.Any(static m => m.GetTypeOrReturnType().Type.IsErrorType()))
Symbols\Tuples\TupleTypeSymbol.cs (1)
740var diagnosticInfo = container.IsErrorType() ?
Symbols\TypeSymbolExtensions.cs (4)
541return type.IsErrorType() || type.IsRefLikeOrAllowsRefLikeType(); 630if (type.IsErrorType()) 1259var result = type.VisitType((type, unused1, unused2) => type.IsErrorType(), (object?)null, canDigThroughNullable: true); 1302RoslynDebug.Assert((object?)result == null || !result.IsErrorType());
Symbols\TypeWithAnnotations.cs (2)
202if (!typeSymbol.IsValueType && !typeSymbol.IsErrorType()) 596typeWithAnnotationsPredicate: (t, a, b) => t.NullableAnnotation != NullableAnnotation.Oblivious && !t.Type.IsErrorType() && !t.Type.IsValueType,