100 references to Error
Microsoft.CodeAnalysis.CSharp (100)
Binder\Binder_AnonymousTypes.cs (1)
250
Error
(diagnostics, ErrorCode.ERR_AnonymousTypePropertyAssignedBadValue, errorSyntax, errorArg);
Binder\Binder_Attributes.cs (3)
252
Error
(diagnostics, ErrorCode.ERR_AttributeCtorInParameter, node, attributeConstructor.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat));
405
Error
(diagnostics, ErrorCode.ERR_BadAttributeParamType, syntax, parameter.Name, paramType.Type);
501
Error
(diagnostics, ErrorCode.ERR_DuplicateNamedAttributeArgument, argument, argumentName);
Binder\Binder_Constraints.cs (9)
500
Error
(diagnostics, ErrorCode.ERR_DuplicateBound, syntax, type.Type.SetUnknownNullabilityForReferenceTypes(), typeParameter.Name);
514
Error
(diagnostics, ErrorCode.ERR_ClassBoundNotFirst, syntax, type.Type);
529
Error
(diagnostics, ErrorCode.ERR_RefValBoundWithClass, syntax, type.Type);
538
Error
(diagnostics, ErrorCode.ERR_RefValBoundWithClass, syntax, type.Type);
544
Error
(diagnostics, ErrorCode.ERR_UnmanagedBoundWithClass, syntax, type.Type);
579
Error
(diagnostics, ErrorCode.ERR_SpecialTypeAsBound, syntax, type);
605
Error
(diagnostics, ErrorCode.ERR_ConstraintIsStaticClass, syntax, type);
614
Error
(diagnostics, ErrorCode.ERR_BadBoundType, syntax, type);
634
Error
(diagnostics, ErrorCode.ERR_ConstructedDynamicTypeAsBound, syntax, type);
Binder\Binder_Expressions.cs (35)
1256
Error
(diagnostics, ErrorCode.ERR_MethodArgCantBeRefAny, node, argument.Type);
1340
Error
(diagnostics, ErrorCode.ERR_SpecialByRefInLambda, node, runtimeArgumentHandleType);
1719
Error
(diagnostics, ErrorCode.ERR_QueryOuterKey, node, name);
1723
Error
(diagnostics, ErrorCode.ERR_QueryInnerKey, node, name);
1727
Error
(diagnostics, ErrorCode.ERR_NameNotInContext, node, name);
2063
Error
(diagnostics, ErrorCode.ERR_VariableUsedBeforeDeclarationAndHidesField, node, node, possibleField);
2067
Error
(diagnostics, ErrorCode.ERR_VariableUsedBeforeDeclaration, node, node);
2100
Error
(diagnostics, ErrorCode.ERR_SpecialByRefInLambda, node, type);
2104
Error
(diagnostics, ErrorCode.ERR_AnonDelegateCantUseLocal, node, localSymbol);
2124
Error
(diagnostics, ErrorCode.ERR_InvalidPrimaryConstructorParameterReference, node, parameter);
2132
Error
(diagnostics, ErrorCode.ERR_InvalidExtensionParameterReference, node, parameter);
2148
Error
(diagnostics, ErrorCode.ERR_AnonDelegateCantUse, node, parameter.Name);
2152
Error
(diagnostics, ErrorCode.ERR_SpecialByRefInLambda, node, parameter.Type);
2157
Error
(diagnostics, ErrorCode.ERR_AnonDelegateCantUseRefLike, node, parameter.Name);
2171
Error
(diagnostics, ErrorCode.ERR_UnsupportedPrimaryConstructorParameterCapturingRef, node, parameter.Name);
2175
Error
(diagnostics, ErrorCode.ERR_UnsupportedPrimaryConstructorParameterCapturingRefAny, node, parameter.Type);
2180
Error
(diagnostics, ErrorCode.ERR_UnsupportedPrimaryConstructorParameterCapturingRefLike, node, parameter.Name);
2280
Error
(diagnostics, ErrorCode.ERR_SimpleProgramLocalIsReferencedOutsideOfTopLevelStatement, node, node);
2453
Error
(diagnostics, ErrorCode.ERR_LabelNotFound, node, labelName);
2623
Error
(diagnostics, ErrorCode.ERR_ValConstraintNotSatisfied, node, nullableType, nullableType.TypeParameters.Single(), indexType);
2703
Error
(diagnostics, ErrorCode.ERR_ValConstraintNotSatisfied, node, nullableType, nullableType.TypeParameters.Single(), rangeType);
2730
Error
(diagnostics, ErrorCode.ERR_ValConstraintNotSatisfied, operand, nullableType, nullableType.TypeParameters.Single(), indexType);
3386
Error
(diagnostics, ErrorCode.ERR_NamedArgumentSpecificationBeforeFixedArgument, argumentSyntax,
4145
Error
(diagnostics, ErrorCode.ERR_ArrayElementCantBeRefAny, node, bestType);
4343
Error
(diagnostics, ErrorCode.ERR_ArrayInitializerIncorrectLength, node, knownSizeOpt.Value);
4491
Error
(diagnostics, ErrorCode.ERR_BadIndexCount, nonNullSyntax, type.Rank);
5938
Error
(diagnostics, ErrorCode.ERR_ReadonlyValueTypeInObjectInitializer, leftSyntax, fieldSymbol, fieldSymbol.Type);
6061
Error
(diagnostics, ErrorCode.ERR_ValueTypePropertyInObjectInitializer, memberNameSyntax, propertySymbol, propertySymbol.Type);
6096
Error
(diagnostics, ErrorCode.ERR_NoSuchMember, memberNameSyntax, implicitReceiver.Type, member);
6105
Error
(diagnostics, ErrorCode.ERR_MemberCannotBeInitialized, memberNameSyntax, member);
6135
Error
(diagnostics, ErrorCode.ERR_MemberAlreadyInitialized, memberNameSyntax, memberName);
6273
Error
(diagnostics, ErrorCode.ERR_CollectionInitRequiresIEnumerable, initializerSyntax, initializerType);
7611
Error
(diagnostics, ErrorCode.ERR_TypeArgsNotAllowed, right, right.Identifier.Text, SymbolKind.Property.Localize());
7623
Error
(diagnostics, ErrorCode.ERR_BadTypeArgument, typeArgumentsSyntax[i], typeArgument.Type);
7782
Error
(diagnostics, ErrorCode.ERR_BadUnaryOp, node, operatorToken.Text, boundLeft.Display);
Binder\Binder_Operators.cs (37)
94
Error
(diagnostics, ErrorCode.ERR_BadBinaryOps, node, node.OperatorToken.Text, left.Display, right.Display);
694
Error
(diagnostics, ErrorCode.ERR_MissingPredefinedMember, node, delegateType, SourceEventSymbol.GetAccessorName(eventSymbol.Name, isAddition));
704
Error
(diagnostics, ErrorCode.ERR_BadAccess, node, method);
783
Error
(diagnostics, ErrorCode.ERR_BadBinaryOps, node, node.OperatorToken.Text, left.Display, right.Display);
798
Error
(diagnostics, ErrorCode.ERR_InvalidDynamicCondition, node.Left, left.Type, kind == BinaryOperatorKind.LogicalAnd ? "false" : "true");
1262
Error
(diagnostics, errorCode, node, operatorName, operand.Display);
1292
Error
(diagnostics, ErrorCode.ERR_BadOpOnNullOrDefaultOrNew, node, operatorToken.Text, "default");
1295
Error
(diagnostics, ErrorCode.ERR_AmbigBinaryOpsOnDefault, node, operatorToken.Text, left.Display, right.Display);
1299
Error
(diagnostics, ErrorCode.ERR_AmbigBinaryOpsOnUnconstrainedDefault, node, operatorToken.Text, right.Type);
1303
Error
(diagnostics, ErrorCode.ERR_AmbigBinaryOpsOnUnconstrainedDefault, node, operatorToken.Text, left.Type);
1306
Error
(diagnostics, ErrorCode.ERR_BadOpOnNullOrDefaultOrNew, node, operatorToken.Text, left.Display);
1309
Error
(diagnostics, ErrorCode.ERR_BadOpOnNullOrDefaultOrNew, node, operatorToken.Text, right.Display);
1331
Error
(diagnostics, errorCode, node, operatorToken.Text, left.Display, right.Display);
1701
Error
(diagnostics, ErrorCode.ERR_BadBoolOp, syntax, signature.Method);
1726
Error
(diagnostics, ErrorCode.ERR_MustHaveOpTF, syntax, signature.Method, t);
1825
Error
(diagnostics, ErrorCode.ERR_BadBoolOp, syntax, signature.Method);
1855
Error
(diagnostics, ErrorCode.ERR_MustHaveOpTF, syntax, signature.Method, signature.Method.OriginalDefinition.ContainingType.ContainingType);
2729
Error
(diagnostics, ErrorCode.WRN_CompileTimeCheckedOverflow, syntax, resultTypeSymbol);
4159
Error
(diagnostics, ErrorCode.ERR_BadOpOnNullOrDefaultOrNew, node, operatorText, operand.Display);
4310
Error
(diagnostics, ErrorCode.WRN_CompileTimeCheckedOverflow, syntax, resultTypeSymbol);
4604
Error
(diagnostics, ErrorCode.ERR_BadUnaryOp, node, SyntaxFacts.GetText(SyntaxKind.IsKeyword), operand.Display);
4628
Error
(diagnostics, ErrorCode.WRN_StaticInAsOrIs, node, targetType);
4691
Error
(diagnostics, ErrorCode.ERR_IsNullableType, node.Right, targetType);
4732
Error
(diagnostics, ErrorCode.WRN_IsAlwaysFalse, node, targetType);
4741
Error
(diagnostics, ErrorCode.WRN_IsDynamicIsConfusing,
4793
Error
(diagnostics, ErrorCode.ERR_BadBinaryOps, syntax, "is", operandType, targetType);
4800
Error
(diagnostics, errorCode, syntax, targetType);
5163
Error
(diagnostics, ErrorCode.ERR_AsNullableType, node.Right, targetType);
5173
Error
(diagnostics, ErrorCode.ERR_AsWithTypeVar, node, targetType);
5181
Error
(diagnostics, ErrorCode.ERR_AsMustHaveReferenceType, node, targetType);
5198
Error
(diagnostics, ErrorCode.WRN_StaticInAsOrIs, node, targetType);
5319
Error
(diagnostics, ErrorCode.ERR_NoExplicitBuiltinConv, node, distinguisher.First, distinguisher.Second);
5352
Error
(diagnostics, ErrorCode.ERR_BadBinaryOps, node, "as", operandType, targetType);
5357
Error
(diagnostics, ErrorCode.WRN_AlwaysNull, node, targetType);
5399
Error
(diagnostics, ErrorCode.ERR_BadBinaryOps, node, SyntaxFacts.GetText(node.OperatorToken.Kind()), leftOperand.Display, rightOperand.Display);
5425
Error
(diagnostics, ErrorCode.ERR_BadOpOnNullOrDefaultOrNew, node, node.OperatorToken.Text, "default");
5657
Error
(diagnostics, ErrorCode.ERR_BadBinaryOps, node, SyntaxFacts.GetText(node.OperatorToken.Kind()), leftOperand.Display, rightOperand.Display);
Binder\Binder_Patterns.cs (3)
307
Error
(diagnostics, ErrorCode.ERR_UnsupportedTypeForListPattern, node, inputType);
1585
Error
(diagnostics, ErrorCode.ERR_NoSuchMember, memberName, implicitReceiver.Type, name);
1594
Error
(diagnostics, ErrorCode.ERR_PropertyLacksGet, memberName, name);
Binder\Binder_Statements.cs (6)
849
Error
(diagnostics, ErrorCode.ERR_VarDeclIsStaticClass, typeSyntax, declType.Type);
854
Error
(diagnostics, ErrorCode.ERR_BadConstType, typeSyntax, declType.Type);
903
Error
(diagnostics, ErrorCode.ERR_ImplicitlyTypedVariableAssignedBadValue, errorSyntax, expression.Display);
1029
Error
(localDiagnostics, ErrorCode.ERR_ImplicitlyTypedVariableAssignedBadValue, declarator, declTypeOpt.Type);
1038
Error
(localDiagnostics, ErrorCode.ERR_VarDeclIsStaticClass, typeSyntax, initializerType);
3342
Error
(diagnostics, ErrorCode.ERR_UnreachableCatch, declaration.Type, previousType);
Binder\Binder_Symbols.cs (2)
646
Error
(diagnostics, ErrorCode.ERR_ArrayOfStaticClass, node.ElementType, type.Type);
657
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);