101 references to Error
Microsoft.CodeAnalysis.CSharp (101)
Binder\Binder_AnonymousTypes.cs (1)
250Error(diagnostics, ErrorCode.ERR_AnonymousTypePropertyAssignedBadValue, errorSyntax, errorArg);
Binder\Binder_Attributes.cs (3)
254Error(diagnostics, ErrorCode.ERR_AttributeCtorInParameter, node, attributeConstructor.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 407Error(diagnostics, ErrorCode.ERR_BadAttributeParamType, syntax, parameter.Name, paramType.Type); 503Error(diagnostics, ErrorCode.ERR_DuplicateNamedAttributeArgument, argument, argumentName);
Binder\Binder_Constraints.cs (9)
500Error(diagnostics, ErrorCode.ERR_DuplicateBound, syntax, type.Type.SetUnknownNullabilityForReferenceTypes(), typeParameter.Name); 514Error(diagnostics, ErrorCode.ERR_ClassBoundNotFirst, syntax, type.Type); 529Error(diagnostics, ErrorCode.ERR_RefValBoundWithClass, syntax, type.Type); 538Error(diagnostics, ErrorCode.ERR_RefValBoundWithClass, syntax, type.Type); 544Error(diagnostics, ErrorCode.ERR_UnmanagedBoundWithClass, syntax, type.Type); 579Error(diagnostics, ErrorCode.ERR_SpecialTypeAsBound, syntax, type); 605Error(diagnostics, ErrorCode.ERR_ConstraintIsStaticClass, syntax, type); 614Error(diagnostics, ErrorCode.ERR_BadBoundType, syntax, type); 634Error(diagnostics, ErrorCode.ERR_ConstructedDynamicTypeAsBound, syntax, type);
Binder\Binder_Expressions.cs (36)
1288Error(diagnostics, ErrorCode.ERR_MethodArgCantBeRefAny, node, argument.Type); 1372Error(diagnostics, ErrorCode.ERR_SpecialByRefInLambda, node, runtimeArgumentHandleType); 1781Error(diagnostics, ErrorCode.ERR_QueryOuterKey, node, name); 1785Error(diagnostics, ErrorCode.ERR_QueryInnerKey, node, name); 1789Error(diagnostics, ErrorCode.ERR_NameNotInContext, node, name); 2089Error(diagnostics, ErrorCode.ERR_InvalidPrimaryConstructorParameterReference, node, parameter); 2101Error(diagnostics, ErrorCode.ERR_ExtensionParameterInStaticContext, node, parameter.Name); 2106Error(diagnostics, ErrorCode.ERR_InvalidExtensionParameterReference, node, parameter); 2123Error(diagnostics, ErrorCode.ERR_AnonDelegateCantUse, node, parameter.Name); 2127Error(diagnostics, ErrorCode.ERR_SpecialByRefInLambda, node, parameter.Type); 2132Error(diagnostics, ErrorCode.ERR_AnonDelegateCantUseRefLike, node, parameter.Name); 2146Error(diagnostics, ErrorCode.ERR_UnsupportedPrimaryConstructorParameterCapturingRef, node, parameter.Name); 2150Error(diagnostics, ErrorCode.ERR_UnsupportedPrimaryConstructorParameterCapturingRefAny, node, parameter.Type); 2155Error(diagnostics, ErrorCode.ERR_UnsupportedPrimaryConstructorParameterCapturingRefLike, node, parameter.Name); 2292Error(diagnostics, ErrorCode.ERR_VariableUsedBeforeDeclarationAndHidesField, node, node, possibleField); 2296Error(diagnostics, ErrorCode.ERR_VariableUsedBeforeDeclaration, node, node); 2313Error(diagnostics, ErrorCode.ERR_SpecialByRefInLambda, node, type); 2317Error(diagnostics, ErrorCode.ERR_AnonDelegateCantUseLocal, node, localSymbol); 2353Error(diagnostics, ErrorCode.ERR_SimpleProgramLocalIsReferencedOutsideOfTopLevelStatement, node, node); 2526Error(diagnostics, ErrorCode.ERR_LabelNotFound, node, labelName); 2696Error(diagnostics, ErrorCode.ERR_ValConstraintNotSatisfied, node, nullableType, nullableType.TypeParameters.Single(), indexType); 2776Error(diagnostics, ErrorCode.ERR_ValConstraintNotSatisfied, node, nullableType, nullableType.TypeParameters.Single(), rangeType); 2803Error(diagnostics, ErrorCode.ERR_ValConstraintNotSatisfied, operand, nullableType, nullableType.TypeParameters.Single(), indexType); 3459Error(diagnostics, ErrorCode.ERR_NamedArgumentSpecificationBeforeFixedArgument, argumentSyntax, 4218Error(diagnostics, ErrorCode.ERR_ArrayElementCantBeRefAny, node, bestType); 4416Error(diagnostics, ErrorCode.ERR_ArrayInitializerIncorrectLength, node, knownSizeOpt.Value); 4564Error(diagnostics, ErrorCode.ERR_BadIndexCount, nonNullSyntax, type.Rank); 6019Error(diagnostics, ErrorCode.ERR_ReadonlyValueTypeInObjectInitializer, leftSyntax, fieldSymbol, fieldSymbol.Type); 6142Error(diagnostics, ErrorCode.ERR_ValueTypePropertyInObjectInitializer, memberNameSyntax, propertySymbol, propertySymbol.Type); 6177Error(diagnostics, ErrorCode.ERR_NoSuchMember, memberNameSyntax, implicitReceiver.Type, member); 6186Error(diagnostics, ErrorCode.ERR_MemberCannotBeInitialized, memberNameSyntax, member); 6216Error(diagnostics, ErrorCode.ERR_MemberAlreadyInitialized, memberNameSyntax, memberName); 6354Error(diagnostics, ErrorCode.ERR_CollectionInitRequiresIEnumerable, initializerSyntax, initializerType); 7716Error(diagnostics, ErrorCode.ERR_TypeArgsNotAllowed, right, right.Identifier.Text, SymbolKind.Property.Localize()); 7728Error(diagnostics, ErrorCode.ERR_BadTypeArgument, typeArgumentsSyntax[i], typeArgument.Type); 7893Error(diagnostics, ErrorCode.ERR_BadUnaryOp, node, operatorToken.Text, boundLeft.Display);
Binder\Binder_Operators.cs (37)
101Error(diagnostics, ErrorCode.ERR_BadBinaryOps, node, node.OperatorToken.Text, left.Display, right.Display); 730Error(diagnostics, ErrorCode.ERR_MissingPredefinedMember, node, delegateType, SourceEventSymbol.GetAccessorName(eventSymbol.Name, isAddition)); 740Error(diagnostics, ErrorCode.ERR_BadAccess, node, method); 819Error(diagnostics, ErrorCode.ERR_BadBinaryOps, node, node.OperatorToken.Text, left.Display, right.Display); 834Error(diagnostics, ErrorCode.ERR_InvalidDynamicCondition, node.Left, left.Type, kind == BinaryOperatorKind.LogicalAnd ? "false" : "true"); 1307Error(diagnostics, errorCode, node, operatorName, operand.Display); 1344Error(diagnostics, ErrorCode.ERR_BadOpOnNullOrDefaultOrNew, node, operatorToken.Text, "default"); 1347Error(diagnostics, ErrorCode.ERR_AmbigBinaryOpsOnDefault, node, operatorToken.Text, left.Display, right.Display); 1351Error(diagnostics, ErrorCode.ERR_AmbigBinaryOpsOnUnconstrainedDefault, node, operatorToken.Text, right.Type); 1355Error(diagnostics, ErrorCode.ERR_AmbigBinaryOpsOnUnconstrainedDefault, node, operatorToken.Text, left.Type); 1358Error(diagnostics, ErrorCode.ERR_BadOpOnNullOrDefaultOrNew, node, operatorToken.Text, left.Display); 1361Error(diagnostics, ErrorCode.ERR_BadOpOnNullOrDefaultOrNew, node, operatorToken.Text, right.Display); 1382Error(diagnostics, errorCode, node, operatorToken.Text, left.Display, right.Display); 1783Error(diagnostics, ErrorCode.ERR_BadBoolOp, syntax, signature.Method); 1822Error(diagnostics, ErrorCode.ERR_MustHaveOpTF, syntax, signature.Method, t); 1944Error(diagnostics, ErrorCode.ERR_BadBoolOp, syntax, signature.Method); 1974Error(diagnostics, ErrorCode.ERR_MustHaveOpTF, syntax, signature.Method, extensionContainingType); 2860Error(diagnostics, ErrorCode.WRN_CompileTimeCheckedOverflow, syntax, resultTypeSymbol); 4330Error(diagnostics, ErrorCode.ERR_BadOpOnNullOrDefaultOrNew, node, operatorText, operand.Display); 4486Error(diagnostics, ErrorCode.WRN_CompileTimeCheckedOverflow, syntax, resultTypeSymbol); 4780Error(diagnostics, ErrorCode.ERR_BadUnaryOp, node, SyntaxFacts.GetText(SyntaxKind.IsKeyword), operand.Display); 4804Error(diagnostics, ErrorCode.WRN_StaticInAsOrIs, node, targetType); 4867Error(diagnostics, ErrorCode.ERR_IsNullableType, node.Right, targetType); 4908Error(diagnostics, ErrorCode.WRN_IsAlwaysFalse, node, targetType); 4917Error(diagnostics, ErrorCode.WRN_IsDynamicIsConfusing, 4969Error(diagnostics, ErrorCode.ERR_BadBinaryOps, syntax, "is", operandType, targetType); 4976Error(diagnostics, errorCode, syntax, targetType); 5339Error(diagnostics, ErrorCode.ERR_AsNullableType, node.Right, targetType); 5349Error(diagnostics, ErrorCode.ERR_AsWithTypeVar, node, targetType); 5357Error(diagnostics, ErrorCode.ERR_AsMustHaveReferenceType, node, targetType); 5374Error(diagnostics, ErrorCode.WRN_StaticInAsOrIs, node, targetType); 5495Error(diagnostics, ErrorCode.ERR_NoExplicitBuiltinConv, node, distinguisher.First, distinguisher.Second); 5528Error(diagnostics, ErrorCode.ERR_BadBinaryOps, node, "as", operandType, targetType); 5533Error(diagnostics, ErrorCode.WRN_AlwaysNull, node, targetType); 5575Error(diagnostics, ErrorCode.ERR_BadBinaryOps, node, SyntaxFacts.GetText(node.OperatorToken.Kind()), leftOperand.Display, rightOperand.Display); 5601Error(diagnostics, ErrorCode.ERR_BadOpOnNullOrDefaultOrNew, node, node.OperatorToken.Text, "default"); 5831Error(diagnostics, ErrorCode.ERR_BadBinaryOps, node, SyntaxFacts.GetText(node.OperatorToken.Kind()), leftOperand.Display, rightOperand.Display);
Binder\Binder_Patterns.cs (3)
318Error(diagnostics, ErrorCode.ERR_UnsupportedTypeForListPattern, node, inputType); 1596Error(diagnostics, ErrorCode.ERR_NoSuchMember, memberName, implicitReceiver.Type, name); 1605Error(diagnostics, ErrorCode.ERR_PropertyLacksGet, memberName, name);
Binder\Binder_Statements.cs (6)
854Error(diagnostics, ErrorCode.ERR_VarDeclIsStaticClass, typeSyntax, declType.Type); 859Error(diagnostics, ErrorCode.ERR_BadConstType, typeSyntax, declType.Type); 908Error(diagnostics, ErrorCode.ERR_ImplicitlyTypedVariableAssignedBadValue, errorSyntax, expression.Display); 1034Error(localDiagnostics, ErrorCode.ERR_ImplicitlyTypedVariableAssignedBadValue, declarator, declTypeOpt.Type); 1043Error(localDiagnostics, ErrorCode.ERR_VarDeclIsStaticClass, typeSyntax, initializerType); 3351Error(diagnostics, ErrorCode.ERR_UnreachableCatch, declaration.Type, previousType);
Binder\Binder_Symbols.cs (2)
648Error(diagnostics, ErrorCode.ERR_ArrayOfStaticClass, node.ElementType, type.Type); 659Error(diagnostics, ErrorCode.ERR_ArrayElementCantBeRefAny, node.ElementType, type.Type);
Binder\Binder_TupleOperators.cs (2)
193Error(diagnostics, ErrorCode.ERR_BadBinaryOps, node, node.OperatorToken.Text, left.Display, right.Display); 232Error(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);