103 references to Error
Microsoft.CodeAnalysis.CSharp (103)
Binder\Binder.ValueChecks.cs (22)
736
Error
(diagnostics, ErrorCode.ERR_BadSKknown, node, ns.NamespaceSymbol, MessageID.IDS_SK_NAMESPACE.Localize(), MessageID.IDS_SK_VARIABLE.Localize());
741
Error
(diagnostics, ErrorCode.ERR_BadSKknown, node, type.Type, MessageID.IDS_SK_TYPE.Localize(), MessageID.IDS_SK_VARIABLE.Localize());
752
Error
(diagnostics, GetMethodGroupOrFunctionPointerLvalueError(valueKind), node, unconvertedAddressOf.Operand.Name, MessageID.IDS_AddressOfMethodGroup.Localize());
763
Error
(diagnostics, GetMethodGroupOrFunctionPointerLvalueError(valueKind), node, methodGroup.Name, MessageID.IDS_MethodGroup.Localize());
777
Error
(diagnostics, errorCode, node, queryref.RangeVariableSymbol.Name);
1008
Error
(diagnostics, errorCode, node, node);
1017
Error
(diagnostics, ErrorCode.ERR_BadSKknown, expr.Syntax, ((BoundNamespaceExpression)expr).NamespaceSymbol, MessageID.IDS_SK_NAMESPACE.Localize(), MessageID.IDS_SK_VARIABLE.Localize());
1020
Error
(diagnostics, ErrorCode.ERR_BadSKunknown, expr.Syntax, expr.Type, MessageID.IDS_SK_TYPE.Localize());
1218
Error
(diagnostics, errorCode, node, parameterSymbol);
1613
Error
(diagnostics, GetStandardLvalueError(valueKind), eventSyntax, eventSymbol);
1673
Error
(diagnostics, ErrorCode.ERR_ReturnNotLValue, callSyntaxOpt, methodSymbol);
1724
Error
(diagnostics, ErrorCode.ERR_ReturnNotLValue, expr.Syntax, propertySymbol);
1755
Error
(diagnostics, ErrorCode.ERR_AssgReadonlyProp, node, propertySymbol);
1765
Error
(diagnostics, ErrorCode.ERR_AssignmentInitOnly, node, propertySymbol);
1786
Error
(diagnostics, ErrorCode.ERR_BadProtectedAccess, node, propertySymbol, accessThroughType, this.ContainingType);
1790
Error
(diagnostics, ErrorCode.ERR_InaccessibleSetter, node, propertySymbol);
1820
Error
(diagnostics, ErrorCode.ERR_PropertyLacksGet, node, propertySymbol);
1835
Error
(diagnostics, ErrorCode.ERR_BadProtectedAccess, node, propertySymbol, accessThroughType, this.ContainingType);
1839
Error
(diagnostics, ErrorCode.ERR_InaccessibleGetter, node, propertySymbol);
1930
Error
(diagnostics, ErrorCode.ERR_AbstractBaseCall, node, propertyOrEventSymbolOpt ?? member);
3122
Error
(diagnostics, ReadOnlyLocalErrors[index], node, local, cause.Localize());
3274
Error
(diagnostics, ReadOnlyErrors[index], node, field);
Binder\Binder_Attributes.cs (1)
962
Binder.
Error
(diagnostics, ErrorCode.ERR_AttrArgWithTypeVars, node.Syntax, typeOfArgument.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat));
Binder\Binder_Await.cs (10)
305
Error
(diagnostics, ErrorCode.ERR_BadAwaitArgIntrinsic, node, expression.Display);
342
Error
(diagnostics, ErrorCode.ERR_BadAwaitArg, node, expression.Type);
353
Error
(diagnostics, ErrorCode.ERR_BadAwaitArg, node, expression.Type);
381
Error
(diagnostics, ErrorCode.ERR_NoSuchMember, node, awaiterType, WellKnownMemberNames.IsCompleted);
389
Error
(diagnostics, ErrorCode.ERR_PropertyLacksGet, node, isCompletedProperty);
396
Error
(diagnostics, ErrorCode.ERR_BadAwaiterPattern, node, awaiterType, awaitedExpressionType);
420
Error
(diagnostics, ErrorCode.ERR_DoesntImplementAwaitInterface, node, awaiterType, INotifyCompletion);
449
Error
(diagnostics, ErrorCode.ERR_NoSuchMember, node, awaiterType, WellKnownMemberNames.GetResult);
459
Error
(diagnostics, ErrorCode.ERR_NoSuchMember, node, awaiterType, WellKnownMemberNames.GetResult);
467
Error
(diagnostics, ErrorCode.ERR_BadAwaiterPattern, node, awaiterType, awaitedExpressionType);
Binder\Binder_Conversions.cs (2)
463
Error
(diagnostics, ErrorCode.ERR_InlineArrayConversionToReadOnlySpanNotSupported, syntax, destination);
477
Error
(diagnostics, ErrorCode.ERR_InlineArrayConversionToSpanNotSupported, syntax, destination);
Binder\Binder_Deconstruct.cs (2)
414
Error
(diagnostics, ErrorCode.ERR_TypeInferenceFailedForImplicitlyTypedDeconstructionVariable, pending.Syntax, "_");
719
Error
(diagnostics, ErrorCode.ERR_MissingDeconstruct, rightSyntax, receiver.Type!, numParameters);
Binder\Binder_Expressions.cs (18)
2800
Error
(diagnostics, ErrorCode.ERR_ConversionNotTupleCompatible, syntax, tuple.Arguments.Length, targetType);
2810
Error
(diagnostics, ErrorCode.ERR_StackAllocConversionNotPossible, syntax, stackAllocExpression.ElementType, targetType);
4634
Error
(diagnostics, ErrorCode.ERR_ArrayInitializerIncorrectLength, node, constantSizeOpt.Value);
6910
Error
(diagnostics, ErrorCode.ERR_MissingCoClass, node, coClassType, interfaceType);
6928
Error
(diagnostics, ErrorCode.ERR_BadCoClassSig, node, coClassType, interfaceType);
6954
Error
(diagnostics, ErrorCode.ERR_NoExplicitConv, node, distinguisher.First, distinguisher.Second);
7848
Error
(diagnostics, ErrorCode.ERR_LookupInTypeVariable, boundLeft.Syntax, leftType);
7877
Error
(diagnostics, ErrorCode.WRN_DotOnDefault, node, boundLeft.Type);
8056
Error
(diagnostics, ErrorCode.ERR_NoSuchMember, name, boundLeft.Display, plainName);
8063
Error
(diagnostics, ErrorCode.ERR_NoSuchMember, name, boundLeft.Type, plainName);
8067
Error
(diagnostics, ErrorCode.ERR_NoSuchMemberOrExtensionNeedUsing, name, boundLeft.Type, plainName, "System");
8071
Error
(diagnostics, ErrorCode.ERR_NoSuchMemberOrExtension, name, boundLeft.Type, plainName);
8285
Error
(diagnostics, ErrorCode.ERR_BadTypeReference, right, plainName, symbol);
8525
Error
(diagnostics, ErrorCode.ERR_BindToBogus, node, fieldSymbol);
8814
Error
(diagnostics, errorCode, node, symbol);
8828
Error
(diagnostics, ErrorCode.ERR_ObjectRequired, node, symbol);
9335
Error
(diagnostics, ErrorCode.ERR_BadIndexCount, node, rank);
9657
Error
(diagnostics,
Binder\Binder_Invocation.cs (13)
413
Error
(diagnostics, ErrorCode.ERR_NoDynamicPhantomOnBase, node, methodGroup.Name);
557
Error
(diagnostics, ErrorCode.ERR_CannotDynamicInvokeOnExpression, receiver.Syntax, receiver.Type);
602
Error
(diagnostics, ErrorCode.ERR_BadDynamicMethodArg, arg.Syntax, "__arglist");
611
Error
(diagnostics, ErrorCode.ERR_BadDynamicMethodArg, arg.Syntax, arg.Type);
683
Error
(diagnostics,
819
Error
(diagnostics, ErrorCode.ERR_BadArgTypeDynamicExtension, syntax, methodGroup.InstanceOpt.Type, methodGroup.Name);
852
Error
(diagnostics, ErrorCode.WRN_DynamicDispatchToConditionalMethod, syntax, methodGroup.Name);
909
Error
(diagnostics,
924
Error
(diagnostics,
1053
Error
(diagnostics, ErrorCode.ERR_NoImplicitConv, call.ReceiverOpt.Syntax, distinguisher.First, distinguisher.Second);
1059
Error
(diagnostics, ErrorCode.ERR_NoImplicitConv, call.ReceiverOpt.Syntax, distinguisher.First, distinguisher.Second);
1073
Error
(diagnostics, ErrorCode.ERR_BadDynamicMethodArg, dynInvoke.Expression.Syntax, dynInvoke.Expression.Type);
1793
Error
(diagnostics, ErrorCode.WRN_ImplicitCopyInReadOnlyMember, receiver.Syntax, method, ThisParameterSymbol.SymbolName);
Binder\Binder_Patterns.cs (6)
378
Error
(diagnostics, ErrorCode.ERR_ListPatternRequiresLength, node, inputType);
743
Error
(diagnostics, ErrorCode.ERR_PatternNullableType, typeSyntax, patternType.GetNullableUnderlyingType());
748
Error
(diagnostics, ErrorCode.ERR_PatternNullableType, typeSyntax, patternType);
753
Error
(diagnostics, ErrorCode.ERR_VarDeclIsStaticClass, typeSyntax, patternType);
776
Error
(diagnostics, ErrorCode.ERR_PatternWrongGenericTypeInVersion, typeSyntax,
786
Error
(diagnostics, ErrorCode.ERR_PatternWrongType, typeSyntax, inputType, patternType);
Binder\Binder_Query.cs (1)
982
Error
(diagnostics, ErrorCode.ERR_BadSKunknown, ultimateReceiver.Syntax, ultimateReceiver.Type, MessageID.IDS_SK_TYVAR.Localize());
Binder\Binder_Statements.cs (15)
1950
Error
(diagnostics, ErrorCode.ERR_RefAssignmentMustHaveIdentityConversion, expression.Syntax, targetType);
2244
Error
(diagnostics, ErrorCode.ERR_LiteralDoubleCast, syntax, (targetType.SpecialType == SpecialType.System_Single) ? "F" : "M", targetType);
2255
Error
(diagnostics, ErrorCode.ERR_ConstOutOfRange, syntax, sourceConstantValueOpt.Value, targetType);
2260
Error
(diagnostics, ErrorCode.ERR_NoImplicitConvCast, syntax, distinguisher.First, distinguisher.Second);
2270
Error
(diagnostics, ErrorCode.ERR_AmbigUDConv, syntax, originalUserDefinedConversions[0], originalUserDefinedConversions[1], sourceType, targetType);
2277
Error
(diagnostics, ErrorCode.ERR_NoImplicitConv, syntax, distinguisher.First, distinguisher.Second);
2286
Error
(diagnostics, ErrorCode.ERR_NoImplicitConv, syntax, sourceType, targetType);
2291
Error
(diagnostics, ErrorCode.ERR_NoImplicitConv, syntax, distinguisher.First, distinguisher.Second);
2313
Error
(diagnostics, ErrorCode.ERR_NoImplicitConv, syntax, operand.Display, targetType);
2345
Error
(diagnostics, ErrorCode.ERR_ConversionNotTupleCompatible, syntax, tuple.Arguments.Length, targetType);
2368
Error
(diagnostics, ErrorCode.ERR_TypeVarCantBeNull, syntax, targetType);
2373
Error
(diagnostics, ErrorCode.ERR_ValueCantBeNull, syntax, targetType);
2382
Error
(diagnostics, ErrorCode.ERR_StackAllocConversionNotPossible, syntax, stackAllocExpression.ElementType, targetType);
3163
Error
(diagnostics, ErrorCode.ERR_RefReturnMustHaveIdentityConversion, argument.Syntax, returnType);
3180
Error
(diagnostics, ErrorCode.ERR_BadAsyncReturnExpression, argument.Syntax, returnType, argument.Type);
Binder\Binder_Symbols.cs (5)
793
Error
(diagnostics, ErrorCode.ERR_TupleReservedElementNameAnyPosition, syntax, name);
798
Error
(diagnostics, ErrorCode.ERR_TupleReservedElementName, syntax, name, reserved);
1378
Error
(diagnostics, ErrorCode.ERR_BadArity, typeSyntax, type, MessageID.IDS_SK_TYPE.Localize(), typeArgumentsSyntax.Count);
1413
Error
(diagnostics, ErrorCode.ERR_BadArity, syntax, plainName, MessageID.IDS_MethodGroup.Localize(), typeArgumentsSyntax.Count);
1441
Error
(diagnostics, ErrorCode.ERR_AmbiguousPrimaryConstructorParameterAsColorColorReceiver, colorColorValueReceiver.Syntax, parameter.Name, parameter.Type, parameter);
Binder\ForEachLoopBinder.cs (2)
473
Error
(diagnostics, ErrorCode.ERR_RefAssignmentMustHaveIdentityConversion, collectionExpr.Syntax, iterationVariableType.Type);
1247
Error
(diagnostics, ErrorCode.ERR_BadAllowByRefLikeEnumerator, expr.Syntax, enumeratorType);
Binder\LockBinder.cs (3)
82
Error
(diagnostics, ErrorCode.ERR_MissingPredefinedMember, syntax, LockTypeFullName, WellKnownMemberNames.EnterScopeMethodName);
90
Error
(diagnostics, ErrorCode.ERR_MissingPredefinedMember, syntax, LockTypeFullName, WellKnownMemberNames.EnterScopeMethodName);
97
Error
(diagnostics, ErrorCode.ERR_MissingPredefinedMember, syntax, $"{LockTypeFullName}+{WellKnownMemberNames.LockScopeTypeName}", WellKnownMemberNames.DisposeMethodName);
Binder\UsingStatementBinder.cs (1)
263
Error
(diagnostics, errorCode, syntax, declarationTypeOpt ?? expressionOpt!.Display);
Lowering\IteratorRewriter\IteratorRewriter.cs (1)
162
Binder.
Error
(bag, ErrorCode.ERR_PropertyLacksGet, body.Syntax, symbol);
Symbols\Tuples\TupleTypeSymbol.cs (1)
494
Binder.
Error
(diagnostics, ErrorCode.ERR_PredefinedTypeMemberNotFoundInAssembly, syntax, relativeDescriptor.Name, type, type.ContainingAssembly);