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