92 references to Error
Microsoft.CodeAnalysis.CSharp (92)
Binder\Binder_AnonymousTypes.cs (1)
250
Error
(diagnostics, ErrorCode.ERR_AnonymousTypePropertyAssignedBadValue, errorSyntax, errorArg);
Binder\Binder_Attributes.cs (3)
241
Error
(diagnostics, ErrorCode.ERR_AttributeCtorInParameter, node, attributeConstructor.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat));
394
Error
(diagnostics, ErrorCode.ERR_BadAttributeParamType, syntax, parameter.Name, paramType.Type);
490
Error
(diagnostics, ErrorCode.ERR_DuplicateNamedAttributeArgument, argument, argumentName);
Binder\Binder_Constraints.cs (9)
458
Error
(diagnostics, ErrorCode.ERR_DuplicateBound, syntax, type.Type.SetUnknownNullabilityForReferenceTypes(), typeParameter.Name);
472
Error
(diagnostics, ErrorCode.ERR_ClassBoundNotFirst, syntax, type.Type);
487
Error
(diagnostics, ErrorCode.ERR_RefValBoundWithClass, syntax, type.Type);
496
Error
(diagnostics, ErrorCode.ERR_RefValBoundWithClass, syntax, type.Type);
502
Error
(diagnostics, ErrorCode.ERR_UnmanagedBoundWithClass, syntax, type.Type);
537
Error
(diagnostics, ErrorCode.ERR_SpecialTypeAsBound, syntax, type);
563
Error
(diagnostics, ErrorCode.ERR_ConstraintIsStaticClass, syntax, type);
572
Error
(diagnostics, ErrorCode.ERR_BadBoundType, syntax, type);
592
Error
(diagnostics, ErrorCode.ERR_ConstructedDynamicTypeAsBound, syntax, type);
Binder\Binder_Expressions.cs (29)
1213
Error
(diagnostics, ErrorCode.ERR_MethodArgCantBeRefAny, node, argument.Type);
1297
Error
(diagnostics, ErrorCode.ERR_SpecialByRefInLambda, node, runtimeArgumentHandleType);
1589
Error
(diagnostics, ErrorCode.ERR_QueryOuterKey, node, name);
1593
Error
(diagnostics, ErrorCode.ERR_QueryInnerKey, node, name);
1597
Error
(diagnostics, ErrorCode.ERR_NameNotInContext, node, name);
1868
Error
(diagnostics, ErrorCode.ERR_VariableUsedBeforeDeclarationAndHidesField, node, node, possibleField);
1872
Error
(diagnostics, ErrorCode.ERR_VariableUsedBeforeDeclaration, node, node);
1902
Error
(diagnostics, ErrorCode.ERR_AnonDelegateCantUseLocal, node, localSymbol);
1921
Error
(diagnostics, ErrorCode.ERR_InvalidPrimaryConstructorParameterReference, node, parameter);
1934
Error
(diagnostics, parameter.Type.IsRefLikeType ? ErrorCode.ERR_AnonDelegateCantUseRefLike : ErrorCode.ERR_AnonDelegateCantUse, node, parameter.Name);
1945
Error
(diagnostics, parameter.Type.IsRefLikeType ? ErrorCode.ERR_UnsupportedPrimaryConstructorParameterCapturingRefLike : ErrorCode.ERR_UnsupportedPrimaryConstructorParameterCapturingRef, node, parameter.Name);
2046
Error
(diagnostics, ErrorCode.ERR_SimpleProgramLocalIsReferencedOutsideOfTopLevelStatement, node, node);
2208
Error
(diagnostics, ErrorCode.ERR_LabelNotFound, node, labelName);
2363
Error
(diagnostics, ErrorCode.ERR_ValConstraintNotSatisfied, node, nullableType, nullableType.TypeParameters.Single(), indexType);
2443
Error
(diagnostics, ErrorCode.ERR_ValConstraintNotSatisfied, node, nullableType, nullableType.TypeParameters.Single(), rangeType);
2470
Error
(diagnostics, ErrorCode.ERR_ValConstraintNotSatisfied, operand, nullableType, nullableType.TypeParameters.Single(), indexType);
3118
Error
(diagnostics, ErrorCode.ERR_NamedArgumentSpecificationBeforeFixedArgument, argumentSyntax,
3426
Error
(diagnostics, ErrorCode.ERR_ArrayElementCantBeRefAny, node, bestType);
3624
Error
(diagnostics, ErrorCode.ERR_ArrayInitializerIncorrectLength, node, knownSizeOpt.Value);
3772
Error
(diagnostics, ErrorCode.ERR_BadIndexCount, nonNullSyntax, type.Rank);
5020
Error
(diagnostics, ErrorCode.ERR_ReadonlyValueTypeInObjectInitializer, leftSyntax, fieldSymbol, fieldSymbol.Type);
5130
Error
(diagnostics, ErrorCode.ERR_ValueTypePropertyInObjectInitializer, memberNameSyntax, propertySymbol, propertySymbol.Type);
5164
Error
(diagnostics, ErrorCode.ERR_NoSuchMember, memberNameSyntax, implicitReceiver.Type, member);
5173
Error
(diagnostics, ErrorCode.ERR_MemberCannotBeInitialized, memberNameSyntax, member);
5203
Error
(diagnostics, ErrorCode.ERR_MemberAlreadyInitialized, memberNameSyntax, memberName);
5335
Error
(diagnostics, ErrorCode.ERR_CollectionInitRequiresIEnumerable, initializerSyntax, initializerType);
6484
Error
(diagnostics, ErrorCode.ERR_TypeArgsNotAllowed, right, right.Identifier.Text, SymbolKind.Property.Localize());
6496
Error
(diagnostics, ErrorCode.ERR_BadTypeArgument, typeArgumentsSyntax[i], typeArgument.Type);
6655
Error
(diagnostics, ErrorCode.ERR_BadUnaryOp, node, operatorToken.Text, boundLeft.Display);
Binder\Binder_Operators.cs (35)
89
Error
(diagnostics, ErrorCode.ERR_BadBinaryOps, node, node.OperatorToken.Text, left.Display, right.Display);
295
Error
(diagnostics, ErrorCode.ERR_MissingPredefinedMember, node, delegateType, SourceEventSymbol.GetAccessorName(eventSymbol.Name, isAddition));
305
Error
(diagnostics, ErrorCode.ERR_BadAccess, node, method);
384
Error
(diagnostics, ErrorCode.ERR_BadBinaryOps, node, node.OperatorToken.Text, left.Display, right.Display);
399
Error
(diagnostics, ErrorCode.ERR_InvalidDynamicCondition, node.Left, left.Type, kind == BinaryOperatorKind.LogicalAnd ? "false" : "true");
779
Error
(diagnostics, errorCode, node, operatorName, operand.Display);
808
Error
(diagnostics, ErrorCode.ERR_BadOpOnNullOrDefaultOrNew, node, operatorToken.Text, "default");
811
Error
(diagnostics, ErrorCode.ERR_AmbigBinaryOpsOnDefault, node, operatorToken.Text, left.Display, right.Display);
815
Error
(diagnostics, ErrorCode.ERR_AmbigBinaryOpsOnUnconstrainedDefault, node, operatorToken.Text, right.Type);
819
Error
(diagnostics, ErrorCode.ERR_AmbigBinaryOpsOnUnconstrainedDefault, node, operatorToken.Text, left.Type);
822
Error
(diagnostics, ErrorCode.ERR_BadOpOnNullOrDefaultOrNew, node, operatorToken.Text, left.Display);
825
Error
(diagnostics, ErrorCode.ERR_BadOpOnNullOrDefaultOrNew, node, operatorToken.Text, right.Display);
847
Error
(diagnostics, errorCode, node, operatorToken.Text, left.Display, right.Display);
1137
Error
(diagnostics, ErrorCode.ERR_BadBoolOp, syntax, signature.Method);
1162
Error
(diagnostics, ErrorCode.ERR_MustHaveOpTF, syntax, signature.Method, t);
1850
Error
(diagnostics, ErrorCode.WRN_CompileTimeCheckedOverflow, syntax, resultTypeSymbol);
2689
Error
(diagnostics, ErrorCode.ERR_BadOpOnNullOrDefaultOrNew, node, operatorText, operand.Display);
2840
Error
(diagnostics, ErrorCode.WRN_CompileTimeCheckedOverflow, syntax, resultTypeSymbol);
3134
Error
(diagnostics, ErrorCode.ERR_BadUnaryOp, node, SyntaxFacts.GetText(SyntaxKind.IsKeyword), operand.Display);
3158
Error
(diagnostics, ErrorCode.WRN_StaticInAsOrIs, node, targetType);
3221
Error
(diagnostics, ErrorCode.ERR_IsNullableType, node.Right, targetType);
3262
Error
(diagnostics, ErrorCode.WRN_IsAlwaysFalse, node, targetType);
3271
Error
(diagnostics, ErrorCode.WRN_IsDynamicIsConfusing,
3323
Error
(diagnostics, ErrorCode.ERR_BadBinaryOps, syntax, "is", operandType, targetType);
3330
Error
(diagnostics, errorCode, syntax, targetType);
3664
Error
(diagnostics, ErrorCode.ERR_AsNullableType, node.Right, targetType);
3674
Error
(diagnostics, ErrorCode.ERR_AsWithTypeVar, node, targetType);
3682
Error
(diagnostics, ErrorCode.ERR_AsMustHaveReferenceType, node, targetType);
3699
Error
(diagnostics, ErrorCode.WRN_StaticInAsOrIs, node, targetType);
3820
Error
(diagnostics, ErrorCode.ERR_NoExplicitBuiltinConv, node, distinguisher.First, distinguisher.Second);
3853
Error
(diagnostics, ErrorCode.ERR_BadBinaryOps, node, "as", operandType, targetType);
3858
Error
(diagnostics, ErrorCode.WRN_AlwaysNull, node, targetType);
3895
Error
(diagnostics, ErrorCode.ERR_BadBinaryOps, node, SyntaxFacts.GetText(node.OperatorToken.Kind()), leftOperand.Display, rightOperand.Display);
3921
Error
(diagnostics, ErrorCode.ERR_BadOpOnNullOrDefaultOrNew, node, node.OperatorToken.Text, "default");
4153
Error
(diagnostics, ErrorCode.ERR_BadBinaryOps, node, SyntaxFacts.GetText(node.OperatorToken.Kind()), leftOperand.Display, rightOperand.Display);
Binder\Binder_Patterns.cs (3)
306
Error
(diagnostics, ErrorCode.ERR_UnsupportedTypeForListPattern, node, inputType);
1575
Error
(diagnostics, ErrorCode.ERR_NoSuchMember, memberName, implicitReceiver.Type, name);
1584
Error
(diagnostics, ErrorCode.ERR_PropertyLacksGet, memberName, name);
Binder\Binder_Statements.cs (6)
850
Error
(diagnostics, ErrorCode.ERR_VarDeclIsStaticClass, typeSyntax, declType.Type);
855
Error
(diagnostics, ErrorCode.ERR_BadConstType, typeSyntax, declType.Type);
904
Error
(diagnostics, ErrorCode.ERR_ImplicitlyTypedVariableAssignedBadValue, errorSyntax, expression.Display);
1030
Error
(localDiagnostics, ErrorCode.ERR_ImplicitlyTypedVariableAssignedBadValue, declarator, declTypeOpt.Type);
1039
Error
(localDiagnostics, ErrorCode.ERR_VarDeclIsStaticClass, typeSyntax, initializerType);
3204
Error
(diagnostics, ErrorCode.ERR_UnreachableCatch, declaration.Type, previousType);
Binder\Binder_Symbols.cs (2)
636
Error
(diagnostics, ErrorCode.ERR_ArrayOfStaticClass, node.ElementType, type.Type);
647
Error
(diagnostics, ErrorCode.ERR_ArrayElementCantBeRefAny, node.ElementType, type.Type);
Binder\Binder_TupleOperators.cs (2)
189
Error
(diagnostics, ErrorCode.ERR_BadBinaryOps, node, node.OperatorToken.Text, left.Display, right.Display);
225
Error
(diagnostics, ErrorCode.ERR_TupleSizesMismatchForBinOps, node, leftCardinality, rightCardinality);
Binder\LockBinder.cs (2)
48
Error
(diagnostics, ErrorCode.ERR_LockNeedsReference, exprSyntax, expr.Display);
54
Error
(diagnostics, ErrorCode.ERR_LockNeedsReference, exprSyntax, exprType);