103 references to Error
Microsoft.CodeAnalysis.CSharp (103)
Binder\Binder.ValueChecks.cs (22)
736Error(diagnostics, ErrorCode.ERR_BadSKknown, node, ns.NamespaceSymbol, MessageID.IDS_SK_NAMESPACE.Localize(), MessageID.IDS_SK_VARIABLE.Localize()); 741Error(diagnostics, ErrorCode.ERR_BadSKknown, node, type.Type, MessageID.IDS_SK_TYPE.Localize(), MessageID.IDS_SK_VARIABLE.Localize()); 752Error(diagnostics, GetMethodGroupOrFunctionPointerLvalueError(valueKind), node, unconvertedAddressOf.Operand.Name, MessageID.IDS_AddressOfMethodGroup.Localize()); 763Error(diagnostics, GetMethodGroupOrFunctionPointerLvalueError(valueKind), node, methodGroup.Name, MessageID.IDS_MethodGroup.Localize()); 777Error(diagnostics, errorCode, node, queryref.RangeVariableSymbol.Name); 1008Error(diagnostics, errorCode, node, node); 1017Error(diagnostics, ErrorCode.ERR_BadSKknown, expr.Syntax, ((BoundNamespaceExpression)expr).NamespaceSymbol, MessageID.IDS_SK_NAMESPACE.Localize(), MessageID.IDS_SK_VARIABLE.Localize()); 1020Error(diagnostics, ErrorCode.ERR_BadSKunknown, expr.Syntax, expr.Type, MessageID.IDS_SK_TYPE.Localize()); 1218Error(diagnostics, errorCode, node, parameterSymbol); 1613Error(diagnostics, GetStandardLvalueError(valueKind), eventSyntax, eventSymbol); 1673Error(diagnostics, ErrorCode.ERR_ReturnNotLValue, callSyntaxOpt, methodSymbol); 1724Error(diagnostics, ErrorCode.ERR_ReturnNotLValue, expr.Syntax, propertySymbol); 1755Error(diagnostics, ErrorCode.ERR_AssgReadonlyProp, node, propertySymbol); 1765Error(diagnostics, ErrorCode.ERR_AssignmentInitOnly, node, propertySymbol); 1786Error(diagnostics, ErrorCode.ERR_BadProtectedAccess, node, propertySymbol, accessThroughType, this.ContainingType); 1790Error(diagnostics, ErrorCode.ERR_InaccessibleSetter, node, propertySymbol); 1820Error(diagnostics, ErrorCode.ERR_PropertyLacksGet, node, propertySymbol); 1835Error(diagnostics, ErrorCode.ERR_BadProtectedAccess, node, propertySymbol, accessThroughType, this.ContainingType); 1839Error(diagnostics, ErrorCode.ERR_InaccessibleGetter, node, propertySymbol); 1930Error(diagnostics, ErrorCode.ERR_AbstractBaseCall, node, propertyOrEventSymbolOpt ?? member); 3122Error(diagnostics, ReadOnlyLocalErrors[index], node, local, cause.Localize()); 3274Error(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)
2800Error(diagnostics, ErrorCode.ERR_ConversionNotTupleCompatible, syntax, tuple.Arguments.Length, targetType); 2810Error(diagnostics, ErrorCode.ERR_StackAllocConversionNotPossible, syntax, stackAllocExpression.ElementType, targetType); 4634Error(diagnostics, ErrorCode.ERR_ArrayInitializerIncorrectLength, node, constantSizeOpt.Value); 6910Error(diagnostics, ErrorCode.ERR_MissingCoClass, node, coClassType, interfaceType); 6928Error(diagnostics, ErrorCode.ERR_BadCoClassSig, node, coClassType, interfaceType); 6954Error(diagnostics, ErrorCode.ERR_NoExplicitConv, node, distinguisher.First, distinguisher.Second); 7848Error(diagnostics, ErrorCode.ERR_LookupInTypeVariable, boundLeft.Syntax, leftType); 7877Error(diagnostics, ErrorCode.WRN_DotOnDefault, node, boundLeft.Type); 8056Error(diagnostics, ErrorCode.ERR_NoSuchMember, name, boundLeft.Display, plainName); 8063Error(diagnostics, ErrorCode.ERR_NoSuchMember, name, boundLeft.Type, plainName); 8067Error(diagnostics, ErrorCode.ERR_NoSuchMemberOrExtensionNeedUsing, name, boundLeft.Type, plainName, "System"); 8071Error(diagnostics, ErrorCode.ERR_NoSuchMemberOrExtension, name, boundLeft.Type, plainName); 8285Error(diagnostics, ErrorCode.ERR_BadTypeReference, right, plainName, symbol); 8525Error(diagnostics, ErrorCode.ERR_BindToBogus, node, fieldSymbol); 8814Error(diagnostics, errorCode, node, symbol); 8828Error(diagnostics, ErrorCode.ERR_ObjectRequired, node, symbol); 9335Error(diagnostics, ErrorCode.ERR_BadIndexCount, node, rank); 9657Error(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)
1950Error(diagnostics, ErrorCode.ERR_RefAssignmentMustHaveIdentityConversion, expression.Syntax, targetType); 2244Error(diagnostics, ErrorCode.ERR_LiteralDoubleCast, syntax, (targetType.SpecialType == SpecialType.System_Single) ? "F" : "M", targetType); 2255Error(diagnostics, ErrorCode.ERR_ConstOutOfRange, syntax, sourceConstantValueOpt.Value, targetType); 2260Error(diagnostics, ErrorCode.ERR_NoImplicitConvCast, syntax, distinguisher.First, distinguisher.Second); 2270Error(diagnostics, ErrorCode.ERR_AmbigUDConv, syntax, originalUserDefinedConversions[0], originalUserDefinedConversions[1], sourceType, targetType); 2277Error(diagnostics, ErrorCode.ERR_NoImplicitConv, syntax, distinguisher.First, distinguisher.Second); 2286Error(diagnostics, ErrorCode.ERR_NoImplicitConv, syntax, sourceType, targetType); 2291Error(diagnostics, ErrorCode.ERR_NoImplicitConv, syntax, distinguisher.First, distinguisher.Second); 2313Error(diagnostics, ErrorCode.ERR_NoImplicitConv, syntax, operand.Display, targetType); 2345Error(diagnostics, ErrorCode.ERR_ConversionNotTupleCompatible, syntax, tuple.Arguments.Length, targetType); 2368Error(diagnostics, ErrorCode.ERR_TypeVarCantBeNull, syntax, targetType); 2373Error(diagnostics, ErrorCode.ERR_ValueCantBeNull, syntax, targetType); 2382Error(diagnostics, ErrorCode.ERR_StackAllocConversionNotPossible, syntax, stackAllocExpression.ElementType, targetType); 3163Error(diagnostics, ErrorCode.ERR_RefReturnMustHaveIdentityConversion, argument.Syntax, returnType); 3180Error(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); 1378Error(diagnostics, ErrorCode.ERR_BadArity, typeSyntax, type, MessageID.IDS_SK_TYPE.Localize(), typeArgumentsSyntax.Count); 1413Error(diagnostics, ErrorCode.ERR_BadArity, syntax, plainName, MessageID.IDS_MethodGroup.Localize(), typeArgumentsSyntax.Count); 1441Error(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);