103 references to Error
Microsoft.CodeAnalysis.CSharp (103)
Binder\Binder.ValueChecks.cs (22)
713Error(diagnostics, ErrorCode.ERR_BadSKknown, node, ns.NamespaceSymbol, MessageID.IDS_SK_NAMESPACE.Localize(), MessageID.IDS_SK_VARIABLE.Localize()); 718Error(diagnostics, ErrorCode.ERR_BadSKknown, node, type.Type, MessageID.IDS_SK_TYPE.Localize(), MessageID.IDS_SK_VARIABLE.Localize()); 729Error(diagnostics, GetMethodGroupOrFunctionPointerLvalueError(valueKind), node, unconvertedAddressOf.Operand.Name, MessageID.IDS_AddressOfMethodGroup.Localize()); 740Error(diagnostics, GetMethodGroupOrFunctionPointerLvalueError(valueKind), node, methodGroup.Name, MessageID.IDS_MethodGroup.Localize()); 754Error(diagnostics, errorCode, node, queryref.RangeVariableSymbol.Name); 985Error(diagnostics, errorCode, node, node); 994Error(diagnostics, ErrorCode.ERR_BadSKknown, expr.Syntax, ((BoundNamespaceExpression)expr).NamespaceSymbol, MessageID.IDS_SK_NAMESPACE.Localize(), MessageID.IDS_SK_VARIABLE.Localize()); 997Error(diagnostics, ErrorCode.ERR_BadSKunknown, expr.Syntax, expr.Type, MessageID.IDS_SK_TYPE.Localize()); 1195Error(diagnostics, errorCode, node, parameterSymbol); 1590Error(diagnostics, GetStandardLvalueError(valueKind), eventSyntax, eventSymbol); 1650Error(diagnostics, ErrorCode.ERR_ReturnNotLValue, callSyntaxOpt, methodSymbol); 1701Error(diagnostics, ErrorCode.ERR_ReturnNotLValue, expr.Syntax, propertySymbol); 1732Error(diagnostics, ErrorCode.ERR_AssgReadonlyProp, node, propertySymbol); 1742Error(diagnostics, ErrorCode.ERR_AssignmentInitOnly, node, propertySymbol); 1763Error(diagnostics, ErrorCode.ERR_BadProtectedAccess, node, propertySymbol, accessThroughType, this.ContainingType); 1767Error(diagnostics, ErrorCode.ERR_InaccessibleSetter, node, propertySymbol); 1797Error(diagnostics, ErrorCode.ERR_PropertyLacksGet, node, propertySymbol); 1812Error(diagnostics, ErrorCode.ERR_BadProtectedAccess, node, propertySymbol, accessThroughType, this.ContainingType); 1816Error(diagnostics, ErrorCode.ERR_InaccessibleGetter, node, propertySymbol); 1907Error(diagnostics, ErrorCode.ERR_AbstractBaseCall, node, propertyOrEventSymbolOpt ?? member); 3099Error(diagnostics, ReadOnlyLocalErrors[index], node, local, cause.Localize()); 3251Error(diagnostics, ReadOnlyErrors[index], node, field);
Binder\Binder_Attributes.cs (1)
962Binder.Error(diagnostics, ErrorCode.ERR_AttrArgWithTypeVars, node.Syntax, typeOfArgument.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat));
Binder\Binder_Await.cs (10)
305Error(diagnostics, ErrorCode.ERR_BadAwaitArgIntrinsic, node, expression.Display); 342Error(diagnostics, ErrorCode.ERR_BadAwaitArg, node, expression.Type); 353Error(diagnostics, ErrorCode.ERR_BadAwaitArg, node, expression.Type); 381Error(diagnostics, ErrorCode.ERR_NoSuchMember, node, awaiterType, WellKnownMemberNames.IsCompleted); 389Error(diagnostics, ErrorCode.ERR_PropertyLacksGet, node, isCompletedProperty); 396Error(diagnostics, ErrorCode.ERR_BadAwaiterPattern, node, awaiterType, awaitedExpressionType); 420Error(diagnostics, ErrorCode.ERR_DoesntImplementAwaitInterface, node, awaiterType, INotifyCompletion); 449Error(diagnostics, ErrorCode.ERR_NoSuchMember, node, awaiterType, WellKnownMemberNames.GetResult); 459Error(diagnostics, ErrorCode.ERR_NoSuchMember, node, awaiterType, WellKnownMemberNames.GetResult); 467Error(diagnostics, ErrorCode.ERR_BadAwaiterPattern, node, awaiterType, awaitedExpressionType);
Binder\Binder_Conversions.cs (2)
463Error(diagnostics, ErrorCode.ERR_InlineArrayConversionToReadOnlySpanNotSupported, syntax, destination); 477Error(diagnostics, ErrorCode.ERR_InlineArrayConversionToSpanNotSupported, syntax, destination);
Binder\Binder_Deconstruct.cs (2)
414Error(diagnostics, ErrorCode.ERR_TypeInferenceFailedForImplicitlyTypedDeconstructionVariable, pending.Syntax, "_"); 719Error(diagnostics, ErrorCode.ERR_MissingDeconstruct, rightSyntax, receiver.Type!, numParameters);
Binder\Binder_Expressions.cs (18)
2803Error(diagnostics, ErrorCode.ERR_ConversionNotTupleCompatible, syntax, tuple.Arguments.Length, targetType); 2813Error(diagnostics, ErrorCode.ERR_StackAllocConversionNotPossible, syntax, stackAllocExpression.ElementType, targetType); 4637Error(diagnostics, ErrorCode.ERR_ArrayInitializerIncorrectLength, node, constantSizeOpt.Value); 6913Error(diagnostics, ErrorCode.ERR_MissingCoClass, node, coClassType, interfaceType); 6931Error(diagnostics, ErrorCode.ERR_BadCoClassSig, node, coClassType, interfaceType); 6957Error(diagnostics, ErrorCode.ERR_NoExplicitConv, node, distinguisher.First, distinguisher.Second); 7849Error(diagnostics, ErrorCode.ERR_LookupInTypeVariable, boundLeft.Syntax, leftType); 7878Error(diagnostics, ErrorCode.WRN_DotOnDefault, node, boundLeft.Type); 8057Error(diagnostics, ErrorCode.ERR_NoSuchMember, name, boundLeft.Display, plainName); 8064Error(diagnostics, ErrorCode.ERR_NoSuchMember, name, boundLeft.Type, plainName); 8068Error(diagnostics, ErrorCode.ERR_NoSuchMemberOrExtensionNeedUsing, name, boundLeft.Type, plainName, "System"); 8072Error(diagnostics, ErrorCode.ERR_NoSuchMemberOrExtension, name, boundLeft.Type, plainName); 8286Error(diagnostics, ErrorCode.ERR_BadTypeReference, right, plainName, symbol); 8526Error(diagnostics, ErrorCode.ERR_BindToBogus, node, fieldSymbol); 8815Error(diagnostics, errorCode, node, symbol); 8829Error(diagnostics, ErrorCode.ERR_ObjectRequired, node, symbol); 9336Error(diagnostics, ErrorCode.ERR_BadIndexCount, node, rank); 9658Error(diagnostics,
Binder\Binder_Invocation.cs (13)
413Error(diagnostics, ErrorCode.ERR_NoDynamicPhantomOnBase, node, methodGroup.Name); 557Error(diagnostics, ErrorCode.ERR_CannotDynamicInvokeOnExpression, receiver.Syntax, receiver.Type); 602Error(diagnostics, ErrorCode.ERR_BadDynamicMethodArg, arg.Syntax, "__arglist"); 611Error(diagnostics, ErrorCode.ERR_BadDynamicMethodArg, arg.Syntax, arg.Type); 683Error(diagnostics, 819Error(diagnostics, ErrorCode.ERR_BadArgTypeDynamicExtension, syntax, methodGroup.InstanceOpt.Type, methodGroup.Name); 852Error(diagnostics, ErrorCode.WRN_DynamicDispatchToConditionalMethod, syntax, methodGroup.Name); 909Error(diagnostics, 924Error(diagnostics, 1053Error(diagnostics, ErrorCode.ERR_NoImplicitConv, call.ReceiverOpt.Syntax, distinguisher.First, distinguisher.Second); 1059Error(diagnostics, ErrorCode.ERR_NoImplicitConv, call.ReceiverOpt.Syntax, distinguisher.First, distinguisher.Second); 1073Error(diagnostics, ErrorCode.ERR_BadDynamicMethodArg, dynInvoke.Expression.Syntax, dynInvoke.Expression.Type); 1793Error(diagnostics, ErrorCode.WRN_ImplicitCopyInReadOnlyMember, receiver.Syntax, method, ThisParameterSymbol.SymbolName);
Binder\Binder_Patterns.cs (6)
378Error(diagnostics, ErrorCode.ERR_ListPatternRequiresLength, node, inputType); 743Error(diagnostics, ErrorCode.ERR_PatternNullableType, typeSyntax, patternType.GetNullableUnderlyingType()); 748Error(diagnostics, ErrorCode.ERR_PatternNullableType, typeSyntax, patternType); 753Error(diagnostics, ErrorCode.ERR_VarDeclIsStaticClass, typeSyntax, patternType); 776Error(diagnostics, ErrorCode.ERR_PatternWrongGenericTypeInVersion, typeSyntax, 786Error(diagnostics, ErrorCode.ERR_PatternWrongType, typeSyntax, inputType, patternType);
Binder\Binder_Query.cs (1)
982Error(diagnostics, ErrorCode.ERR_BadSKunknown, ultimateReceiver.Syntax, ultimateReceiver.Type, MessageID.IDS_SK_TYVAR.Localize());
Binder\Binder_Statements.cs (15)
1953Error(diagnostics, ErrorCode.ERR_RefAssignmentMustHaveIdentityConversion, expression.Syntax, targetType); 2247Error(diagnostics, ErrorCode.ERR_LiteralDoubleCast, syntax, (targetType.SpecialType == SpecialType.System_Single) ? "F" : "M", targetType); 2258Error(diagnostics, ErrorCode.ERR_ConstOutOfRange, syntax, sourceConstantValueOpt.Value, targetType); 2263Error(diagnostics, ErrorCode.ERR_NoImplicitConvCast, syntax, distinguisher.First, distinguisher.Second); 2273Error(diagnostics, ErrorCode.ERR_AmbigUDConv, syntax, originalUserDefinedConversions[0], originalUserDefinedConversions[1], sourceType, targetType); 2280Error(diagnostics, ErrorCode.ERR_NoImplicitConv, syntax, distinguisher.First, distinguisher.Second); 2289Error(diagnostics, ErrorCode.ERR_NoImplicitConv, syntax, sourceType, targetType); 2294Error(diagnostics, ErrorCode.ERR_NoImplicitConv, syntax, distinguisher.First, distinguisher.Second); 2316Error(diagnostics, ErrorCode.ERR_NoImplicitConv, syntax, operand.Display, targetType); 2348Error(diagnostics, ErrorCode.ERR_ConversionNotTupleCompatible, syntax, tuple.Arguments.Length, targetType); 2371Error(diagnostics, ErrorCode.ERR_TypeVarCantBeNull, syntax, targetType); 2376Error(diagnostics, ErrorCode.ERR_ValueCantBeNull, syntax, targetType); 2385Error(diagnostics, ErrorCode.ERR_StackAllocConversionNotPossible, syntax, stackAllocExpression.ElementType, targetType); 3166Error(diagnostics, ErrorCode.ERR_RefReturnMustHaveIdentityConversion, argument.Syntax, returnType); 3183Error(diagnostics, ErrorCode.ERR_BadAsyncReturnExpression, argument.Syntax, returnType, argument.Type);
Binder\Binder_Symbols.cs (5)
793Error(diagnostics, ErrorCode.ERR_TupleReservedElementNameAnyPosition, syntax, name); 798Error(diagnostics, ErrorCode.ERR_TupleReservedElementName, syntax, name, reserved); 1399Error(diagnostics, ErrorCode.ERR_BadArity, typeSyntax, type, MessageID.IDS_SK_TYPE.Localize(), typeArgumentsSyntax.Count); 1431Error(diagnostics, ErrorCode.ERR_BadArity, syntax, plainName, MessageID.IDS_MethodGroup.Localize(), typeArgumentsSyntax.Count); 1459Error(diagnostics, ErrorCode.ERR_AmbiguousPrimaryConstructorParameterAsColorColorReceiver, colorColorValueReceiver.Syntax, parameter.Name, parameter.Type, parameter);
Binder\ForEachLoopBinder.cs (2)
473Error(diagnostics, ErrorCode.ERR_RefAssignmentMustHaveIdentityConversion, collectionExpr.Syntax, iterationVariableType.Type); 1247Error(diagnostics, ErrorCode.ERR_BadAllowByRefLikeEnumerator, expr.Syntax, enumeratorType);
Binder\LockBinder.cs (3)
82Error(diagnostics, ErrorCode.ERR_MissingPredefinedMember, syntax, LockTypeFullName, WellKnownMemberNames.EnterScopeMethodName); 90Error(diagnostics, ErrorCode.ERR_MissingPredefinedMember, syntax, LockTypeFullName, WellKnownMemberNames.EnterScopeMethodName); 97Error(diagnostics, ErrorCode.ERR_MissingPredefinedMember, syntax, $"{LockTypeFullName}+{WellKnownMemberNames.LockScopeTypeName}", WellKnownMemberNames.DisposeMethodName);
Binder\UsingStatementBinder.cs (1)
263Error(diagnostics, errorCode, syntax, declarationTypeOpt ?? expressionOpt!.Display);
Lowering\IteratorRewriter\IteratorRewriter.cs (1)
162Binder.Error(bag, ErrorCode.ERR_PropertyLacksGet, body.Syntax, symbol);
Symbols\Tuples\TupleTypeSymbol.cs (1)
494Binder.Error(diagnostics, ErrorCode.ERR_PredefinedTypeMemberNotFoundInAssembly, syntax, relativeDescriptor.Name, type, type.ContainingAssembly);