103 references to Error
Microsoft.CodeAnalysis.CSharp (103)
Binder\Binder.ValueChecks.cs (22)
713
Error
(diagnostics, ErrorCode.ERR_BadSKknown, node, ns.NamespaceSymbol, MessageID.IDS_SK_NAMESPACE.Localize(), MessageID.IDS_SK_VARIABLE.Localize());
718
Error
(diagnostics, ErrorCode.ERR_BadSKknown, node, type.Type, MessageID.IDS_SK_TYPE.Localize(), MessageID.IDS_SK_VARIABLE.Localize());
729
Error
(diagnostics, GetMethodGroupOrFunctionPointerLvalueError(valueKind), node, unconvertedAddressOf.Operand.Name, MessageID.IDS_AddressOfMethodGroup.Localize());
740
Error
(diagnostics, GetMethodGroupOrFunctionPointerLvalueError(valueKind), node, methodGroup.Name, MessageID.IDS_MethodGroup.Localize());
754
Error
(diagnostics, errorCode, node, queryref.RangeVariableSymbol.Name);
985
Error
(diagnostics, errorCode, node, node);
994
Error
(diagnostics, ErrorCode.ERR_BadSKknown, expr.Syntax, ((BoundNamespaceExpression)expr).NamespaceSymbol, MessageID.IDS_SK_NAMESPACE.Localize(), MessageID.IDS_SK_VARIABLE.Localize());
997
Error
(diagnostics, ErrorCode.ERR_BadSKunknown, expr.Syntax, expr.Type, MessageID.IDS_SK_TYPE.Localize());
1195
Error
(diagnostics, errorCode, node, parameterSymbol);
1590
Error
(diagnostics, GetStandardLvalueError(valueKind), eventSyntax, eventSymbol);
1650
Error
(diagnostics, ErrorCode.ERR_ReturnNotLValue, callSyntaxOpt, methodSymbol);
1701
Error
(diagnostics, ErrorCode.ERR_ReturnNotLValue, expr.Syntax, propertySymbol);
1732
Error
(diagnostics, ErrorCode.ERR_AssgReadonlyProp, node, propertySymbol);
1742
Error
(diagnostics, ErrorCode.ERR_AssignmentInitOnly, node, propertySymbol);
1763
Error
(diagnostics, ErrorCode.ERR_BadProtectedAccess, node, propertySymbol, accessThroughType, this.ContainingType);
1767
Error
(diagnostics, ErrorCode.ERR_InaccessibleSetter, node, propertySymbol);
1797
Error
(diagnostics, ErrorCode.ERR_PropertyLacksGet, node, propertySymbol);
1812
Error
(diagnostics, ErrorCode.ERR_BadProtectedAccess, node, propertySymbol, accessThroughType, this.ContainingType);
1816
Error
(diagnostics, ErrorCode.ERR_InaccessibleGetter, node, propertySymbol);
1907
Error
(diagnostics, ErrorCode.ERR_AbstractBaseCall, node, propertyOrEventSymbolOpt ?? member);
3099
Error
(diagnostics, ReadOnlyLocalErrors[index], node, local, cause.Localize());
3251
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)
2803
Error
(diagnostics, ErrorCode.ERR_ConversionNotTupleCompatible, syntax, tuple.Arguments.Length, targetType);
2813
Error
(diagnostics, ErrorCode.ERR_StackAllocConversionNotPossible, syntax, stackAllocExpression.ElementType, targetType);
4637
Error
(diagnostics, ErrorCode.ERR_ArrayInitializerIncorrectLength, node, constantSizeOpt.Value);
6913
Error
(diagnostics, ErrorCode.ERR_MissingCoClass, node, coClassType, interfaceType);
6931
Error
(diagnostics, ErrorCode.ERR_BadCoClassSig, node, coClassType, interfaceType);
6957
Error
(diagnostics, ErrorCode.ERR_NoExplicitConv, node, distinguisher.First, distinguisher.Second);
7851
Error
(diagnostics, ErrorCode.ERR_LookupInTypeVariable, boundLeft.Syntax, leftType);
7880
Error
(diagnostics, ErrorCode.WRN_DotOnDefault, node, boundLeft.Type);
8059
Error
(diagnostics, ErrorCode.ERR_NoSuchMember, name, boundLeft.Display, plainName);
8066
Error
(diagnostics, ErrorCode.ERR_NoSuchMember, name, boundLeft.Type, plainName);
8070
Error
(diagnostics, ErrorCode.ERR_NoSuchMemberOrExtensionNeedUsing, name, boundLeft.Type, plainName, "System");
8074
Error
(diagnostics, ErrorCode.ERR_NoSuchMemberOrExtension, name, boundLeft.Type, plainName);
8288
Error
(diagnostics, ErrorCode.ERR_BadTypeReference, right, plainName, symbol);
8528
Error
(diagnostics, ErrorCode.ERR_BindToBogus, node, fieldSymbol);
8817
Error
(diagnostics, errorCode, node, symbol);
8831
Error
(diagnostics, ErrorCode.ERR_ObjectRequired, node, symbol);
9338
Error
(diagnostics, ErrorCode.ERR_BadIndexCount, node, rank);
9660
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)
1953
Error
(diagnostics, ErrorCode.ERR_RefAssignmentMustHaveIdentityConversion, expression.Syntax, targetType);
2247
Error
(diagnostics, ErrorCode.ERR_LiteralDoubleCast, syntax, (targetType.SpecialType == SpecialType.System_Single) ? "F" : "M", targetType);
2258
Error
(diagnostics, ErrorCode.ERR_ConstOutOfRange, syntax, sourceConstantValueOpt.Value, targetType);
2263
Error
(diagnostics, ErrorCode.ERR_NoImplicitConvCast, syntax, distinguisher.First, distinguisher.Second);
2273
Error
(diagnostics, ErrorCode.ERR_AmbigUDConv, syntax, originalUserDefinedConversions[0], originalUserDefinedConversions[1], sourceType, targetType);
2280
Error
(diagnostics, ErrorCode.ERR_NoImplicitConv, syntax, distinguisher.First, distinguisher.Second);
2289
Error
(diagnostics, ErrorCode.ERR_NoImplicitConv, syntax, sourceType, targetType);
2294
Error
(diagnostics, ErrorCode.ERR_NoImplicitConv, syntax, distinguisher.First, distinguisher.Second);
2316
Error
(diagnostics, ErrorCode.ERR_NoImplicitConv, syntax, operand.Display, targetType);
2348
Error
(diagnostics, ErrorCode.ERR_ConversionNotTupleCompatible, syntax, tuple.Arguments.Length, targetType);
2371
Error
(diagnostics, ErrorCode.ERR_TypeVarCantBeNull, syntax, targetType);
2376
Error
(diagnostics, ErrorCode.ERR_ValueCantBeNull, syntax, targetType);
2385
Error
(diagnostics, ErrorCode.ERR_StackAllocConversionNotPossible, syntax, stackAllocExpression.ElementType, targetType);
3166
Error
(diagnostics, ErrorCode.ERR_RefReturnMustHaveIdentityConversion, argument.Syntax, returnType);
3183
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);
1399
Error
(diagnostics, ErrorCode.ERR_BadArity, typeSyntax, type, MessageID.IDS_SK_TYPE.Localize(), typeArgumentsSyntax.Count);
1431
Error
(diagnostics, ErrorCode.ERR_BadArity, syntax, plainName, MessageID.IDS_MethodGroup.Localize(), typeArgumentsSyntax.Count);
1459
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);