6129 references to ErrorCode
Microsoft.CodeAnalysis.CSharp (6127)
Binder\Binder_AnonymousTypes.cs (4)
60diagnostics.Add(ErrorCode.ERR_InvalidAnonymousTypeMemberDeclarator, expression.GetLocation()); 77Error(diagnostics, ErrorCode.ERR_AnonymousTypeDuplicatePropertyName, fieldInitializer); 138Error(diagnostics, ErrorCode.ERR_AnonymousTypeNotAvailable, node.NewKeyword); 257Error(diagnostics, ErrorCode.ERR_AnonymousTypePropertyAssignedBadValue, errorSyntax, errorArg);
Binder\Binder_Attributes.cs (10)
254Error(diagnostics, ErrorCode.ERR_AttributeCtorInParameter, node, attributeConstructor.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 407Error(diagnostics, ErrorCode.ERR_BadAttributeParamType, syntax, parameter.Name, paramType.Type); 475diagnostics.Add(ErrorCode.ERR_NamedArgumentExpected, argument.Expression.GetLocation()); 503Error(diagnostics, ErrorCode.ERR_DuplicateNamedAttributeArgument, argument, argumentName); 670diagnostics.Add(ErrorCode.ERR_BadNamedAttributeArgument, 683diagnostics.Add(ErrorCode.ERR_BadNamedAttributeArgumentType, 741diagnostics.Add(ErrorCode.ERR_BadAttributeArgument, syntax.Location); 899Binder.Error(diagnostics, ErrorCode.ERR_BadAttributeArgument, node.Syntax); 970Binder.Error(diagnostics, ErrorCode.ERR_AttrArgWithTypeVars, node.Syntax, typeOfArgument.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 1054Binder.Error(diagnostics, ErrorCode.ERR_BadAttributeArgument, node.Syntax);
Binder\Binder_Await.cs (22)
165info = new CSDiagnosticInfo(ErrorCode.ERR_BadAwaitInStaticVariableInitializer); 183new CSDiagnosticInfo(ErrorCode.ERR_BadAwaitInQuery) : 184new CSDiagnosticInfo(ErrorCode.ERR_BadAwaitWithoutAsyncLambda, ((LambdaSymbol)method).MessageID.Localize()); 190info = new CSDiagnosticInfo(ErrorCode.ERR_BadAwaitWithoutVoidAsyncMethod); 201info = new CSDiagnosticInfo(ErrorCode.ERR_BadAwaitWithoutAsyncMethod, method.ReturnType); 209info = new CSDiagnosticInfo(ErrorCode.ERR_BadAwaitWithoutAsync); 226Error(diagnostics, ErrorCode.ERR_BadAwaitInFixed, awaitNodeOrToken); 231Error(diagnostics, ErrorCode.ERR_BadAwaitInLock, nodeOrToken.GetLocation()!); 236Error(diagnostics, ErrorCode.ERR_BadAwaitInCatchFilter, nodeOrToken.GetLocation()!); 247Error(diagnostics, ErrorCode.ERR_BadAwaitInFinally, nodeOrToken.GetLocation()!); 253Error(diagnostics, ErrorCode.ERR_BadAwaitInCatch, nodeOrToken.GetLocation()!); 573Error(diagnostics, ErrorCode.ERR_BadAwaitArgIntrinsic, node, expression.Display); 596Error(diagnostics, ErrorCode.ERR_BadAwaitArgVoidCall, node); 610Error(diagnostics, ErrorCode.ERR_BadAwaitArg, node, expression.Type); 623Error(diagnostics, ErrorCode.ERR_BadAwaitArg, node, expression.Type); 651Error(diagnostics, ErrorCode.ERR_NoSuchMember, node, awaiterType, WellKnownMemberNames.IsCompleted); 666Error(diagnostics, ErrorCode.ERR_PropertyLacksGet, node, isCompletedProperty); 673Error(diagnostics, ErrorCode.ERR_BadAwaiterPattern, node, awaiterType, awaitedExpressionType); 697Error(diagnostics, ErrorCode.ERR_DoesntImplementAwaitInterface, node, awaiterType, INotifyCompletion); 726Error(diagnostics, ErrorCode.ERR_NoSuchMember, node, awaiterType, WellKnownMemberNames.GetResult); 738Error(diagnostics, ErrorCode.ERR_NoSuchMember, node, awaiterType, WellKnownMemberNames.GetResult); 746Error(diagnostics, ErrorCode.ERR_BadAwaiterPattern, node, awaiterType, awaitedExpressionType);
Binder\Binder_Constraints.cs (24)
78diagnostics.Add(ErrorCode.ERR_DuplicateConstraintClause, clause.Name.Location, name); 90diagnostics.Add(ErrorCode.ERR_TyVarNotFoundInConstraint, clause.Name.Location, name, containingSymbol.ConstructedFrom()); 202diagnostics.Add(ErrorCode.ERR_NewBoundWithVal, syntax.GetFirstToken().GetLocation()); 206diagnostics.Add(ErrorCode.ERR_NewBoundWithUnmanaged, syntax.GetFirstToken().GetLocation()); 211diagnostics.Add(ErrorCode.ERR_NewBoundMustBeLast, syntax.GetFirstToken().GetLocation()); 221diagnostics.Add(ErrorCode.ERR_DefaultConstraintOverrideOnly, syntax.GetLocation()); 305diagnostics.Add(ErrorCode.ERR_AllowsClauseMustBeLast, syntax.GetFirstToken().GetLocation()); 316diagnostics.Add(ErrorCode.ERR_RefStructConstraintAlreadySpecified, allowsConstraint); 324Error(diagnostics, ErrorCode.ERR_RuntimeDoesNotSupportByRefLikeGenerics, allowsConstraint); 354diagnostics.Add(ErrorCode.ERR_OverrideWithConstraints, syntax.GetLocation()); 361diagnostics.Add(ErrorCode.ERR_TypeConstraintsMustBeUniqueAndFirst, syntax.GetLocation()); 456diagnostics.Add(ErrorCode.ERR_BadVisBound, location, containingSymbol, constraintType.Type); 472diagnostics.Add(ErrorCode.ERR_FileTypeDisallowedInSignature, location, constraintType.Type, containingSymbol); 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); 594Error(diagnostics, ErrorCode.ERR_DynamicTypeAsBound, syntax); 605Error(diagnostics, ErrorCode.ERR_ConstraintIsStaticClass, syntax, type); 614Error(diagnostics, ErrorCode.ERR_BadBoundType, syntax, type); 621Error(diagnostics, ErrorCode.ERR_BadConstraintType, syntax.GetLocation()); 634Error(diagnostics, ErrorCode.ERR_ConstructedDynamicTypeAsBound, syntax, type);
Binder\Binder_Conversions.cs (62)
337diagnostics.Add(ErrorCode.WRN_ConvertingLock, source.Syntax); 490Error(diagnostics, ErrorCode.ERR_RuntimeDoesNotSupportStaticAbstractMembersInInterfaces, syntax); 511Error(diagnostics, ErrorCode.ERR_RuntimeDoesNotSupportStaticAbstractMembersInInterfaces, syntax); 518Error(diagnostics, ErrorCode.ERR_RuntimeDoesNotSupportInlineArrayTypes, syntax); 540Error(diagnostics, ErrorCode.ERR_InlineArrayConversionToReadOnlySpanNotSupported, syntax, destination); 554Error(diagnostics, ErrorCode.ERR_InlineArrayConversionToSpanNotSupported, syntax, destination); 642ErrorCode.ERR_MissingPredefinedMember, 810Error(diagnostics, ErrorCode.ERR_BadTypeArgument, syntax, elementType); 814Error(diagnostics, ErrorCode.ERR_BadTypeArgument, syntax, inlineArrayType); 871Error(diagnostics, ErrorCode.ERR_ImplicitObjectCreationIllegalTargetType, syntax, type); 875Error(diagnostics, ErrorCode.ERR_UnsafeTypeInObjectCreation, syntax, type); 954_diagnostics.Add(ErrorCode.ERR_CollectionRefLikeElementType, _node.Syntax); 979? ErrorCode.WRN_CollectionExpressionRefStructSpreadMayAllocate 980: ErrorCode.WRN_CollectionExpressionRefStructMayAllocate, 1031_diagnostics.Add(ErrorCode.ERR_CollectionExpressionImmutableArray, syntax, _targetType.OriginalDefinition); 1040_diagnostics.Add(ErrorCode.ERR_ParamsCollectionInfiniteChainOfConstructorCalls, syntax, inProgress, inProgressConstructor.OriginalDefinition); 1056_diagnostics.Add(ErrorCode.ERR_CollectionInitializerInfiniteChainOfAddCalls, syntax, _targetType); 1237ErrorCode.ERR_CollectionArgumentsNotSupportedForType, 1253_diagnostics.Add(ErrorCode.ERR_CollectionArgumentsMustBeEmpty, _node.WithElement.Syntax.GetFirstToken().GetLocation()); 1516diagnostics.Add(ErrorCode.ERR_CollectionBuilderAttributeMethodNotFound, syntax, methodName ?? "", elementTypeOriginalDefinition, targetTypeOriginalDefinition); 1684diagnostics.Add(ErrorCode.ERR_NoNewAbstract, syntax.Location, namedType); 1789ErrorCode.ERR_ParamsCollectionConstructorDoesntInitializeRequiredMember, 2025diagnostics.Add(ErrorCode.ERR_CollectionExpressionMissingAdd, syntax, methodGroup.ReceiverOpt.Type); 2396ErrorCode.ERR_CollectionBuilderNoElementType : 2397ErrorCode.ERR_CollectionExpressionTargetNoElementType, 2437Error(diagnostics, ErrorCode.ERR_NoImplicitConv, spreadElement.Expression.Syntax, spreadElement.Expression.Display, elementType); 2465Error(diagnostics, ErrorCode.ERR_CollectionExpressionTargetTypeNotConstructible, node.Syntax, targetType); 2502ErrorCode.ERR_NoImplicitConvTargetTypedConditional, 2801diagnostics.Add(ErrorCode.ERR_NoNewAbstract, syntax.Location, instantiatedType); 2916Error(diagnostics, ErrorCode.WRN_MethGrpToNonDel, syntax, ((BoundMethodGroup)source).Name, destination); 3006ErrorCode.ERR_ScopedMismatchInParameterOfTarget : 3007ErrorCode.WRN_ScopedMismatchInParameterOfTarget, 3022diagnostics.Add(ErrorCode.WRN_TargetDifferentRefness, location, lambdaOrMethodParameter, delegateParameter); 3090Error(diagnostics, ErrorCode.WRN_OptionalParamValueMismatch, lambdaParameter.GetFirstLocation(), p + 1, lambdaParamDefault, delegateParamDefault ?? ((object)MessageID.IDS_Missing.Localize())); 3097Error(diagnostics, ErrorCode.WRN_ParamsArrayInLambdaOnly, lambdaParameter.GetFirstLocation(), p + 1); 3416diagnostics.Add(ErrorCode.ERR_QueryNoProvider, node.Location, receiverOpt.Type, memberSymbol.Name); 3421diagnostics.Add(ErrorCode.ERR_ObjectRequired, node.Location, memberSymbol); 3430diagnostics.Add(ErrorCode.ERR_InitializerAddHasWrongSignature, node.Location, memberSymbol); 3435diagnostics.Add(ErrorCode.ERR_BadAwaitArg, node.Location, receiverOpt.Type); 3439diagnostics.Add(ErrorCode.ERR_ObjectProhibited, node.Location, memberSymbol); 3446diagnostics.Add(ErrorCode.ERR_ObjectRequired, node.Location, memberSymbol); 3459ErrorCode code = InFieldInitializer ? ErrorCode.ERR_FieldInitRefNonstatic : ErrorCode.ERR_ObjectRequired; 3468Error(diagnostics, ErrorCode.ERR_ObjectRequired, node, memberSymbol); 3489Error(diagnostics, ErrorCode.ERR_BadAccess, node, memberSymbol); 3633Error(diagnostics, ErrorCode.ERR_BadRetType, errorLocation, method, method.ReturnType); 3642Error(diagnostics, ErrorCode.ERR_CannotUseReducedExtensionMethodInAddressOf, errorLocation); 3653Error(diagnostics, ErrorCode.ERR_FuncPtrMethMustBeStatic, errorLocation, method); 3688static ErrorCode getMethodMismatchErrorCode(TypeKind type) 3691TypeKind.Delegate => ErrorCode.ERR_MethDelegateMismatch, 3692TypeKind.FunctionPointer => ErrorCode.ERR_MethFuncPtrMismatch, 3696static ErrorCode getRefMismatchErrorCode(TypeKind type) 3699TypeKind.Delegate => ErrorCode.ERR_DelegateRefMismatch, 3700TypeKind.FunctionPointer => ErrorCode.ERR_FuncPtrRefMismatch, 3752Error(diagnostics, ErrorCode.ERR_DelegateOnConditional, syntax.Location, selectedMethod); 3760Error(diagnostics, ErrorCode.ERR_PartialMethodToDelegate, syntax.Location, selectedMethod); 3812diagnostics.Add(ErrorCode.ERR_MethDelegateMismatch, delegateMismatchLocation, boundMethodGroup.Name, delegateType); 3959Error(diagnostics, ErrorCode.ERR_ConstOutOfRange, syntax, sourceValue.Value + "M", destination!); 3967Error(diagnostics, ErrorCode.ERR_ConstOutOfRange, syntax, sourceValue.Value!, destination!); 3978Error(diagnostics, ErrorCode.WRN_ConstOutOfRangeChecked, syntax, sourceValue.Value!, destination!); 3983Error(diagnostics, ErrorCode.ERR_ConstOutOfRangeChecked, syntax, sourceValue.Value!, destination!);
Binder\Binder_Crefs.cs (13)
56diagnostics.Add(ErrorCode.WRN_BadXMLRef, syntax.Location, noTrivia.ToFullString()); 109diagnostics.Add(ErrorCode.WRN_BadXMLRef, crefSyntax.Location, noTrivia.ToFullString()); 141diagnostics.Add(ErrorCode.WRN_BadXMLRef, crefSyntax.Location, noTrivia.ToFullString()); 748diagnostics.Add(ErrorCode.WRN_UnqualifiedNestedTypeInCref, parameterListSyntax.Parameters[i].Location); 911diagnostics.Add(ErrorCode.WRN_BadXMLRefTypeVar, crefSyntax.Location, crefSyntax.ToString()); 917diagnostics.Add(ErrorCode.WRN_AmbiguousXMLReference, crefSyntax.Location, crefSyntax.ToString(), 928diagnostics.Add(ErrorCode.WRN_BadXMLRefTypeVar, crefSyntax.Location, crefSyntax.ToString()); 1075diagnostics.Add(ErrorCode.WRN_AmbiguousXMLReference, crefSyntax.Location, crefSyntax.ToString(), ambiguityWinner, viable[1]); 1191diagnostics.Add(ErrorCode.WRN_BadXMLRefReturnType, typeSyntax.Location); 1195diagnostics.Add(ErrorCode.WRN_BadXMLRefParamType, typeSyntax.Location, typeSyntax.ToString(), crefSyntax.ToString()); 1216switch ((ErrorCode)diag.Code) 1218case ErrorCode.ERR_DeprecatedSymbolStr: 1219case ErrorCode.ERR_DeprecatedCollectionInitAddStr:
Binder\Binder_Deconstruct.cs (18)
60Error(diagnostics, ErrorCode.ERR_DeclarationExpressionNotPermitted, declaration); 64Error(diagnostics, ErrorCode.ERR_DeclarationExpressionNotPermitted, declaration); 229Error(diagnostics, ErrorCode.ERR_DeconstructRequiresExpression, boundRHS.Syntax); 265Error(diagnostics, ErrorCode.ERR_DeconstructWrongCardinality, syntax, tupleOrDeconstructedTypes.Length, variables.Count); 273Error(diagnostics, ErrorCode.ERR_DeconstructTooFewElements, syntax); 416Error(diagnostics, ErrorCode.ERR_TypeInferenceFailedForImplicitlyTypedDeconstructionVariable, pending.Syntax, "_"); 498Error(diagnostics, ErrorCode.ERR_DeconstructRequiresExpression, element.Syntax); 516Error(diagnostics, ErrorCode.ERR_DeconstructRequiresExpression, element.Syntax); 626Error(diagnostics, ErrorCode.ERR_CannotDeconstructDynamic, rightSyntax); 722Error(diagnostics, ErrorCode.ERR_MissingDeconstruct, rightSyntax, receiver.Type, numParameters); 761Error(diagnostics, ErrorCode.ERR_DeconstructionVarFormDisallowsSpecificType, component.Designation); 784Error(diagnostics, ErrorCode.ERR_TupleElementNamesInDeconstruction, arg.NameColon); 827diagnostics.Add(ErrorCode.ERR_ScopedDiscard, scopedType.ScopedKeyword.GetLocation()); 833diagnostics.Add(ErrorCode.ERR_DeconstructVariableCannotBeByRef, refType.RefKeyword.GetLocation()); 893diagnostics.Add(ErrorCode.ERR_DeconstructVariableCannotBeByRef, refType.RefKeyword.GetLocation()); 904diagnostics.Add(ErrorCode.ERR_ScopedRefAndRefStructOnly, typeSyntax.Location); 937diagnostics.Add(ErrorCode.ERR_UnexpectedToken, scopedType.ScopedKeyword.GetLocation(), scopedType.ScopedKeyword.ValueText); 943diagnostics.Add(ErrorCode.ERR_UnexpectedToken, refType.RefKeyword.GetLocation(), refType.RefKeyword.ValueText);
Binder\Binder_Expressions.cs (218)
328diagnostics.Add(ErrorCode.ERR_SwitchExpressionNoBestType, exprSyntax.SwitchKeyword.GetLocation()); 351if (op.NoCommonTypeError == ErrorCode.ERR_InvalidQM && trueArg is Symbol trueSymbol && falseArg is Symbol falseSymbol) 390diagnostics.Add(ErrorCode.ERR_DefaultLiteralNoTargetType, defaultExpr.Syntax.GetLocation()); 413diagnostics.Add(ErrorCode.ERR_ImplicitObjectCreationNoTargetType, expr.Syntax.GetLocation(), expr.Display); 433diagnostics.Add(ErrorCode.ERR_CollectionExpressionNoTargetType, expr.Syntax.GetLocation()); 459diagnostics.Add(ErrorCode.ERR_CannotInferDelegateType, syntax.GetLocation()); 495diagnostics.Add(ErrorCode.WRN_CapturedPrimaryConstructorParameterInFieldInitializer, syntax.Location, parameter); 581Error(diagnostics, ErrorCode.ERR_IllegalArglist, node); 645return BindUnexpectedArrayInitializer((InitializerExpressionSyntax)node, diagnostics, ErrorCode.ERR_ArrayInitInBadPlace); 878diagnostics.Add(ErrorCode.ERR_InternalError, node.Location); 894diagnostics.Add(ErrorCode.ERR_UnexpectedToken, firstToken.GetLocation(), firstToken.ValueText); 903diagnostics.Add(ErrorCode.ERR_UnexpectedToken, firstToken.GetLocation(), firstToken.ValueText); 910diagnostics.Add(ErrorCode.ERR_UnexpectedToken, firstToken.GetLocation(), firstToken.ValueText); 921diagnostics.Add(ErrorCode.ERR_ThrowMisplaced, node.ThrowKeyword.GetLocation()); 974Error(diagnostics, ErrorCode.ERR_DeclarationExpressionNotPermitted, node); 1081diagnostics.Add(ErrorCode.ERR_VoidInTuple, argumentSyntax.Location); 1291Error(diagnostics, ErrorCode.ERR_MethodArgCantBeRefAny, node, argument.Type); 1361Error(diagnostics, ErrorCode.ERR_ArgsInvalid, node); 1375Error(diagnostics, ErrorCode.ERR_SpecialByRefInLambda, node, runtimeArgumentHandleType); 1424diagnostics.Add(ErrorCode.ERR_BadDynamicTypeof, node.Location); 1430diagnostics.Add(ErrorCode.ERR_BadNullableTypeof, node.Location); 1450diagnostics.Add(ErrorCode.ERR_AttrDependentTypeNotAllowed, attributeName, type); 1456diagnostics.Add(ErrorCode.ERR_AttrTypeArgCannotBeTypeVar, attributeName, type); 1487diagnostics.Add(ErrorCode.WRN_FieldIsAmbiguous, node, Compilation.LanguageVersion.ToDisplayString()); 1520diagnostics.Add(ErrorCode.ERR_NoSuchMember, node, ContainingMember(), "field"); 1575diagnostics.Add(ErrorCode.ERR_VariableDeclarationNamedField, syntax, requiredVersion.ToDisplayString()); 1608diagnostics.Add(ErrorCode.ERR_ManagedAddr, location, type); 1612diagnostics.Add(ErrorCode.WRN_ManagedAddr, location, type); 1753diagnostics.Add(ErrorCode.WRN_PrimaryConstructorParameterIsShadowedAndNotPassedToBase, node.Location, shadowedParameter); 1784Error(diagnostics, ErrorCode.ERR_QueryOuterKey, node, name); 1788Error(diagnostics, ErrorCode.ERR_QueryInnerKey, node, name); 1792Error(diagnostics, ErrorCode.ERR_NameNotInContext, node, name); 2093Error(diagnostics, ErrorCode.ERR_InvalidPrimaryConstructorParameterReference, node, parameter); 2105Error(diagnostics, ErrorCode.ERR_ExtensionParameterInStaticContext, node, parameter.Name); 2110Error(diagnostics, ErrorCode.ERR_InvalidExtensionParameterReference, node, parameter); 2127Error(diagnostics, ErrorCode.ERR_AnonDelegateCantUse, node, parameter.Name); 2131Error(diagnostics, ErrorCode.ERR_SpecialByRefInLambda, node, parameter.Type); 2136Error(diagnostics, ErrorCode.ERR_AnonDelegateCantUseRefLike, node, parameter.Name); 2150Error(diagnostics, ErrorCode.ERR_UnsupportedPrimaryConstructorParameterCapturingRef, node, parameter.Name); 2154Error(diagnostics, ErrorCode.ERR_UnsupportedPrimaryConstructorParameterCapturingRefAny, node, parameter.Type); 2159Error(diagnostics, ErrorCode.ERR_UnsupportedPrimaryConstructorParameterCapturingRefLike, node, parameter.Name); 2171Error(diagnostics, ErrorCode.ERR_AnonDelegateCantUseStructPrimaryConstructorParameterInMember, node); 2175Error(diagnostics, ErrorCode.ERR_AnonDelegateCantUseStructPrimaryConstructorParameterCaptured, node); 2296Error(diagnostics, ErrorCode.ERR_VariableUsedBeforeDeclarationAndHidesField, node, node, possibleField); 2300Error(diagnostics, ErrorCode.ERR_VariableUsedBeforeDeclaration, node, node); 2317Error(diagnostics, ErrorCode.ERR_SpecialByRefInLambda, node, type); 2321Error(diagnostics, ErrorCode.ERR_AnonDelegateCantUseLocal, node, localSymbol); 2357Error(diagnostics, ErrorCode.ERR_SimpleProgramLocalIsReferencedOutsideOfTopLevelStatement, node, node); 2395diagnosticInfoOpt = new CSDiagnosticInfo(ErrorCode.ERR_FieldInitRefNonstatic, member); 2400diagnosticInfoOpt = new CSDiagnosticInfo(ErrorCode.ERR_ObjectRequired, member); 2412diagnosticInfoOpt = new CSDiagnosticInfo(ErrorCode.ERR_ObjectRequired, member); 2530Error(diagnostics, ErrorCode.ERR_LabelNotFound, node, labelName); 2586Error(diagnostics, inStaticContext ? ErrorCode.ERR_ThisInStaticMeth : ErrorCode.ERR_ThisInBadContext, node); 2623return new CSDiagnosticInfo(ErrorCode.ERR_ThisStructNotInAnonMeth); 2639Error(diagnostics, inStaticContext ? ErrorCode.ERR_BaseInStaticMeth : ErrorCode.ERR_BaseInBadContext, node.Token); 2644Error(diagnostics, ErrorCode.ERR_NoBaseClass, node); 2649Error(diagnostics, ErrorCode.ERR_BaseIllegal, node.Token); 2700Error(diagnostics, ErrorCode.ERR_ValConstraintNotSatisfied, node, nullableType, nullableType.TypeParameters.Single(), indexType); 2780Error(diagnostics, ErrorCode.ERR_ValConstraintNotSatisfied, node, nullableType, nullableType.TypeParameters.Single(), rangeType); 2807Error(diagnostics, ErrorCode.ERR_ValConstraintNotSatisfied, operand, nullableType, nullableType.TypeParameters.Single(), indexType); 2868diagnostics.Add(ErrorCode.ERR_ConvertToStaticClass, syntax.Location, targetType); 2874diagnostics.Add(ErrorCode.ERR_ValueCantBeNull, syntax.Location, targetType); 2885diagnostics.Add(ErrorCode.ERR_AmbigUDConv, syntax.Location, originalUserDefinedConversions[0], originalUserDefinedConversions[1], operand.Display, targetType); 2892diagnostics.Add(ErrorCode.ERR_NoExplicitConv, syntax.Location, distinguisher1.First, distinguisher1.Second); 2905diagnostics.Add(ErrorCode.ERR_NoExplicitConv, syntax.Location, MessageID.IDS_SK_METHOD.Localize(), targetType); 2927Error(diagnostics, ErrorCode.ERR_ConversionNotTupleCompatible, syntax, tuple.Arguments.Length, targetType); 2937Error(diagnostics, ErrorCode.ERR_StackAllocConversionNotPossible, syntax, stackAllocExpression.ElementType, targetType); 2953var errorCode = targetType.TypeKind switch 2955TypeKind.FunctionPointer => ErrorCode.ERR_MethFuncPtrMismatch, 2956TypeKind.Delegate => ErrorCode.ERR_CannotConvertAddressOfToDelegate, 2957_ => ErrorCode.ERR_AddressOfToNonFunctionPointer 2967diagnostics.Add(ErrorCode.ERR_NoExplicitConv, syntax.Location, distinguisher.First, distinguisher.Second); 3242diagnostics.Add(ErrorCode.ERR_ScopedDiscard, scopedType.ScopedKeyword.GetLocation()); 3248diagnostics.Add(ErrorCode.ERR_OutVariableCannotBeByRef, refType.Location); 3292diagnostics.Add(ErrorCode.ERR_OutVariableCannotBeByRef, refType.Location); 3317diagnostics.Add(ErrorCode.ERR_ScopedRefAndRefStructOnly, typeSyntax.Location); 3337diagnostics.Add(ErrorCode.ERR_UnexpectedToken, scopedType.ScopedKeyword.GetLocation(), scopedType.ScopedKeyword.ValueText); 3343diagnostics.Add(ErrorCode.ERR_UnexpectedToken, refType.RefKeyword.GetLocation(), refType.RefKeyword.ValueText); 3463Error(diagnostics, ErrorCode.ERR_NamedArgumentSpecificationBeforeFixedArgument, argumentSyntax, 3782diagnostics.Add(ErrorCode.ERR_InterpolatedStringHandlerArgumentAttributeMalformed, unconvertedString.Syntax.Location, correspondingParameter, handlerType); 3891ErrorCode.ERR_InterpolatedStringHandlerArgumentOptionalNotSpecified, 3910ErrorCode.ERR_InterpolatedStringHandlerArgumentLocatedAfterInterpolatedString, 4011ErrorCode.WRN_BadArgRef, 4023ErrorCode.WRN_RefReadonlyNotVariable, 4034ErrorCode.WRN_ArgExpectedRefOrIn, 4042ErrorCode.WRN_ArgExpectedIn, 4148Error(diagnostics, ErrorCode.ERR_MissingArraySize, firstRankSpecifier); 4163Error(diagnostics, ErrorCode.ERR_InvalidArray, arg); 4189Error(diagnostics, ErrorCode.ERR_NegativeArraySize, dimension); 4219Error(diagnostics, ErrorCode.ERR_ImplicitlyTypedArrayNoBestType, node); 4226Error(diagnostics, ErrorCode.ERR_ArrayElementCantBeRefAny, node, bestType); 4246Error(diagnostics, ErrorCode.ERR_ImplicitlyTypedArrayNoBestType, node); 4321Error(diagnostics, ErrorCode.ERR_ArrayInitializerExpected, expression); 4424Error(diagnostics, ErrorCode.ERR_ArrayInitializerIncorrectLength, node, knownSizeOpt.Value); 4458ErrorCode errorCode, 4538Error(diagnostics, ErrorCode.ERR_ConstantExpected, size.Syntax); 4572Error(diagnostics, ErrorCode.ERR_BadIndexCount, nonNullSyntax, type.Rank); 4592Error(diagnostics, ErrorCode.ERR_BadStackAllocExpr, typeSyntax); 4619Error(diagnostics, ErrorCode.ERR_BadStackAllocExpr, typeSyntax); 4649Error(diagnostics, ErrorCode.ERR_NegativeStackAllocSize, countSyntax); 4655Error(diagnostics, ErrorCode.ERR_MissingArraySize, rankSpecifiers[0]); 4684Error(diagnostics, ErrorCode.ERR_StackallocInCatchFinally, node); 4787Error(diagnostics, ErrorCode.ERR_ConstantExpected, sizeOpt.Syntax); 4792Error(diagnostics, ErrorCode.ERR_ArrayInitializerIncorrectLength, node, constantSizeOpt.Value); 4976diagnostics.Add(ErrorCode.ERR_ObjectCallingBaseConstructor, constructor.GetFirstLocation(), containingType); 4987diagnostics.Add(ErrorCode.ERR_StructWithBaseConstructorCall, constructor.GetFirstLocation(), containingType); 5029diagnostics.Add(ErrorCode.ERR_NoDynamicPhantomOnBaseCtor, errorLocation); 5106diagnostics.Add(ErrorCode.ERR_RecursiveConstructorCall, 5156diagnostics.Add(ErrorCode.WRN_CapturedPrimaryConstructorParameterPassedToBase, syntax.Location, parameter); 5175diagnostics.Add(ErrorCode.ERR_ChainingToSetsRequiredMembersRequiresSetsRequiredMembers, errorLocation); 5222diagnostics.Add(ErrorCode.ERR_CopyConstructorMustInvokeBaseCopyConstructor, errorLocation); 5231diagnostics.Add(ErrorCode.ERR_CopyConstructorMustInvokeBaseCopyConstructor, errorLocation); 5306diagnostics.Add(ErrorCode.ERR_AnnotationDisallowedInObjectCreation, node.Location); 5329diagnostics.Add(ErrorCode.ERR_UnsafeTypeInObjectCreation, node.Location, type)); 5339diagnostics.Add(ErrorCode.ERR_InvalidObjectCreation, node.Type.Location)); 5355diagnostics.Add(ErrorCode.ERR_InsufficientStack, syntax.Location); 5399Error(diagnostics, ErrorCode.ERR_BadSpreadInCatchFilter, syntax); 5481diagnostics.Add(ErrorCode.ERR_CollectionArgumentsDynamicBinding, arg.Syntax); 5508diagnostics.Add(ErrorCode.ERR_CollectionArgumentsMustBeFirst, withElementSyntax.WithKeyword); 5540diagnostics.Add(ErrorCode.ERR_BadCtorArgCount, node.Location, type, 0); 5553diagnostics.Add(ErrorCode.ERR_MethodNameExpected, loc); 5559Error(diagnostics, ErrorCode.ERR_ObjectOrCollectionInitializerWithDelegateCreation, node); 5629diagnostics.Add(ErrorCode.ERR_MethodNameExpected, argument.Syntax.Location); 5664diagnostics.Add(ErrorCode.ERR_MethDelegateMismatch, node.Location, 5690diagnostics.Add(ErrorCode.ERR_MethodNameExpected, argument.Syntax.Location); 5711diagnostics.Add(ErrorCode.ERR_InstantiatingStaticClass, node.Location, type); 5716diagnostics.Add(ErrorCode.ERR_NewWithTupleTypeSyntax, node.Type.GetLocation()); 5749diagnostics.Add(ErrorCode.ERR_InstantiatingStaticClass, node.Location, type); 5931Error(diagnostics, ErrorCode.ERR_InvalidInitializerElementInitializer, memberInitializer); 5957Error(diagnostics, ErrorCode.ERR_InvalidInitializerElementInitializer, memberInitializer); 6095Error(diagnostics, ErrorCode.ERR_ReadonlyValueTypeInObjectInitializer, leftSyntax, fieldSymbol, fieldSymbol.Type); 6136diagnostics.Add(ErrorCode.ERR_InterpolatedStringsReferencingInstanceCannotBeInObjectInitializers, argument.Syntax.Location); 6217Error(diagnostics, ErrorCode.ERR_ValueTypePropertyInObjectInitializer, memberNameSyntax, propertySymbol, propertySymbol.Type); 6252Error(diagnostics, ErrorCode.ERR_NoSuchMember, memberNameSyntax, implicitReceiver.Type, member); 6261Error(diagnostics, ErrorCode.ERR_MemberCannotBeInitialized, memberNameSyntax, member); 6291Error(diagnostics, ErrorCode.ERR_MemberAlreadyInitialized, memberNameSyntax, memberName); 6368diagnostics.Add(ErrorCode.ERR_RequiredMembersMustBeAssignedValue, initializerExpression.Syntax.Location, requiredMember); 6394diagnostics.Add(ErrorCode.ERR_RequiredMemberMustBeSet, location, member); 6429Error(diagnostics, ErrorCode.ERR_CollectionInitRequiresIEnumerable, initializerSyntax, initializerType); 6517Error(diagnostics, ErrorCode.ERR_InvalidInitializerElementInitializer, elementInitializer); 6562Error(diagnostics, ErrorCode.ERR_EmptyElementInitializer, elementInitializer); 6716if (!((ErrorCode)diagnostic.Code is ErrorCode.WRN_ArgExpectedRefOrIn or ErrorCode.WRN_ArgExpectedIn)) 6857diagnostics.Add(ErrorCode.ERR_NoNewAbstract, node.Location, type); 7122diagnostics.Add(ErrorCode.ERR_NoNewAbstract, node.Location, type); 7136Error(diagnostics, ErrorCode.ERR_MissingCoClass, node, coClassType, interfaceType); 7154Error(diagnostics, ErrorCode.ERR_BadCoClassSig, node, coClassType, interfaceType); 7180Error(diagnostics, ErrorCode.ERR_NoExplicitConv, node, distinguisher.First, distinguisher.Second); 7234diagnostics.Add(ErrorCode.ERR_BadCtorArgCount, typeNode.Location, interfaceType, analyzedArguments.Arguments.Count); 7263diagnostics.Add(ErrorCode.ERR_NoNewTyvar, node.Location, typeParameter); 7278diagnostics.Add(ErrorCode.ERR_NewTyvarWithArgs, node.Location, typeParameter); 7441diagnostics.Add(ErrorCode.ERR_BadAccess, errorLocation, result.ValidResult.Member); 7466if ((ErrorCode)diagnostic.Code == ErrorCode.ERR_RequiredMembersInvalid) 7552diagnostics.Add(new CSDiagnosticInfo(ErrorCode.WRN_LowercaseEllSuffix), Location.Create(node.SyntaxTree, new TextSpan(token.Span.End - 1, 1))); 7556diagnostics.Add(new CSDiagnosticInfo(ErrorCode.WRN_LowercaseEllSuffix), Location.Create(node.SyntaxTree, new TextSpan(token.Span.End - 2, 1))); 7625Error(diagnostics, ErrorCode.ERR_IllegalUnsafe, node.Keyword); 7850Error(diagnostics, ErrorCode.ERR_TypeArgsNotAllowed, right, right.Identifier.Text, SymbolKind.Property.Localize()); 7862Error(diagnostics, ErrorCode.ERR_BadTypeArgument, typeArgumentsSyntax[i], typeArgument.Type); 7870Error(diagnostics, ErrorCode.ERR_OmittedTypeArgument, node); 7934diagnostics.Add(ErrorCode.ERR_BadUnaryOp, operatorToken.GetLocation(), SyntaxFacts.GetText(operatorToken.Kind()), leftType); 7941DiagnosticInfo diagnosticInfo = new CSDiagnosticInfo(ErrorCode.ERR_BadOpOnNullOrDefaultOrNew, SyntaxFacts.GetText(operatorToken.Kind()), boundLeft.Display); 7951diagnostics.Add(ErrorCode.ERR_BadUnaryOp, node.Location, SyntaxFacts.GetText(operatorToken.Kind()), msgId.Localize()); 8027Error(diagnostics, ErrorCode.ERR_BadUnaryOp, node, operatorToken.Text, boundLeft.Display); 8156Error(diagnostics, ErrorCode.ERR_LookupInTypeVariable, boundLeft.Syntax, leftType); 8200Error(diagnostics, ErrorCode.WRN_DotOnDefault, node, boundLeft.Type); 8228Error(diagnostics, ErrorCode.ERR_BadSKunknown, methodGroup.NameSyntax, method, MessageID.IDS_SK_METHOD.Localize()); 8404Error(diagnostics, ErrorCode.ERR_OmittedTypeArgument, node); 8464Error(diagnostics, ErrorCode.ERR_NoSuchMember, name, boundLeft.Display, plainName); 8471Error(diagnostics, ErrorCode.ERR_NoSuchMember, name, boundLeft.Type, plainName); 8475Error(diagnostics, ErrorCode.ERR_NoSuchMemberOrExtensionNeedUsing, name, boundLeft.Type, plainName, "System"); 8479Error(diagnostics, ErrorCode.ERR_NoAwaitOnAsyncEnumerable, name, boundLeft.Type, plainName); 8483Error(diagnostics, ErrorCode.ERR_NoSuchMemberOrExtension, name, boundLeft.Type, plainName); 8708Error(diagnostics, ErrorCode.ERR_BadTypeReference, right, plainName, symbol); 9025errorInfo = new CSDiagnosticInfo(ErrorCode.ERR_ExtensionResolutionFailed, left.Type, memberName); 9816Error(diagnostics, ErrorCode.ERR_BindToBogus, node, fieldSymbol); 9856Error(diagnostics, isFixedStatementExpression ? ErrorCode.ERR_FixedNotNeeded : ErrorCode.ERR_FixedBufferNotFixed, node); 9901diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportRefFields, node.Location); 10022Error(diagnostics, ErrorCode.ERR_BadAbstractStaticMemberAccess, node); 10028Error(diagnostics, ErrorCode.ERR_RuntimeDoesNotSupportStaticAbstractMembersInInterfaces, node); 10036Error(diagnostics, ErrorCode.ERR_BadNonVirtualInterfaceMemberAccessOnAllowsRefLike, node); 10042Error(diagnostics, ErrorCode.ERR_RuntimeDoesNotSupportDefaultInterfaceImplementation, node); 10052Error(diagnostics, ErrorCode.ERR_RuntimeDoesNotSupportProtectedAccessForInterfaceMember, node); 10137ErrorCode errorCode = IsObjectInitializerMemberTarget(node) ? 10138ErrorCode.ERR_StaticMemberInObjectInitializer : 10139ErrorCode.ERR_ObjectProhibited; 10154Error(diagnostics, ErrorCode.ERR_ObjectRequired, node, symbol); 10386{ Code: (int)ErrorCode.ERR_BadIndexLHS, Arguments: [TypeSymbol type] } && type.Equals(expr.Type, TypeCompareKind.ConsiderEverything)) 10389Error(diagnosticsForBindElementAccessCore, ErrorCode.ERR_InlineArrayBadIndex, node.Location); 10441Error(diagnostics, ErrorCode.ERR_NamedArgumentForInlineArray, node); 10478Error(diagnostics, ErrorCode.ERR_RefReturnLvalueExpected, location); 10517Error(diagnostics, ErrorCode.ERR_RuntimeDoesNotSupportInlineArrayTypes, node); 10544Error(diagnostics, ErrorCode.ERR_InlineArrayIndexOutOfRange, location); 10597diagnostics.Add(errorOpt ?? new CSDiagnosticInfo(ErrorCode.ERR_BadIndexLHS, expr.Display), node.Location); 10654Error(diagnostics, ErrorCode.ERR_NamedArgumentForArray, node); 10669Error(diagnostics, ErrorCode.ERR_BadIndexCount, node, rank); 10691Error(diagnostics, ErrorCode.WRN_NegativeArrayIndex, index.Syntax); 10863Error(diagnostics, ErrorCode.ERR_NamedArgumentForArray, node); 10878Error(diagnostics, ErrorCode.ERR_PtrIndexSingle, node); 10886Error(diagnostics, ErrorCode.ERR_VoidError, expr.Syntax); 10904Error(diagnostics, ErrorCode.ERR_BadArgExtraRef, analyzedArguments.Argument(i).Syntax, i + 1, refKind.ToArgumentDisplayString()); 11029mustHaveAllOptionalParameters ? ErrorCode.ERR_IndexedPropertyMustHaveAllOptionalParams : ErrorCode.ERR_IndexedPropertyRequiresParams, 11076Error(diagnostics, ErrorCode.ERR_NoDynamicPhantomOnBaseIndexer, syntax); 11326? ErrorCode.ERR_ImplicitIndexIndexerWithName 11327: ErrorCode.ERR_ImplicitRangeIndexerWithName, 12317diagnostics.Add(new CSDiagnosticInfo(ErrorCode.ERR_InvalidDelegateType, possibleDelegateType), getErrorLocation()); 12330if (diagnosticInfo.Code == (int)ErrorCode.ERR_InvalidDelegateType) 12332diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_InvalidDelegateType, possibleDelegateType), getErrorLocation())); 12455DiagnosticInfo diagnosticInfo = new CSDiagnosticInfo(ErrorCode.ERR_CannotBeMadeNullable, access.Display); 12534DiagnosticInfo diagnosticInfo = new CSDiagnosticInfo(ErrorCode.ERR_BadUnaryOp, SyntaxFacts.GetText(operatorToken.Kind()), msgId.Localize()); 12544Error(diagnostics, ErrorCode.ERR_BadUnaryOp, operatorToken.GetLocation(), operatorToken.Text, receiver.Display); 12551Error(diagnostics, ErrorCode.ERR_BadUnaryOp, operatorToken.GetLocation(), operatorToken.Text, receiverType); 12558Error(diagnostics, ErrorCode.ERR_BadUnaryOp, operatorToken.GetLocation(), operatorToken.Text, receiverType);
Binder\Binder_Initializers.cs (1)
278Error(diagnostics, ErrorCode.ERR_SemicolonExpected, ((ExpressionStatementSyntax)labeledStatementBody.Syntax).SemicolonToken);
Binder\Binder_InterpolatedString.cs (18)
35ErrorCode.ERR_AltInterpolatedVerbatimStringsNotAvailable, 83ErrorCode.ERR_NewlinesAreNotAllowedInsideANonVerbatimInterpolatedString, 112diagnostics.Add(ErrorCode.WRN_AlignmentMagnitude, alignment.Syntax.Location, alignmentConstant.Int32Value, magnitudeLimit); 117diagnostics.Add(ErrorCode.ERR_ConstantExpected, interpolation.AlignmentClause.Value.Location); 128diagnostics.Add(ErrorCode.ERR_EmptyFormatSpecifier, interpolation.FormatClause.Location); 133diagnostics.Add(ErrorCode.ERR_TrailingWhitespaceInFormatSpecifier, interpolation.FormatClause.Location); 763var nonOutConstructorHasArityError = nonOutConstructorDiagnostics.DiagnosticBag?.AsEnumerableWithoutResolution().Any(d => (ErrorCode)d.Code == ErrorCode.ERR_BadCtorArgCount) ?? false; 764var outConstructorHasArityError = outConstructorDiagnostics.DiagnosticBag?.AsEnumerableWithoutResolution().Any(d => (ErrorCode)d.Code == ErrorCode.ERR_BadCtorArgCount) ?? false; 804diagnostics.Add(ErrorCode.ERR_InterpolatedStringHandlerCreationCannotUseDynamic, syntax.Location, interpolatedStringHandlerType.Name); 836if (!((ErrorCode)diagnostic.Code is ErrorCode.WRN_BadArgRef 837or ErrorCode.WRN_RefReadonlyNotVariable 838or ErrorCode.WRN_ArgExpectedRefOrIn 839or ErrorCode.WRN_ArgExpectedIn)) 989diagnostics.Add(ErrorCode.ERR_InterpolatedStringHandlerMethodReturnMalformed, part.Syntax.Location, method); 999diagnostics.Add(ErrorCode.ERR_InterpolatedStringHandlerMethodReturnInconsistent, part.Syntax.Location, method, expected);
Binder\Binder_Invocation.cs (37)
172ErrorCode.ERR_BadSKknown, 272diagnostics.Add(ErrorCode.ERR_UnsupportedFeatureInRuntimeAsync, node, ContainingMemberOrLambda); 298Error(diagnostics, ErrorCode.ERR_CantUseVoidInArglist, argument.Syntax); 313Error(diagnostics, ErrorCode.ERR_CantUseInOrOutInArglist, argument.Syntax); 387diagnostics.Add(new CSDiagnosticInfo(ErrorCode.ERR_MethodNameExpected), expression.Location); 422Error(diagnostics, ErrorCode.ERR_NoDynamicPhantomOnBase, node, methodGroup.Name); 526Error(diagnostics, ErrorCode.ERR_NamedArgumentSpecificationBeforeFixedArgumentInDynamicInvocation, arguments.Arguments[i].Syntax); 566Error(diagnostics, ErrorCode.ERR_CannotDynamicInvokeOnExpression, receiver.Syntax, receiver.Type); 576Error(diagnostics, ErrorCode.ERR_InDynamicMethodArg, arguments[argIndex].Syntax); 589Error(diagnostics, ErrorCode.ERR_BadDynamicQuery, node); 597Error(diagnostics, ErrorCode.ERR_BadDynamicMethodArgLambda, arg.Syntax); 603Error(diagnostics, ErrorCode.ERR_BadDynamicMethodArgMemgrp, arg.Syntax); 611Error(diagnostics, ErrorCode.ERR_BadDynamicMethodArg, arg.Syntax, "__arglist"); 620Error(diagnostics, ErrorCode.ERR_BadDynamicMethodArg, arg.Syntax, arg.Type); 693ErrorCode.ERR_DynamicDispatchToParamsCollection, 883Error(diagnostics, ErrorCode.ERR_BadArgTypeDynamicExtension, syntax, methodGroup.ReceiverOpt.Type, methodGroup.Name); 916Error(diagnostics, ErrorCode.WRN_DynamicDispatchToConditionalMethod, syntax, methodGroup.Name); 974ErrorCode.ERR_DynamicLocalFunctionTypeParameter, 989ErrorCode.ERR_DynamicLocalFunctionParamsParameter, 1118Error(diagnostics, ErrorCode.ERR_NoImplicitConv, call.ReceiverOpt.Syntax, distinguisher.First, distinguisher.Second); 1124Error(diagnostics, ErrorCode.ERR_NoImplicitConv, call.ReceiverOpt.Syntax, distinguisher.First, distinguisher.Second); 1138Error(diagnostics, ErrorCode.ERR_BadDynamicMethodArg, dynInvoke.Expression.Syntax, dynInvoke.Expression.Type); 1368ErrorCode code = hasBaseReceiver 1369? ErrorCode.ERR_CallingBaseFinalizeDeprecated 1370: ErrorCode.ERR_CallingFinalizeDeprecated; 1486diagnostics.Add(ErrorCode.ERR_BadAttributeParamDefaultArgument, syntax.Location, parameter.Name); 1715diagnostics.Add(ErrorCode.ERR_BadAttributeArgument, syntax.Location); 1779diagnostics.Add(ErrorCode.ERR_NotNullRefDefaultParameter, syntax.Location, parameter.Name, parameterType); 1957Error(diagnostics, ErrorCode.WRN_ImplicitCopyInReadOnlyMember, receiver.Syntax, method, ThisParameterSymbol.SymbolName); 2011diagnostics.Add(ErrorCode.WRN_PrimaryConstructorParameterIsShadowedAndNotPassedToBase, identifier.Location, shadowedParameter); 2427diagnostics.Add(ErrorCode.ERR_NameofMethodGroupWithTypeParameters, argument.Location); 2450diagnostics.Add(ErrorCode.ERR_NameofExtensionMember, boundArgument.Syntax); 2485diagnostics.Add(ErrorCode.ERR_NameofExtensionMethod, methodGroup.Syntax.Location); 2532diagnostics.Add(ErrorCode.ERR_AliasQualifiedNameNotAnExpression, argument.Location); 2546var code = top ? ErrorCode.ERR_ExpressionHasNoName : ErrorCode.ERR_SubexpressionNotInNameof;
Binder\Binder_Lambda.cs (10)
166Error(diagnostics, ErrorCode.ERR_DefaultValueNotAllowed, p.Default.EqualsToken); 176Error(diagnostics, ErrorCode.ERR_IllegalVarArgs, p); 285Error(diagnostics, syntax.Kind() == SyntaxKind.SimpleLambdaExpression ? ErrorCode.ERR_AttributesRequireParenthesizedLambdaExpression : ErrorCode.ERR_AttributesNotAllowed, attributeList); 300diagnostics.Add(ErrorCode.ERR_LambdaExplicitReturnTypeVar, syntax.Location); 312diagnostics.Add(ErrorCode.ERR_MethodReturnCantBeRefAny, syntax.Location, type); 342diagnostics.Add(ErrorCode.ERR_InconsistentLambdaParameterUsage, 350diagnostics.Add(ErrorCode.ERR_ImplicitlyTypedDefaultParameter, 410diagnostics.Add(ErrorCode.ERR_DuplicateParamName, lambda.ParameterLocation(i), name); 453diagnostics.Add(ErrorCode.INF_TooManyBoundLambdas, GetAnonymousFunctionLocation(pair.Key), truncatedToHundreds);
Binder\Binder_Lookup.cs (20)
406CSDiagnosticInfo diagInfo = new CSDiagnosticInfo(ErrorCode.ERR_ConflictingAliasAndDefinition, name, existingDefinition.GetKindText()); 784diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_AbstractAttributeClass, symbol) : null; 815diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_NotAnAttributeClass, symbol) : null; 941var diagInfo = new CSDiagnosticInfo(ErrorCode.ERR_CircularBase, type, other); 1533diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_CantCallSpecialMethod, unwrappedSymbol) : null; 1548diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_BadAccess, new[] { unwrappedSymbol }, unwrappedSymbols, additionalLocations: ImmutableArray<Location>.Empty) : null; 1564diagInfo = new CSDiagnosticInfo(ErrorCode.ERR_BadProtectedAccess, unwrappedSymbol, accessThroughType, this.ContainingType); 1568diagInfo = new CSDiagnosticInfo(ErrorCode.ERR_FriendRefNotEqualToThis, unwrappedSymbol.ContainingAssembly.Identity.ToString(), AssemblyIdentity.PublicKeyToString(this.Compilation.Assembly.PublicKey)); 1572diagInfo = new CSDiagnosticInfo(ErrorCode.ERR_BadAccess, new[] { unwrappedSymbol }, ImmutableArray.Create<Symbol>(unwrappedSymbol), additionalLocations: ImmutableArray<Location>.Empty); 1584diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_ObjectRequired, unwrappedSymbol) : null; 1589diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_ObjectProhibited, unwrappedSymbol) : null; 1594diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_BadSKunknown, unwrappedSymbol, unwrappedSymbol.GetKindText()) : null; 1599diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_LabelNotFound, unwrappedSymbol.Name) : null; 1674new CSDiagnosticInfo(ErrorCode.ERR_BindToBogusProp2, symbol, method1, method2) : 1675new CSDiagnosticInfo(ErrorCode.ERR_BindToBogusProp1, symbol, method1 ?? method2); 1886diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_HasNoTypeVars, namedType, MessageID.IDS_SK_TYPE.Localize()) : null; 1891diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_BadArity, namedType, MessageID.IDS_SK_TYPE.Localize(), namedType.Arity) : null; 1907diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_HasNoTypeVars, method, MessageID.IDS_SK_METHOD.Localize()) : null; 1912diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_BadArity, method, MessageID.IDS_SK_METHOD.Localize(), method.Arity) : null; 1922diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_TypeArgsNotAllowed, symbol, symbol.Kind.Localize()) : null;
Binder\Binder_NameConflicts.cs (5)
74diagnostics.Add(ErrorCode.ERR_LocalSameNameAsExtensionTypeParameter, GetLocation(p), name); 79diagnostics.Add(ErrorCode.ERR_TypeParameterSameNameAsExtensionParameter, tp.GetFirstLocationOrNone(), name); 84diagnostics.Add(ErrorCode.ERR_LocalSameNameAsTypeParam, GetLocation(p), name); 92diagnostics.Add(ErrorCode.ERR_LocalSameNameAsExtensionParameter, GetLocation(p), name); 97diagnostics.Add(ErrorCode.ERR_DuplicateParamName, GetLocation(p), name);
Binder\Binder_Operators.cs (83)
101Error(diagnostics, ErrorCode.ERR_BadBinaryOps, node, node.OperatorToken.Text, left.Display, right.Display); 306Error(diagnostics, ErrorCode.ERR_VoidError, node); 727Error(diagnostics, ErrorCode.ERR_MissingPredefinedMember, node, delegateType, SourceEventSymbol.GetAccessorName(eventSymbol.Name, isAddition)); 737Error(diagnostics, ErrorCode.ERR_BadAccess, node, method); 817Error(diagnostics, ErrorCode.ERR_BadBinaryOps, node, node.OperatorToken.Text, left.Display, right.Display); 832Error(diagnostics, ErrorCode.ERR_InvalidDynamicCondition, node.Left, left.Type, kind == BinaryOperatorKind.LogicalAnd ? "false" : "true"); 910Error(diagnostics, ErrorCode.ERR_PossibleBadNegCast, node); 917Error(diagnostics, ErrorCode.ERR_PossibleBadNegCast, node); 1045Error(diagnostics, ErrorCode.WRN_DoNotCompareFunctionPointers, node.OperatorToken); 1053Error(diagnostics, ErrorCode.ERR_VoidError, node); 1098if ((ErrorCode)code is not ErrorCode.WRN_ConvertingLock) 1297ErrorCode errorCode = resultKind == LookupResultKind.Ambiguous ? 1298ErrorCode.ERR_AmbigUnaryOp : // Operator '{0}' is ambiguous on an operand of type '{1}' 1299ErrorCode.ERR_BadUnaryOp; // Operator '{0}' cannot be applied to operand of type '{1}' 1338Error(diagnostics, ErrorCode.ERR_BadOpOnNullOrDefaultOrNew, node, operatorToken.Text, "default"); 1341Error(diagnostics, ErrorCode.ERR_AmbigBinaryOpsOnDefault, node, operatorToken.Text, left.Display, right.Display); 1345Error(diagnostics, ErrorCode.ERR_AmbigBinaryOpsOnUnconstrainedDefault, node, operatorToken.Text, right.Type); 1349Error(diagnostics, ErrorCode.ERR_AmbigBinaryOpsOnUnconstrainedDefault, node, operatorToken.Text, left.Type); 1352Error(diagnostics, ErrorCode.ERR_BadOpOnNullOrDefaultOrNew, node, operatorToken.Text, left.Display); 1355Error(diagnostics, ErrorCode.ERR_BadOpOnNullOrDefaultOrNew, node, operatorToken.Text, right.Display); 1359ErrorCode errorCode; 1364errorCode = ErrorCode.ERR_AmbigBinaryOps; // Operator '{0}' is ambiguous on operands of type '{1}' and '{2}' 1368errorCode = ErrorCode.ERR_BadBinaryReadOnlySpanConcatenation; // Operator '{0}' cannot be applied to operands of type '{1}' and '{2}' that are not UTF-8 byte representations 1372errorCode = ErrorCode.ERR_BadBinaryOps; // Operator '{0}' cannot be applied to operands of type '{1}' and '{2}' 1774Error(diagnostics, ErrorCode.ERR_BadBoolOp, syntax, signature.Method); 1813Error(diagnostics, ErrorCode.ERR_MustHaveOpTF, syntax, signature.Method, t); 1935Error(diagnostics, ErrorCode.ERR_BadBoolOp, syntax, signature.Method); 1965Error(diagnostics, ErrorCode.ERR_MustHaveOpTF, syntax, signature.Method, extensionContainingType); 2796Error(diagnostics, ErrorCode.ERR_IntDivByZero, syntax); 2820Error(diagnostics, ErrorCode.ERR_ConstantStringTooLong, right.Syntax); 2835Error(diagnostics, ErrorCode.ERR_DecConstError, syntax); 2852Error(diagnostics, ErrorCode.WRN_CompileTimeCheckedOverflow, syntax, resultTypeSymbol); 2871Error(diagnostics, ErrorCode.ERR_CheckedOverflow, syntax); 3420Error(diagnostics, ErrorCode.ERR_VoidError, node); 4002Error(diagnostics, ErrorCode.ERR_BadAbstractStaticMemberAccess, node); 4012Error(diagnostics, ErrorCode.ERR_RuntimeDoesNotSupportStaticAbstractMembersInInterfaces, node); 4064Error(diagnostics, ErrorCode.ERR_IllegalSuppression, expr.Syntax); 4070Error(diagnostics, ErrorCode.ERR_DuplicateNullSuppression, expr.Syntax); 4111Error(diagnostics, ErrorCode.ERR_PtrExpected, node); 4125Error(diagnostics, ErrorCode.ERR_VoidError, node); 4171Error(diagnostics, isFixedStatementAddressOfExpression ? ErrorCode.ERR_FixedNotNeeded : ErrorCode.ERR_FixedNeeded, node); 4344Error(diagnostics, ErrorCode.ERR_IllegalSuppression, expr.Syntax); 4358Error(diagnostics, ErrorCode.ERR_BadOpOnNullOrDefaultOrNew, node, operatorText, operand.Display); 4514Error(diagnostics, ErrorCode.WRN_CompileTimeCheckedOverflow, syntax, resultTypeSymbol); 4533Error(diagnostics, ErrorCode.ERR_CheckedOverflow, syntax); 4772Error(diagnostics, ErrorCode.ERR_LambdaInIsAs, node); 4784Error(diagnostics, ErrorCode.ERR_BadUnaryOp, node, SyntaxFacts.GetText(SyntaxKind.IsKeyword), operand.Display); 4808Error(diagnostics, ErrorCode.WRN_StaticInAsOrIs, node, targetType); 4814Error(diagnostics, ErrorCode.ERR_PointerInAsOrIs, node); 4874Error(diagnostics, ErrorCode.ERR_IsNullableType, node.Right, targetType); 4886diagnostics.Add(ErrorCode.WRN_IsTypeNamedUnderscore, node.Right.Location, typeExpression.AliasOpt ?? (Symbol)targetType); 4915Error(diagnostics, ErrorCode.WRN_IsAlwaysFalse, node, targetType); 4924Error(diagnostics, ErrorCode.WRN_IsDynamicIsConfusing, 4961diagnostics.Add(ErrorCode.ERR_BadPatternExpression, node.Left.Location, operand.Display); 4998diagnostics.Add(ErrorCode.ERR_ConstantValueOfTypeExpected, node.Right.Location, unionMatchingInputType.StrippedType()); 5045Error(diagnostics, ErrorCode.ERR_BadBinaryOps, syntax, "is", operandType, targetType); 5051ErrorCode errorCode = constantValue == ConstantValue.True ? ErrorCode.WRN_IsAlwaysTrue : ErrorCode.WRN_IsAlwaysFalse; 5393Error(diagnostics, ErrorCode.ERR_LambdaInIsAs, node); 5402Error(diagnostics, ErrorCode.ERR_TypelessTupleInAs, node); 5416Error(diagnostics, ErrorCode.ERR_AsNullableType, node.Right, targetType); 5426Error(diagnostics, ErrorCode.ERR_AsWithTypeVar, node, targetType); 5430Error(diagnostics, ErrorCode.ERR_PointerInAsOrIs, node); 5434Error(diagnostics, ErrorCode.ERR_AsMustHaveReferenceType, node, targetType); 5451Error(diagnostics, ErrorCode.WRN_StaticInAsOrIs, node, targetType); 5485Error(diagnostics, ErrorCode.ERR_PointerInAsOrIs, node); 5572Error(diagnostics, ErrorCode.ERR_NoExplicitBuiltinConv, node, distinguisher.First, distinguisher.Second); 5605Error(diagnostics, ErrorCode.ERR_BadBinaryOps, node, "as", operandType, targetType); 5610Error(diagnostics, ErrorCode.WRN_AlwaysNull, node, targetType); 5652Error(diagnostics, ErrorCode.ERR_BadBinaryOps, node, SyntaxFacts.GetText(node.OperatorToken.Kind()), leftOperand.Display, rightOperand.Display); 5678Error(diagnostics, ErrorCode.ERR_BadOpOnNullOrDefaultOrNew, node, node.OperatorToken.Text, "default"); 5908Error(diagnostics, ErrorCode.ERR_BadBinaryOps, node, SyntaxFacts.GetText(node.OperatorToken.Kind()), leftOperand.Display, rightOperand.Display); 5958diagnostics.Add(ErrorCode.ERR_RefConditionalNeedsTwoRefs, whenFalse.GetFirstToken().GetLocation()); 5963diagnostics.Add(ErrorCode.ERR_RefConditionalNeedsTwoRefs, whenTrue.GetFirstToken().GetLocation()); 5987ErrorCode noCommonTypeError = hadMultipleCandidates ? ErrorCode.ERR_AmbigQM : ErrorCode.ERR_InvalidQM; 6029diagnostics.Add(ErrorCode.ERR_RefConditionalDifferentTypes, falseExpr.Syntax.Location, trueType); 6067diagnostics.Add(_inUnsafeRegion ? ErrorCode.WRN_MismatchedRefEscapeInTernary : ErrorCode.ERR_MismatchedRefEscapeInTernary, node.Location);
Binder\Binder_Patterns.cs (48)
73diagnostics.Add(ErrorCode.ERR_BadPatternExpression, node.Expression.Location, expression.Display); 113diagnostics.Add(ErrorCode.ERR_IsPatternImpossible, node.Location, expression.Type); 131diagnostics.Add(ErrorCode.WRN_IsPatternAlways, node.Location, expression.Type); 152diagnostics.Add(ErrorCode.WRN_GivenExpressionNeverMatchesPattern, node.Location); 160diagnostics.Add(ErrorCode.WRN_GivenExpressionAlwaysMatchesConstant, node.Location); 168diagnostics.Add(ErrorCode.WRN_GivenExpressionAlwaysMatchesPattern, node.Location); 274diagnostics.Add(ErrorCode.ERR_MisplacedSlicePattern, node.Location); 380Error(diagnostics, ErrorCode.ERR_UnsupportedTypeForListPattern, node, inputType); 440Error(diagnostics, ErrorCode.ERR_ListPatternRequiresLength, node, inputType); 523diagnostics.Add(ErrorCode.ERR_CannotMatchOnINumberBase, node.Location, inputType); 537diagnostics.Add(ErrorCode.ERR_ConstantValueOfTypeExpected, innerExpression.Location, unionMatchingInputType.StrippedType()); 594diagnostics.Add(ErrorCode.ERR_DefaultPattern, e.Location); 601diagnostics.Add(ErrorCode.ERR_IllegalSuppression, e.Location); 656diagnostics.Add(ErrorCode.ERR_ConstantValueOfTypeExpected, patternExpression.Location, strippedInputType); 660diagnostics.Add(ErrorCode.ERR_ConstantExpected, patternExpression.Location); 706diagnostics.Add(ErrorCode.ERR_ValueCantBeNull, expression.Syntax.Location, inputType); 716diagnostics.Add(ErrorCode.ERR_PatternWrongType, expression.Syntax.Location, inputType, expression.Display); 727diagnostics.Add(ErrorCode.ERR_ConstantPatternVsOpenType, 766diagnostics.Add(ErrorCode.ERR_PatternSpanCharCannotBeStringNull, convertedExpression.Syntax.Location, inputType); 837diagnostics.Add(ErrorCode.ERR_PatternWrongType, expression.Syntax.Location, caseType, expression.Display); 849diagnostics.Add(ErrorCode.ERR_UnionMatchingWrongPattern, expression.Syntax.Location, unionType); 881diagnostics.Add(ErrorCode.ERR_PointerTypeInPatternMatching, typeSyntax.Location); 888Error(diagnostics, ErrorCode.ERR_PatternNullableType, typeSyntax, patternType.GetNullableUnderlyingType()); 894Error(diagnostics, ErrorCode.ERR_PatternNullableType, typeSyntax, patternType); 900Error(diagnostics, ErrorCode.ERR_VarDeclIsStaticClass, typeSyntax, patternType); 908Error(diagnostics, ErrorCode.ERR_PatternDynamicType, typeSyntax); 937ErrorCode.ERR_PatternWrongGenericTypeInVersion, 946return new CSDiagnosticInfo(ErrorCode.ERR_PatternWrongType, inputType, patternType); 1085diagnostics.Add(ErrorCode.ERR_DesignatorBeneathPatternCombinator, identifier.GetLocation()); 1152diagnostics.Add(ErrorCode.ERR_PointerTypeInPatternMatching, node.Location); 1310diagnostics.Add(ErrorCode.ERR_DeconstructParameterNameMismatch, subPattern.NameColon.Name.Location, name, parameterName); 1318diagnostics.Add(ErrorCode.ERR_IdentifierExpected, subPattern.ExpressionColon.Expression.Location); 1349diagnostics.Add(ErrorCode.ERR_ArgumentNameInITuplePattern, subpatternSyntax.NameColon.Location); 1353diagnostics.Add(ErrorCode.ERR_IdentifierExpected, subpatternSyntax.ExpressionColon.Expression.Location); 1378diagnostics.Add(ErrorCode.ERR_WrongNumberOfSubpatterns, node.Location, declType, elementTypesWithAnnotations.Length, node.Subpatterns.Count); 1398diagnostics.Add(ErrorCode.ERR_IdentifierExpected, subpatternSyntax.ExpressionColon.Expression.Location); 1531diagnostics.Add(ErrorCode.ERR_TupleElementNameMismatch, node.Location, name, $"Item{tupleIndex + 1}"); 1548diagnostics.Add(ErrorCode.ERR_PointerTypeInPatternMatching, node.Location); 1557diagnostics.Add(ErrorCode.ERR_VarMayNotBindToType, node.VarKeyword.GetLocation(), foundSymbol.ToDisplayString()); 1675diagnostics.Add(ErrorCode.ERR_WrongNumberOfSubpatterns, tupleDesignation.Location, 1736diagnostics.Add(ErrorCode.ERR_PropertyPatternNameMissing, pattern.Location, pattern); 1792Error(diagnostics, ErrorCode.ERR_InvalidNameInSubpattern, expr); 1870Error(diagnostics, ErrorCode.ERR_NoSuchMember, memberName, implicitReceiver.Type, name); 1879Error(diagnostics, ErrorCode.ERR_PropertyLacksGet, memberName, name); 1981diagnostics.Add(ErrorCode.ERR_InvalidExprTerm, node.OperatorToken.GetLocation(), node.OperatorToken.Text); 1992diagnostics.Add(ErrorCode.ERR_RelationalPatternWithNaN, node.Expression.Location); 2001diagnostics.Add(ErrorCode.ERR_UnsupportedTypeForRelationalPattern, node.Location, type.ToDisplayString()); 2016diagnostics.Add(ErrorCode.ERR_CannotMatchOnINumberBase, node.Location, inputType);
Binder\Binder_Query.cs (11)
35diagnostics.Add(ErrorCode.ERR_BadDynamicQuery, fromClause.Expression.Location); 386diagnostics.Add(ErrorCode.ERR_BadDynamicQuery, join.InExpression.Location); 740Error(d, ErrorCode.ERR_QueryRangeVariableAssignedBadValue, errorLocation, yExpression.Display); 745Error(d, ErrorCode.ERR_QueryRangeVariableAssignedBadValue, errorLocation, yExpression.Type!); 944diagnostics.Add(ErrorCode.ERR_NullNotValid, node.Location); 948diagnostics.Add(ErrorCode.ERR_DefaultLiteralNotValid, node.Location); 952diagnostics.Add(ErrorCode.ERR_ImplicitObjectCreationNotValid, node.Location); 956diagnostics.Add(ErrorCode.ERR_BadSKunknown, ultimateReceiver.Syntax.Location, ((BoundNamespaceExpression)ultimateReceiver).NamespaceSymbol, MessageID.IDS_SK_NAMESPACE.Localize()); 961diagnostics.Add(ErrorCode.ERR_QueryNoProvider, node.Location, MessageID.IDS_AnonMethod.Localize(), methodName); 971Error(diagnostics, ErrorCode.ERR_BadSKunknown, ultimateReceiver.Syntax, ultimateReceiver.Type, MessageID.IDS_SK_TYVAR.Localize()); 983diagnostics.Add(ErrorCode.ERR_QueryNoProvider, node.Location, "void", methodName);
Binder\Binder_QueryErrors.cs (7)
49new DiagnosticInfoWithSymbols(ErrorCode.ERR_BadDynamicQuery, Array.Empty<object>(), symbols), 56ErrorCode.ERR_QueryNoProviderStandard, 64ErrorCode.ERR_QueryNoProviderCastable, 72ErrorCode.ERR_QueryNoProvider, 208multiple ? ErrorCode.ERR_QueryTypeInferenceFailedMulti : ErrorCode.ERR_QueryTypeInferenceFailed, 240ErrorCode.ERR_QueryTypeInferenceFailedSelectMany,
Binder\Binder_Statements.cs (134)
55Error(diagnostics, ErrorCode.ERR_AttributesNotAllowed, attributeList); 176Error(diagnostics, ErrorCode.ERR_IllegalUnsafe, node.UnsafeKeyword); 256Error(diagnostics, ErrorCode.ERR_BadYieldInFinally, node.YieldKeyword); 260Error(diagnostics, ErrorCode.ERR_BadYieldInTryOfCatch, node.YieldKeyword); 264Error(diagnostics, ErrorCode.ERR_BadYieldInCatch, node.YieldKeyword); 268Error(diagnostics, ErrorCode.ERR_YieldNotAllowedInScript, node.YieldKeyword); 272Error(diagnostics, ErrorCode.ERR_BadYieldInUnsafe, node.YieldKeyword); 283Error(diagnostics, ErrorCode.ERR_BadYieldInFinally, node.YieldKeyword); 287Error(diagnostics, ErrorCode.ERR_YieldNotAllowedInScript, node.YieldKeyword); 327diagnostics.Add(ErrorCode.ERR_BadEmbeddedStmt, node.GetLocation()); 345diagnostics.Add(ErrorCode.ERR_BadEmbeddedStmt, node.GetLocation()); 380diagnostics.Add(ErrorCode.WRN_PossibleMistakenNullStatement, node.GetLocation()); 415diagnostics.Add(ErrorCode.ERR_BadExceptionType, exprSyntax.Location); 446diagnostics.Add(ErrorCode.ERR_BadEmptyThrow, node.ThrowKeyword.GetLocation()); 457diagnostics.Add(ErrorCode.ERR_BadEmptyThrowInFinally, node.ThrowKeyword.GetLocation()); 486Error(diagnostics, ErrorCode.ERR_DuplicateLabel, node.Identifier, node.Identifier.ValueText); 498Error(diagnostics, ErrorCode.ERR_LabelShadow, node.Identifier, node.Identifier.ValueText); 534Error(diagnostics, ErrorCode.ERR_InvalidGotoCase, node); 584diagnostics.Add(ErrorCode.ERR_LocalFunctionMissingBody, localSymbol.GetFirstLocation(), localSymbol); 590diagnostics.Add(ErrorCode.ERR_ExternHasBody, localSymbol.GetFirstLocation(), localSymbol); 630blockDiagnostics.Add(ErrorCode.ERR_ReturnExpected, localSymbol.GetFirstLocation(), localSymbol); 659Error(diagnostics, ErrorCode.ERR_IllegalStatement, syntax); 684Error(diagnostics, ErrorCode.WRN_UnobservedAwaitableExpression, expression.Syntax); 814Error(diagnostics, ErrorCode.ERR_ImplicitlyTypedVariableCannotBeConst, declarationNode); 838Error(diagnostics, ErrorCode.ERR_ImplicitlyTypedVariableMultipleDeclarator, declarationNode); 854Error(diagnostics, ErrorCode.ERR_VarDeclIsStaticClass, typeSyntax, declType.Type); 859Error(diagnostics, ErrorCode.ERR_BadConstType, typeSyntax, declType.Type); 884Error(diagnostics, ErrorCode.ERR_ImplicitlyTypedVariableWithNoInitializer, errorSyntax); 893diagnostics, ErrorCode.ERR_ImplicitlyTypedVariableAssignedArrayInitializer, errorSyntax); 908Error(diagnostics, ErrorCode.ERR_ImplicitlyTypedVariableAssignedBadValue, errorSyntax, expression.Display); 929Error(diagnostics, ErrorCode.ERR_InitializeByValueVariableWithReference, node); 941Error(diagnostics, ErrorCode.ERR_ByReferenceVariableMustBeInitialized, node); 946Error(diagnostics, ErrorCode.ERR_InitializeByReferenceVariableWithValue, node); 1034Error(localDiagnostics, ErrorCode.ERR_ImplicitlyTypedVariableAssignedBadValue, declarator, declTypeOpt.Type); 1043Error(localDiagnostics, ErrorCode.ERR_VarDeclIsStaticClass, typeSyntax, initializerType); 1085Error(localDiagnostics, ErrorCode.ERR_ImplicitlyTypedLocalCannotBeFixed, declarator); 1094Error(localDiagnostics, declTypeOpt.Type.IsFunctionPointer() ? ErrorCode.ERR_CannotUseFunctionPointerAsFixedLocal : ErrorCode.ERR_BadFixedInitType, declarator); 1108localDiagnostics.Add(ErrorCode.ERR_ScopedRefAndRefStructOnly, typeSyntax.Location); 1124Error(localDiagnostics, ErrorCode.ERR_FixedMustInit, declarator); 1242Error(diagnostics, ErrorCode.ERR_ExprCannotBeFixed, initializerSyntax); 1310Error(diagnostics, ErrorCode.ERR_ExprCannotBeFixed, initializerSyntax); 1347additionalDiagnostics.Add(ErrorCode.WRN_PatternBadSignature, initializer.Syntax.Location, initializer.Type, "fixed", patternMethodSymbol); 1473diagnostics.Add(ErrorCode.ERR_VoidAssignment, op1.Syntax.Location); 1574var errorCode = (rightEscape, _inUnsafeRegion) switch 1576({ IsReturnOnly: true }, false) => ErrorCode.ERR_RefAssignReturnOnly, 1577({ IsReturnOnly: true }, true) => ErrorCode.WRN_RefAssignReturnOnly, 1578(_, false) => ErrorCode.ERR_RefAssignNarrower, 1579(_, true) => ErrorCode.WRN_RefAssignNarrower 1603var errorCode = _inUnsafeRegion ? ErrorCode.WRN_RefAssignValEscapeWider : ErrorCode.ERR_RefAssignValEscapeWider; 1795new CSDiagnosticInfo(ErrorCode.ERR_BadEventUsage, leastOverridden, leastOverridden.ContainingType) : 1796new CSDiagnosticInfo(ErrorCode.ERR_BadEventUsageNoField, leastOverridden); 1888result = BindUnexpectedArrayInitializer((InitializerExpressionSyntax)node, diagnostics, ErrorCode.ERR_ArrayInitToNonArrayType); 1913Error(diagnostics, ErrorCode.ERR_AttributesNotAllowed, node.AttributeLists[0]); 1996Error(diagnostics, ErrorCode.ERR_RefAssignmentMustHaveIdentityConversion, expression.Syntax, targetType); 2018ErrorCode.ERR_NoImplicitConv, 2091conversionError(diagnostics, ErrorCode.ERR_CannotInferDelegateType); 2099conversionError(diagnostics, ErrorCode.ERR_AnonMethToNonDel, id, targetType); 2106conversionError(diagnostics, ErrorCode.ERR_ExpressionTreeMustHaveDelegate, ((NamedTypeSymbol)targetType).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type); 2113conversionError(diagnostics, ErrorCode.ERR_AnonymousMethodToExpressionTree); 2119conversionError(diagnostics, ErrorCode.ERR_CantConvAnonMethReturnType, id, targetType); 2145conversionError(diagnostics, ErrorCode.ERR_CantConvAnonMethNoParams, targetType); 2157conversionError(diagnostics, ErrorCode.ERR_BadDelArgCount, delegateType, anonymousFunction.ParameterCount); 2198Error(diagnostics, ErrorCode.ERR_BadParamExtraRef, lambdaParameterLocation, i + 1, lambdaRefKind.ToParameterDisplayString()); 2203Error(diagnostics, ErrorCode.ERR_BadParamRef, lambdaParameterLocation, i + 1, delegateRefKind.ToParameterDisplayString()); 2234conversionError(diagnostics, ErrorCode.ERR_CantConvAnonMethParams, id, targetType); 2253Error(diagnostics, ErrorCode.ERR_BadParamType, lambdaParameterLocation, 2271diagnostics.Add(ErrorCode.ERR_InternalError, syntax.Location); 2273void conversionError(BindingDiagnosticBag diagnostics, ErrorCode code, params object[] args) 2294Error(diagnostics, ErrorCode.ERR_LiteralDoubleCast, syntax, (targetType.SpecialType == SpecialType.System_Single) ? "F" : "M", targetType); 2305Error(diagnostics, ErrorCode.ERR_ConstOutOfRange, syntax, sourceConstantValueOpt.Value, targetType); 2310Error(diagnostics, ErrorCode.ERR_NoImplicitConvCast, syntax, distinguisher.First, distinguisher.Second); 2320Error(diagnostics, ErrorCode.ERR_AmbigUDConv, syntax, originalUserDefinedConversions[0], originalUserDefinedConversions[1], sourceType, targetType); 2327Error(diagnostics, ErrorCode.ERR_NoImplicitConv, syntax, distinguisher.First, distinguisher.Second); 2336Error(diagnostics, ErrorCode.ERR_NoImplicitConv, syntax, sourceType, targetType); 2341Error(diagnostics, ErrorCode.ERR_NoImplicitConv, syntax, distinguisher.First, distinguisher.Second); 2363Error(diagnostics, ErrorCode.ERR_NoImplicitConv, syntax, operand.Display, targetType); 2395Error(diagnostics, ErrorCode.ERR_ConversionNotTupleCompatible, syntax, tuple.Arguments.Length, targetType); 2418Error(diagnostics, ErrorCode.ERR_TypeVarCantBeNull, syntax, targetType); 2423Error(diagnostics, ErrorCode.ERR_ValueCantBeNull, syntax, targetType); 2432Error(diagnostics, ErrorCode.ERR_StackAllocConversionNotPossible, syntax, stackAllocExpression.ElementType, targetType); 2455Error(diagnostics, ErrorCode.ERR_InvalidAddrOp, ((BoundAddressOfOperator)operand).Operand.Syntax); 2511ErrorCode errorCode; 2516errorCode = ErrorCode.ERR_MethFuncPtrMismatch; 2519Error(diagnostics, ErrorCode.ERR_MissingAddressOf, location); 2522errorCode = ErrorCode.ERR_CannotConvertAddressOfToDelegate; 2525errorCode = ErrorCode.ERR_MethDelegateMismatch; 2531errorCode = ErrorCode.ERR_AddressOfToNonFunctionPointer; 2537Error(diagnostics, ErrorCode.ERR_CannotInferDelegateType, location); 2542errorCode = ErrorCode.ERR_MethGrpToNonDel; 2735Error(diagnostics, ErrorCode.WRN_IncorrectBooleanAssg, assignment.Syntax); 2884Error(diagnostics, ErrorCode.ERR_ImplicitlyTypedVariableMultipleDeclarator, nodeOpt); 2978labelName != null ? (isBreak ? ErrorCode.ERR_NoBreakId : ErrorCode.ERR_NoContinueId) : ErrorCode.ERR_NoBreakOrCont, 3087diagnostics.Add(ErrorCode.ERR_ReturnInIterator, syntax.ReturnKeyword.GetLocation()); 3095diagnostics.Add(ErrorCode.ERR_MustNotHaveRefReturn, syntax.ReturnKeyword.GetLocation()); 3100diagnostics.Add(ErrorCode.ERR_ReturnInIterator, syntax.ReturnKeyword.GetLocation()); 3106var errorCode = refKind != RefKind.None 3107? ErrorCode.ERR_MustNotHaveRefReturn 3108: ErrorCode.ERR_MustHaveRefReturn; 3138Error(diagnostics, ErrorCode.ERR_RetNoObjectRequiredLambda, syntax.ReturnKeyword); 3142Error(diagnostics, ErrorCode.ERR_TaskRetNoObjectRequiredLambda, syntax.ReturnKeyword, retType); 3158Error(diagnostics, ErrorCode.ERR_RetNoObjectRequired, syntax.ReturnKeyword, container); 3162Error(diagnostics, ErrorCode.ERR_TaskRetNoObjectRequired, syntax.ReturnKeyword, container, retType); 3178Error(diagnostics, ErrorCode.ERR_RetObjectRequired, syntax.ReturnKeyword, requiredType); 3192Error(diagnostics, ErrorCode.ERR_CantReturnVoid, expressionSyntax); 3241Error(diagnostics, ErrorCode.ERR_RefReturnMustHaveIdentityConversion, argument.Syntax, returnType); 3258Error(diagnostics, ErrorCode.ERR_BadAsyncReturnExpression, argument.Syntax, returnType, argument.Type); 3315diagnostics.Add(ErrorCode.ERR_TooManyCatches, catchSyntax.CatchKeyword.GetLocation()); 3353Error(diagnostics, ErrorCode.ERR_BadExceptionType, declaration.Type); 3395Error(diagnostics, ErrorCode.ERR_UnreachableCatch, declaration.Type, previousType); 3410Error(diagnostics, ErrorCode.WRN_UnreachableGeneralCatch, node.CatchKeyword); 3450var errorCode = boundFilter.ConstantValueOpt.BooleanValue 3451? ErrorCode.WRN_FilterIsConstantTrue 3453? ErrorCode.WRN_FilterIsConstantFalseRedundantTryCatch 3454: ErrorCode.WRN_FilterIsConstantFalse; 3477Error(diagnostics, ErrorCode.ERR_CantConvAsyncAnonFuncReturns, 3484Error(diagnostics, ErrorCode.ERR_CantConvAnonMethReturns, 3548Error(diagnostics, ErrorCode.ERR_MustNotHaveRefReturn, syntax); 3556var errorCode = refKind != RefKind.None 3557? ErrorCode.ERR_MustNotHaveRefReturn 3558: ErrorCode.ERR_MustHaveRefReturn; 3574Error(diagnostics, ErrorCode.ERR_IllegalStatement, syntax); 3590Error(diagnostics, ErrorCode.ERR_ReturnInIterator, syntax); 3824Error(diagnostics, ErrorCode.ERR_UnexpectedOrMissingConstructorInitializerInRecord, initializer?.ThisOrBaseKeyword ?? constructor.Identifier); 3829Error(diagnostics, ErrorCode.ERR_UnionConstructorCallsDefaultConstructor, initializer?.ThisOrBaseKeyword ?? constructor.Identifier); 3841Error(diagnostics, ErrorCode.ERR_RecordStructConstructorCallsDefaultConstructor, initializer.ThisOrBaseKeyword); 3845Error(diagnostics, ErrorCode.ERR_UnionConstructorCallsDefaultConstructor, initializer.ThisOrBaseKeyword); 4043diagnostics.Add(ErrorCode.ERR_BadCtorArgCount, diagnosticsLocation, baseType, /*desired param count*/ 0); 4057diagnostics.Add(ErrorCode.ERR_BadAccess, diagnosticsLocation, baseConstructor); 4101diagnostics.Add(ErrorCode.ERR_NoCopyConstructorInBaseType, diagnosticsLocation, baseType);
Binder\Binder_Symbols.cs (55)
353var diagnosticInfo = diagnostics.Add(ErrorCode.ERR_BadSKknown, syntax.Location, syntax, symbol.Symbol.GetKindText(), MessageID.IDS_SK_TYPE.Localize()); 510diagnostics.Add(ErrorCode.ERR_BadRefInUsingAlias, refToken.GetLocation()); 514diagnostics.Add(ErrorCode.ERR_UnexpectedToken, refToken.GetLocation(), refToken.ToString()); 528diagnostics.Add(ErrorCode.ERR_UnexpectedToken, scopedToken.GetLocation(), scopedToken.ToString()); 605return TypeWithAnnotations.Create(new ExtendedErrorTypeSymbol(left, LookupResultKind.NotATypeOrNamespace, diagnostics.Add(ErrorCode.ERR_ColColWithTypeAlias, node.Alias.Location, node.Alias.Identifier.Text))); 627diagnostics.Add(ErrorCode.ERR_TypeExpected, syntax.GetLocation()); 641return new CSDiagnosticInfo(ErrorCode.ERR_NullableUnconstrainedTypeParameter, new CSharpRequiredLanguageVersion(requiredVersion)); 659Error(diagnostics, ErrorCode.ERR_ArrayOfStaticClass, node.ElementType, type.Type); 670Error(diagnostics, ErrorCode.ERR_ArrayElementCantBeRefAny, node.ElementType, type.Type); 687Error(diagnostics, ErrorCode.ERR_ArraySizeInDeclaration, rankSpecifier); 774var info = new CSDiagnosticInfo(ErrorCode.ERR_TupleElementNamesAttributeMissing, 814Error(diagnostics, ErrorCode.ERR_TupleReservedElementNameAnyPosition, syntax, name); 819Error(diagnostics, ErrorCode.ERR_TupleReservedElementName, syntax, name, reserved); 824Error(diagnostics, ErrorCode.ERR_TupleDuplicateElementName, syntax); 883new CSDiagnosticInfo(ErrorCode.ERR_SingleTypeNameNotFound, identifierValueText))); 1071var info = new CSDiagnosticInfo(ErrorCode.ERR_DynamicAttributeMissing, AttributeDescription.DynamicAttribute.FullName); 1243diagnostics.Add(ErrorCode.ERR_UnexpectedUnboundGenericName, node.Location); 1351var diagnosticInfo = new CSDiagnosticInfo(ErrorCode.ERR_LookupInTypeVariable, qualifierOpt); 1431Error(diagnostics, ErrorCode.ERR_BadArity, typeSyntax, type, MessageID.IDS_SK_TYPE.Localize(), typeArgumentsSyntax.Count); 1463Error(diagnostics, ErrorCode.ERR_BadArity, syntax, plainName, MessageID.IDS_MethodGroup.Localize(), typeArgumentsSyntax.Count); 1521Error(diagnostics, ErrorCode.ERR_AmbiguousPrimaryConstructorParameterAsColorColorReceiver, receiver.Syntax, parameter.Name, parameter.Type, parameter); 1540Error(diagnostics, ErrorCode.ERR_NoSuchMemberOrExtension, right, receiver.Type, plainName); 1769diagnostics.Add(ErrorCode.ERR_MissingPredefinedMember, syntax.Location, descriptor.DeclaringTypeMetadataName, descriptor.Name); 1960useSiteInfo = new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_MissingPredefinedMember, memberDescriptor.DeclaringTypeMetadataName, memberDescriptor.Name)); 2085diagnostics.Add(ErrorCode.WRN_SameFullNameThisNsAgg, where.Location, originalSymbols, 2096diagnostics.Add(ErrorCode.WRN_SameFullNameThisAggNs, where.Location, originalSymbols, 2107diagnostics.Add(ErrorCode.WRN_SameFullNameThisAggAgg, where.Location, originalSymbols, 2162info = new CSDiagnosticInfo(ErrorCode.ERR_AmbigContext, originalSymbols, 2173info = new CSDiagnosticInfo(ErrorCode.ERR_SameFullNameAggAgg, originalSymbols, 2198info = new CSDiagnosticInfo(ErrorCode.ERR_SameFullNameNsAgg, originalSymbols, 2213info = new CSDiagnosticInfo(ErrorCode.ERR_SameFullNameNsAgg, originalSymbols, 2255info = new CSDiagnosticInfo(ErrorCode.ERR_SameFullNameThisAggThisNs, originalSymbols, 2262info = new CSDiagnosticInfo(ErrorCode.ERR_AmbigMember, originalSymbols, 2276info = new CSDiagnosticInfo(ErrorCode.ERR_AmbigMember, originalSymbols, 2302info = new CSDiagnosticInfo(ErrorCode.ERR_AmbiguousAttribute, originalSymbols, 2308info = new CSDiagnosticInfo(ErrorCode.ERR_AmbigContext, originalSymbols, 2318info = new CSDiagnosticInfo(ErrorCode.ERR_AmbigMember, originalSymbols, 2347var errorInfo = new CSDiagnosticInfo(ErrorCode.ERR_SystemVoid); 2378if (errorInfo != null && errorInfo.Code == (int)ErrorCode.ERR_CircularBase) 2666return diagnostics.Add(ErrorCode.ERR_DottedTypeNameNotFoundInAgg, location, whereText, qualifierOpt); 2678? diagnostics.Add(ErrorCode.ERR_GlobalSingleTypeNameNotFound, location, whereText) 2679: diagnostics.Add(ErrorCode.ERR_GlobalSingleTypeNameNotFoundFwd, location, whereText, forwardedToAssembly); 2693? diagnostics.Add(ErrorCode.ERR_DottedTypeNameNotFoundInNS, location, whereText, container) 2694: diagnostics.Add(ErrorCode.ERR_DottedTypeNameNotFoundInNSFwd, location, whereText, container, forwardedToAssembly); 2701return diagnostics.Add(ErrorCode.ERR_AliasNotFound, location, whereText); 2706var code = (where.Parent is QueryClauseSyntax) ? ErrorCode.ERR_TypeVarNotFoundRangeVariable : ErrorCode.ERR_TypeVarNotFound; 2715? diagnostics.Add(ErrorCode.ERR_SingleTypeNameNotFoundFwd, location, whereText, forwardedToAssembly) 2716: diagnostics.Add(ErrorCode.ERR_DottedTypeNameNotFoundInNSFwd, location, whereText, qualifierOpt, forwardedToAssembly); 2719return diagnostics.Add(ErrorCode.ERR_SingleTypeNameNotFound, location, whereText); 2740if (diagInfo.Code == (int)ErrorCode.ERR_CycleInTypeForwarder) 2743diagnostics.Add(ErrorCode.ERR_CycleInTypeForwarder, location, metadataName.FullName, forwardedType.ContainingAssembly.Name); 2745else if (diagInfo.Code == (int)ErrorCode.ERR_TypeForwardedToMultipleAssemblies) 2861diagnostics?.Add(ErrorCode.WRN_ErrorOverride, getLocation(data), diagInfo, (int)diagInfo.Code);
Binder\Binder_TupleOperators.cs (3)
193Error(diagnostics, ErrorCode.ERR_BadBinaryOps, node, node.OperatorToken.Text, left.Display, right.Display); 232Error(diagnostics, ErrorCode.ERR_TupleSizesMismatchForBinOps, node, leftCardinality, rightCardinality); 327diagnostics.Add(ErrorCode.WRN_TupleBinopLiteralNameMismatch, location, complaintName);
Binder\Binder_Unsafe.cs (13)
125customErrorCode: ErrorCode.ERR_UnsafeConstructorConstraint, 143RequiresUnsafeMode.Explicit => ErrorCode.ERR_UnsafeMemberOperation, 144RequiresUnsafeMode.Implicit => ErrorCode.ERR_UnsafeMemberOperationCompat, 197ReportUnsafeIfNotAllowed(node, diagnostics, disallowedUnder: MemorySafetyRulesVersion.Version2, customErrorCode: ErrorCode.ERR_UnsafeUninitializedStackAlloc); 206ErrorCode? customErrorCode = null, 218ErrorCode? customErrorCode = null, 236ErrorCode? customErrorCode = null, 247ErrorCode? customErrorCode = null, 270ErrorCode? customErrorCode = null, 287ErrorCode? customErrorCode = null, 318? new CSDiagnosticInfo(ErrorCode.ERR_UnsafeNeeded) 319: new CSDiagnosticInfo(ErrorCode.ERR_SizeofUnsafe, sizeOfTypeOpt); 327return new CSDiagnosticInfo(customErrorCode ?? ErrorCode.ERR_UnsafeOperation, customArgs ?? []);
Binder\Binder_WithExpression.cs (2)
25diagnostics.Add(ErrorCode.ERR_InvalidWithReceiverType, syntax.Expression.Location); 46diagnostics.Add(ErrorCode.ERR_CannotClone, syntax.Expression.Location, receiverType);
Binder\Binder.cs (10)
578internal static void Error(BindingDiagnosticBag diagnostics, ErrorCode code, CSharpSyntaxNode syntax) 583internal static void Error(BindingDiagnosticBag diagnostics, ErrorCode code, CSharpSyntaxNode syntax, params object[] args) 588internal static void Error(BindingDiagnosticBag diagnostics, ErrorCode code, SyntaxToken token) 593internal static void Error(BindingDiagnosticBag diagnostics, ErrorCode code, SyntaxToken token, params object[] args) 598internal static void Error(BindingDiagnosticBag diagnostics, ErrorCode code, SyntaxNodeOrToken syntax) 605internal static void Error(BindingDiagnosticBag diagnostics, ErrorCode code, SyntaxNodeOrToken syntax, params object[] args) 612internal static void Error(BindingDiagnosticBag diagnostics, ErrorCode code, Location location) 617internal static void Error(BindingDiagnosticBag diagnostics, ErrorCode code, Location location, params object[] args) 824? ErrorCode.ERR_UnmanagedCallersOnlyMethodsCannotBeConvertedToDelegate 825: ErrorCode.ERR_UnmanagedCallersOnlyMethodsCannotBeCalledDirectly,
Binder\Binder.OperatorResolutionForReporting.cs (3)
135Error(diagnostics, ErrorCode.ERR_SingleInapplicableUnaryOperator, toReport, leftDisplay, inapplicableMember); 140Error(diagnostics, ErrorCode.ERR_SingleInapplicableBinaryOperator, toReport, leftDisplay, rightDisplay, inapplicableMember); 228Error(diagnostics, ErrorCode.ERR_AmbigOperator, nodeToReport(node), first, second);
Binder\Binder.QueryTranslationState.cs (1)
85diagnostics.Add(ErrorCode.ERR_QueryDuplicateRangeVariable, identifier.GetLocation(), name);
Binder\Binder.ValueChecks.cs (147)
960Error(diagnostics, ErrorCode.ERR_BadSKknown, node, ns.NamespaceSymbol, MessageID.IDS_SK_NAMESPACE.Localize(), MessageID.IDS_SK_VARIABLE.Localize()); 965Error(diagnostics, ErrorCode.ERR_BadSKknown, node, type.Type, MessageID.IDS_SK_TYPE.Localize(), MessageID.IDS_SK_VARIABLE.Localize()); 994var errorCode = GetRangeLvalueError(valueKind); 995if (errorCode is ErrorCode.ERR_InvalidAddrOp or ErrorCode.ERR_RefLocalOrParamExpected) 1011Error(diagnostics, ErrorCode.ERR_UnboxNotLValue, node); 1031Error(diagnostics, ErrorCode.ERR_RefLocalOrParamExpected, node); 1043Error(diagnostics, ErrorCode.ERR_RefLocalOrParamExpected, node); 1068Error(diagnostics, ErrorCode.ERR_RefLocalOrParamExpected, node); 1157Error(diagnostics, ErrorCode.ERR_RefLocalOrParamExpected, node); 1184Error(diagnostics, ErrorCode.ERR_RefLocalOrParamExpected, node); 1209Error(diagnostics, ErrorCode.ERR_RefLocalOrParamExpected, node); 1229var errorCode = GetThisLvalueError(valueKind, isValueType, isPrimaryConstructorParameter); 1230if (errorCode is ErrorCode.ERR_InvalidAddrOp or ErrorCode.ERR_IncrementLvalueExpected or ErrorCode.ERR_RefReturnThis or ErrorCode.ERR_RefLocalOrParamExpected or ErrorCode.ERR_RefLvalueExpected) 1245Error(diagnostics, ErrorCode.ERR_BadSKknown, expr.Syntax, ((BoundNamespaceExpression)expr).NamespaceSymbol, MessageID.IDS_SK_NAMESPACE.Localize(), MessageID.IDS_SK_VARIABLE.Localize()); 1253Error(diagnostics, ErrorCode.ERR_BadSKunknown, expr.Syntax, expr.Type, MessageID.IDS_SK_TYPE.Localize()); 1288Error(diagnostics, ErrorCode.WRN_AddressOfInAsync, node); 1292Error(diagnostics, ErrorCode.ERR_AddressOfInIterator, node); 1310diagnostics.Add(ErrorCode.WRN_AssignmentToLockOrDispose, local.Syntax.Location, localSymbol); 1326diagnostics.Add(ErrorCode.ERR_RefLocalOrParamExpected, node.Location); 1360Error(diagnostics, inUnsafeRegion ? ErrorCode.WRN_RefReturnLocal2 : ErrorCode.ERR_RefReturnLocal2, local.Syntax, localSymbol); 1364Error(diagnostics, inUnsafeRegion ? ErrorCode.WRN_RefReturnLocal : ErrorCode.ERR_RefReturnLocal, node, localSymbol); 1371Error(diagnostics, inUnsafeRegion ? ErrorCode.WRN_RefReturnNonreturnableLocal2 : ErrorCode.ERR_RefReturnNonreturnableLocal2, local.Syntax, localSymbol); 1375Error(diagnostics, inUnsafeRegion ? ErrorCode.WRN_RefReturnNonreturnableLocal : ErrorCode.ERR_RefReturnNonreturnableLocal, node, localSymbol); 1380Error(diagnostics, inUnsafeRegion ? ErrorCode.WRN_EscapeVariable : ErrorCode.ERR_EscapeVariable, node, localSymbol); 1404Error(diagnostics, ErrorCode.ERR_RefLocalOrParamExpected, node); 1444diagnostics.Add(ErrorCode.WRN_AssignmentToLockOrDispose, parameter.Syntax.Location, parameterSymbol.Name); 1458ErrorCode errorCode; 1462errorCode = ErrorCode.ERR_RefReturnReadonlyPrimaryConstructorParameter2; 1466errorCode = ErrorCode.ERR_RefReadonlyPrimaryConstructorParameter2; 1470errorCode = ErrorCode.ERR_AssgReadonlyPrimaryConstructorParameter2; 1477ErrorCode errorCode; 1481errorCode = ErrorCode.ERR_RefReturnReadonlyPrimaryConstructorParameter; 1485errorCode = ErrorCode.ERR_RefReadonlyPrimaryConstructorParameter; 1489errorCode = ErrorCode.ERR_AssgReadonlyPrimaryConstructorParameter; 1540Error(diagnostics, _inUnsafeRegion ? ErrorCode.WRN_EscapeVariable : ErrorCode.ERR_EscapeVariable, node, parameter); 1563Error(diagnostics, inUnsafeRegion ? ErrorCode.WRN_RefReturnStructThis : ErrorCode.ERR_RefReturnStructThis, node); 1570(checkingReceiver: true, isRefScoped: true, inUnsafeRegion: false, _) => (ErrorCode.ERR_RefReturnScopedParameter2, parameter.Syntax), 1571(checkingReceiver: true, isRefScoped: true, inUnsafeRegion: true, _) => (ErrorCode.WRN_RefReturnScopedParameter2, parameter.Syntax), 1572(checkingReceiver: true, isRefScoped: false, inUnsafeRegion: false, { IsReturnOnly: true }) => (ErrorCode.ERR_RefReturnOnlyParameter2, parameter.Syntax), 1573(checkingReceiver: true, isRefScoped: false, inUnsafeRegion: true, { IsReturnOnly: true }) => (ErrorCode.WRN_RefReturnOnlyParameter2, parameter.Syntax), 1574(checkingReceiver: true, isRefScoped: false, inUnsafeRegion: false, _) => (ErrorCode.ERR_RefReturnParameter2, parameter.Syntax), 1575(checkingReceiver: true, isRefScoped: false, inUnsafeRegion: true, _) => (ErrorCode.WRN_RefReturnParameter2, parameter.Syntax), 1576(checkingReceiver: false, isRefScoped: true, inUnsafeRegion: false, _) => (ErrorCode.ERR_RefReturnScopedParameter, node), 1577(checkingReceiver: false, isRefScoped: true, inUnsafeRegion: true, _) => (ErrorCode.WRN_RefReturnScopedParameter, node), 1578(checkingReceiver: false, isRefScoped: false, inUnsafeRegion: false, { IsReturnOnly: true }) => (ErrorCode.ERR_RefReturnOnlyParameter, node), 1579(checkingReceiver: false, isRefScoped: false, inUnsafeRegion: true, { IsReturnOnly: true }) => (ErrorCode.WRN_RefReturnOnlyParameter, node), 1580(checkingReceiver: false, isRefScoped: false, inUnsafeRegion: false, _) => (ErrorCode.ERR_RefReturnParameter, node), 1581(checkingReceiver: false, isRefScoped: false, inUnsafeRegion: true, _) => (ErrorCode.WRN_RefReturnParameter, node) 1645Error(diagnostics, ErrorCode.ERR_RefLocalOrParamExpected, node); 1876Error(diagnostics, ErrorCode.ERR_WinRtEventPassedByRef, eventSyntax); 1945Error(diagnostics, ErrorCode.ERR_ReturnNotLValue, callSyntaxOpt, methodSymbol); 1963Error(diagnostics, ErrorCode.ERR_RefLocalOrParamExpected, node); 1996Error(diagnostics, ErrorCode.ERR_ReturnNotLValue, expr.Syntax, propertySymbol); 2000Error(diagnostics, ErrorCode.ERR_RefProperty, node); 2027Error(diagnostics, ErrorCode.ERR_AssgReadonlyProp, node, propertySymbol); 2037Error(diagnostics, ErrorCode.ERR_AssignmentInitOnly, node, propertySymbol); 2058Error(diagnostics, ErrorCode.ERR_BadProtectedAccess, node, propertySymbol, accessThroughType, this.ContainingType); 2062Error(diagnostics, ErrorCode.ERR_InaccessibleSetter, node, propertySymbol); 2093Error(diagnostics, ErrorCode.ERR_PropertyLacksGet, node, propertySymbol); 2108Error(diagnostics, ErrorCode.ERR_BadProtectedAccess, node, propertySymbol, accessThroughType, this.ContainingType); 2112Error(diagnostics, ErrorCode.ERR_InaccessibleGetter, node, propertySymbol); 2133Error(diagnostics, ErrorCode.ERR_RefLocalOrParamExpected, node); 2204Error(diagnostics, ErrorCode.ERR_AbstractBaseCall, node, propertyOrEventSymbolOpt ?? member); 3105ErrorCode errorCode = GetStandardCallEscapeError(checkingReceiver); 3211Error(diagnostics, ErrorCode.ERR_CallArgMixing, syntax, symbolForReporting, parameterName); 3268Error(diagnostics, ErrorCode.ERR_CallArgMixing, syntax, symbolForReporting, parameterName); 3332private static ErrorCode GetStandardCallEscapeError(bool checkingReceiver) 3334return checkingReceiver ? ErrorCode.ERR_EscapeCall2 : ErrorCode.ERR_EscapeCall; 3443ErrorCode[] ReadOnlyLocalErrors = 3445ErrorCode.ERR_RefReadonlyLocalCause, 3446ErrorCode.ERR_AssgReadonlyLocalCause, 3448ErrorCode.ERR_RefReadonlyLocal2Cause, 3449ErrorCode.ERR_AssgReadonlyLocal2Cause 3457private static ErrorCode GetThisLvalueError(BindValueKind kind, bool isValueType, bool isPrimaryConstructorParameter) 3464return ErrorCode.ERR_AssgReadonlyLocal; 3467return ErrorCode.ERR_RefReadonlyLocal; 3470return ErrorCode.ERR_InvalidAddrOp; 3473return isValueType ? ErrorCode.ERR_AssgReadonlyLocal : ErrorCode.ERR_IncrementLvalueExpected; 3477return isPrimaryConstructorParameter ? ErrorCode.ERR_RefReturnPrimaryConstructorParameter : ErrorCode.ERR_RefReturnThis; 3480return ErrorCode.ERR_RefLocalOrParamExpected; 3485return ErrorCode.ERR_RefLvalueExpected; 3491private static ErrorCode GetRangeLvalueError(BindValueKind kind) 3499return ErrorCode.ERR_QueryRangeVariableReadOnly; 3502return ErrorCode.ERR_InvalidAddrOp; 3506return ErrorCode.ERR_RefReturnRangeVariable; 3509return ErrorCode.ERR_RefLocalOrParamExpected; 3514return ErrorCode.ERR_QueryOutRefRangeVariable; 3520private static ErrorCode GetMethodGroupOrFunctionPointerLvalueError(BindValueKind valueKind) 3524return ErrorCode.ERR_RefReadonlyLocalCause; 3528return ErrorCode.ERR_AssgReadonlyLocalCause; 3531private static ErrorCode GetStandardLvalueError(BindValueKind kind) 3538return ErrorCode.ERR_AssgLvalueExpected; 3541return ErrorCode.ERR_InvalidAddrOp; 3544return ErrorCode.ERR_IncrementLvalueExpected; 3547return ErrorCode.ERR_FixedNeedsLvalue; 3551return ErrorCode.ERR_RefReturnLvalueExpected; 3554return ErrorCode.ERR_RefLocalOrParamExpected; 3559return ErrorCode.ERR_RefLvalueExpected; 3568private static ErrorCode GetStandardRValueRefEscapeError(SafeContext escapeTo) 3572return ErrorCode.ERR_RefReturnLvalueExpected; 3575return ErrorCode.ERR_EscapeOther; 3591ErrorCode[] ReadOnlyErrors = 3593ErrorCode.ERR_RefReturnReadonly, 3594ErrorCode.ERR_RefReadonly, 3595ErrorCode.ERR_AssgReadonly, 3596ErrorCode.ERR_RefReturnReadonlyStatic, 3597ErrorCode.ERR_RefReadonlyStatic, 3598ErrorCode.ERR_AssgReadonlyStatic, 3599ErrorCode.ERR_RefReturnReadonly2, 3600ErrorCode.ERR_RefReadonly2, 3601ErrorCode.ERR_AssgReadonly2, 3602ErrorCode.ERR_RefReturnReadonlyStatic2, 3603ErrorCode.ERR_RefReadonlyStatic2, 3604ErrorCode.ERR_AssgReadonlyStatic2 3626Error(diagnostics, ErrorCode.ERR_InvalidAddrOp, node); 3632ErrorCode[] ReadOnlyErrors = 3634ErrorCode.ERR_RefReturnReadonlyNotField, 3635ErrorCode.ERR_RefReadonlyNotField, 3636ErrorCode.ERR_AssignReadonlyNotField, 3637ErrorCode.ERR_RefReturnReadonlyNotField2, 3638ErrorCode.ERR_RefReadonlyNotField2, 3639ErrorCode.ERR_AssignReadonlyNotField2, 5088Error(diagnostics, inUnsafeRegion ? ErrorCode.WRN_EscapeVariable : ErrorCode.ERR_EscapeVariable, node, expr.Syntax); 5097Error(diagnostics, inUnsafeRegion ? ErrorCode.WRN_EscapeVariable : ErrorCode.ERR_EscapeVariable, node, localSymbol); 5111Error(diagnostics, inUnsafeRegion ? ErrorCode.WRN_EscapeStackAlloc : ErrorCode.ERR_EscapeStackAlloc, node, expr.Type); 5370Error(diagnostics, ErrorCode.ERR_CollectionExpressionEscape, node, expr.Type); 5557diagnostics.Add(ErrorCode.ERR_InternalError, node.Location); 5834Error(diagnostics, _inUnsafeRegion ? ErrorCode.WRN_EscapeVariable : ErrorCode.ERR_EscapeVariable, initExpr.Syntax, expr.Syntax);
Binder\Binder.WithQueryLambdaParametersBinder.cs (1)
79var info = new CSDiagnosticInfo(ErrorCode.ERR_UnsupportedTransparentIdentifierAccess, name, new FormattedSymbol(receiver.ExpressionSymbol ?? receiverType, SymbolDisplayFormat.CSharpErrorMessageNoParameterNamesFormat));
Binder\BindingDiagnosticBag.cs (5)
154internal CSDiagnosticInfo Add(ErrorCode code, Location location) 161internal CSDiagnosticInfo Add(ErrorCode code, SyntaxNode syntax, params object[] args) 164internal CSDiagnosticInfo Add(ErrorCode code, SyntaxToken syntax, params object[] args) 167internal CSDiagnosticInfo Add(ErrorCode code, Location location, params object[] args) 174internal CSDiagnosticInfo Add(ErrorCode code, Location location, ImmutableArray<Symbol> symbols, params object[] args)
Binder\DecisionDagBuilder_CheckOrReachability.cs (5)
95/// and that <see cref="ErrorCode.WRN_RedundantPattern"/> is enabled at its location. 110const ErrorCode code = ErrorCode.WRN_RedundantPattern; 285diagnostics.Add(ErrorCode.WRN_RedundantPattern, node); 457diagnostics.Add(ErrorCode.HDN_RedundantPatternStackGuard, pattern.Syntax);
Binder\EarlyWellKnownAttributeBinder.cs (1)
49diagnostics.Add(ErrorCode.ERR_InternalError, node.Location);
Binder\ExecutableCodeBinder.cs (7)
118diagnostics.Add(ErrorCode.ERR_BadIteratorArgType, location); 123diagnostics.Add(ErrorCode.ERR_UnsafeIteratorArgType, parameter.GetFirstLocation()); 131diagnostics.Add(ErrorCode.ERR_VarargsIterator, errorLocation); 148Error(diagnostics, ErrorCode.ERR_BadIteratorReturnRef, errorLocation, iterator); 152Error(diagnostics, ErrorCode.ERR_BadIteratorReturn, errorLocation, iterator, returnType); 157Error(diagnostics, ErrorCode.ERR_IteratorRefLikeElementType, errorLocation); 163diagnostics.Add(ErrorCode.ERR_IteratorMustBeAsync, errorLocation, iterator, returnType);
Binder\ForEachLoopBinder.cs (33)
248Error(diagnostics, ErrorCode.ERR_RefLvalueExpected, collectionExpr.Syntax); 254Error(diagnostics, ErrorCode.ERR_RefLvalueExpected, collectionExpr.Syntax); 268diagnostics.Add(ErrorCode.ERR_BadGetAsyncEnumerator, expr.Location, getEnumeratorMethod.ReturnTypeWithAnnotations, getEnumeratorMethod); 330diagnostics.Add(ErrorCode.ERR_ScopedRefAndRefStructOnly, typeSyntax.Location); 400Error(diagnostics, ErrorCode.ERR_MustDeclareForeachIteration, variables); 418Error(diagnostics, ErrorCode.ERR_MustDeclareForeachIteration, variables); 488Error(diagnostics, ErrorCode.ERR_RefAssignmentMustHaveIdentityConversion, collectionExpr.Syntax, iterationVariableType.Type); 500diagnostics.Add(ErrorCode.ERR_AmbigUDConv, foreachKeyword.GetLocation(), originalUserDefinedConversions[0], originalUserDefinedConversions[1], inferredType.Type, iterationVariableType); 505diagnostics.Add(ErrorCode.ERR_NoExplicitConv, foreachKeyword.GetLocation(), distinguisher.First, distinguisher.Second); 825ErrorCode errorCode = (wrongAsync, isAsync, isSpread) switch 827(true, true, _) => ErrorCode.ERR_AwaitForEachMissingMemberWrongAsync, 828(true, false, _) => ErrorCode.ERR_ForEachMissingMemberWrongAsync, 829(false, true, _) => ErrorCode.ERR_AwaitForEachMissingMember, 830(false, false, true) => ErrorCode.ERR_SpreadMissingMember, 831(false, false, false) => ErrorCode.ERR_ForEachMissingMember, 881diagnostics.Add(ErrorCode.ERR_InlineArrayForEachNotSupported, collectionExpr.Syntax.GetLocation(), collectionExpr.Type); 929diagnostics.Add(ErrorCode.ERR_InlineArrayForEachNotSupported, collectionExpr.Syntax.GetLocation(), collectionExpr.Type); 959diagnostics.Add(ErrorCode.ERR_NullNotValid, collectionExpr.Syntax.Location); 964diagnostics.Add(ErrorCode.ERR_AnonMethGrpInForEach, collectionSyntax.Location, collectionExpr.Display); 981diagnostics.Add(ErrorCode.ERR_BadDynamicAwaitForEach, collectionSyntax.Location); 1011diagnostics.Add(ErrorCode.ERR_ForEachMissingMember, collectionSyntax.Location, unwrappedCollectionExprType, WellKnownMemberNames.GetEnumeratorMethodName); 1018diagnostics.Add(ErrorCode.ERR_AwaitForEachMissingMember, collectionSyntax.Location, unwrappedCollectionExprType, WellKnownMemberNames.GetAsyncEnumeratorMethodName); 1082diagnostics.Add(isAsync ? ErrorCode.ERR_BadGetAsyncEnumerator : ErrorCode.ERR_BadGetEnumerator, collectionSyntax.Location, getEnumeratorMethod.ReturnType, getEnumeratorMethod); 1098diagnostics.Add(isAsync ? ErrorCode.ERR_MultipleIAsyncEnumOfT : ErrorCode.ERR_MultipleIEnumOfT, errorLocationSyntax.Location, unwrappedCollectionExprType, 1133diagnostics.Add(ErrorCode.ERR_AwaitForEachMissingMember, collectionSyntax.Location, unwrappedCollectionExprType, WellKnownMemberNames.GetAsyncEnumeratorMethodName); 1283Error(diagnostics, ErrorCode.ERR_BadAllowByRefLikeEnumerator, expr.Syntax, enumeratorType); 1488diagnostics.Add(ErrorCode.WRN_PatternNotPublicOrNotInstance, collectionSyntax.Location, patternType, patternName.Localize(), result); 1524diagnostics.Add(ErrorCode.WRN_PatternIsAmbiguous, collectionSyntax.Location, patternType, MessageID.IDS_Collection.Localize(), 1622diagnostics.Add(ErrorCode.WRN_PatternIsAmbiguous, collectionSyntax.Location, collectionExpr.Type, MessageID.IDS_Collection.Localize(), 1781diagnostics.Add(ErrorCode.WRN_PatternBadSignature, collectionSyntax.Location, enumeratorType, MessageID.IDS_Collection.Localize(), patternMemberCandidate); 1959diagnostics.Add(ErrorCode.ERR_NoSuchMember, collectionSyntax.Location, patternType, memberName);
Binder\HostObjectModeBinder.cs (1)
40ErrorCode.ERR_NameNotInContextPossibleMissingReference,
Binder\InContainerBinder.cs (1)
117CSDiagnosticInfo diagInfo = new CSDiagnosticInfo(ErrorCode.ERR_ConflictAliasAndMember, name, _container);
Binder\InMethodBinder.cs (6)
259diagnostics.Add(ErrorCode.ERR_LocalIllegallyOverrides, newLocation, name); 275diagnostics.Add(ErrorCode.ERR_QueryRangeVariableOverrides, newLocation, name); 288diagnostics.Add(ErrorCode.ERR_LocalSameNameAsExtensionTypeParameter, newLocation, name); 293diagnostics.Add(ErrorCode.ERR_LocalSameNameAsTypeParam, newLocation, name); 311diagnostics.Add(ErrorCode.ERR_QueryRangeVariableSameAsTypeParam, newLocation, name); 317diagnostics.Add(ErrorCode.ERR_InternalError, newLocation);
Binder\LocalScopeBinder.cs (4)
516diagnostics.Add(ErrorCode.ERR_LocalDuplicate, newLocation, name); 527diagnostics.Add(ErrorCode.ERR_LocalIllegallyOverrides, newLocation, name); 532diagnostics.Add(ErrorCode.ERR_QueryRangeVariableOverrides, newLocation, name); 537diagnostics.Add(ErrorCode.ERR_InternalError, newLocation);
Binder\LockBinder.cs (5)
48Error(diagnostics, ErrorCode.ERR_LockNeedsReference, exprSyntax, expr.Display); 54Error(diagnostics, ErrorCode.ERR_LockNeedsReference, exprSyntax, exprType); 86Error(diagnostics, ErrorCode.ERR_MissingPredefinedMember, syntax, LockTypeFullName, WellKnownMemberNames.EnterScopeMethodName); 94Error(diagnostics, ErrorCode.ERR_MissingPredefinedMember, syntax, LockTypeFullName, WellKnownMemberNames.EnterScopeMethodName); 101Error(diagnostics, ErrorCode.ERR_MissingPredefinedMember, syntax, $"{LockTypeFullName}+{WellKnownMemberNames.LockScopeTypeName}", WellKnownMemberNames.DisposeMethodName);
Binder\LookupResult.cs (2)
187var diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_NonInvocableMemberCalled, unwrappedSymbol) : null; 204var diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_BadSKknown, unwrappedSymbol.Name, unwrappedSymbol.GetKindText(), MessageID.IDS_SK_TYPE.Localize()) : null;
Binder\RefSafetyAnalysis.cs (3)
1103Error(_diagnostics, ErrorCode.ERR_CallArgMixing, argument.Syntax, node.Constructor, parameter.Name); 1510private static void Error(BindingDiagnosticBag diagnostics, ErrorCode code, SyntaxNodeOrToken syntax, params object[] args) 1517private static void Error(BindingDiagnosticBag diagnostics, ErrorCode code, Location location, params object[] args)
Binder\Semantics\AccessCheck.cs (4)
697internal static ErrorCode GetProtectedMemberInSealedTypeError(NamedTypeSymbol containingType) 699return containingType.IsExtension ? ErrorCode.ERR_ProtectedInExtension 700: containingType.TypeKind == TypeKind.Struct ? ErrorCode.ERR_ProtectedInStruct 701: ErrorCode.WRN_ProtectedInSealed;
Binder\Semantics\Conversions\Conversions.cs (2)
367ErrorCode.ERR_ValueTypeExtDelegate, 378ErrorCode.ERR_DelegateOnNullable,
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (51)
497diagnostics.Add(ErrorCode.ERR_FunctionPointersCannotBeCalledWithNamedArguments, badName); 538ErrorCode.ERR_ParamsCollectionMissingConstructor : 539ErrorCode.ERR_CollectionExpressionMissingConstructor, 545diagnostics.Add(ErrorCode.ERR_CollectionExpressionMissingAdd, location, receiver.Type); 611(ErrorCode)diagInfo.Code, 622ErrorCode.ERR_WrongFuncPtrCallingConvention, 656ErrorCode.ERR_BadAccess, 685diagnostics.Add(ErrorCode.ERR_QueryNoProvider, location, receiverOpt.Type, symbol.Name); 689diagnostics.Add(ErrorCode.ERR_InitializerAddHasWrongSignature, location, symbol); 693diagnostics.Add(ErrorCode.ERR_BadAwaitArg, location, receiverOpt.Type); 697diagnostics.Add(ErrorCode.ERR_FuncPtrMethMustBeStatic, location, symbol); 701ErrorCode errorCode = 704? ErrorCode.ERR_FieldInitRefNonstatic 705: ErrorCode.ERR_ObjectRequired 706: ErrorCode.ERR_ObjectProhibited; 725diagnostics.Add(delegateOrFunctionPointerType.IsFunctionPointer() ? ErrorCode.ERR_FuncPtrRefMismatch : ErrorCode.ERR_DelegateRefMismatch, 734diagnostics.Add(ErrorCode.ERR_BadRetType, location, method, method.ReturnType); 781ErrorCode.ERR_CantInferMethTypeArgs, 805ErrorCode.ERR_CantInferMethTypeArgs, 812ErrorCode.ERR_NoSuchMemberOrExtension, 839ErrorCode.ERR_NamedArgumentUsedInPositional, 859ErrorCode.ERR_BadNonTrailingNamedArgument, 872diagnostics.Add(new CSDiagnosticInfo(ErrorCode.ERR_DuplicateNamedArgument, name), location); 900ErrorCode code = (object)delegateTypeBeingInvoked != null ? 901ErrorCode.ERR_BadNamedArgumentForDelegateInvoke : 902ErrorCode.ERR_BadNamedArgument; 952ErrorCode.ERR_NoCorrespondingArgument, 978(ErrorCode code, object target) = (typeContainingConstructor, delegateTypeBeingInvoked, functionPointerMethodBeingInvoked, isWithElementValidation) switch 980(object t, _, _, _) => (ErrorCode.ERR_BadCtorArgCount, t), 981(_, object t, _, _) => (ErrorCode.ERR_BadDelArgCount, t), 982(_, _, object t, _) => (ErrorCode.ERR_BadFuncPointerArgCount, t), 983(_, _, _, true) => (ErrorCode.ERR_BadCollectionArgumentsArgCount, name), 984_ => (ErrorCode.ERR_BadArgCount, name) 1164diagnostics.Add(ErrorCode.ERR_InitializerAddHasParamModifiers, location, symbols, method); 1171diagnostics.Add(ErrorCode.ERR_CollectionExpressionMissingAdd, location, receiver.Type); 1176diagnostics.Add(ErrorCode.ERR_BadArgTypesForCollectionAdd, location, symbols, method); 1219ErrorCode.ERR_BadArgType, 1268diagnostics.Add(ErrorCode.ERR_MissingAddressOf, sourceLocation); 1285ErrorCode.ERR_BadArgType, 1304diagnostics.Add(ErrorCode.ERR_ExpectedInterpolatedString, sourceLocation); 1310ErrorCode.ERR_BadArgExtraRefLangVersion, 1321ErrorCode.ERR_BadArgExtraRef, 1331ErrorCode.ERR_BadArgRef, 1352ErrorCode.ERR_BadInstanceArgType, 1373diagnostics.Add(ErrorCode.ERR_ExpectedInterpolatedString, sourceLocation); 1388ErrorCode.ERR_BadArgType, 1399ErrorCode.ERR_BadArgType, 1449diagnostics.Add(ErrorCode.ERR_QueryMultipleProviders, location, receiver.Type, name); 1558return new DiagnosticInfoWithSymbols(isExtension ? ErrorCode.ERR_AmbigExtension : ErrorCode.ERR_AmbigCall, [distinguisher.First, distinguisher.Second], symbols);
Binder\SwitchBinder_Patterns.cs (7)
35diagnostics.Add(ErrorCode.WRN_EmptySwitch, node.OpenBraceToken.GetLocation()); 112diagnostics.Add(ErrorCode.ERR_SwitchCaseSubsumed, p.Pattern.Location); 120diagnostics.Add(ErrorCode.ERR_DuplicateCaseLabel, syntax.Location, cp.ConstantValue.GetValueToDisplay()); 125diagnostics.Add(ErrorCode.ERR_SwitchCaseSubsumed, p.Value.Location); 216diagnostics.Add(ErrorCode.ERR_UsingVarInSwitchCase, statement.Location); 265diagnostics.Add(ErrorCode.ERR_DuplicateCaseLabel, node.Location, label.Name); 302diagnostics.Add(ErrorCode.WRN_CaseConstantNamedUnderscore, expression.Location);
Binder\SwitchBinder.cs (5)
267diagnostics.Add(ErrorCode.WRN_GotoCaseShouldConvert, node.Location, SwitchGoverningType); 450diagnostics.Add(ErrorCode.ERR_V6SwitchGoverningTypeValueExpected, node.Location); 465diagnostics.Add(ErrorCode.ERR_SwitchExpressionValueExpected, node.Location, switchGoverningExpression.Display); 529diagnostics.Add(ErrorCode.ERR_ConstantExpected, node.Location); 557diagnostics.Add(ErrorCode.ERR_LabelNotFound, node.Location, labelName);
Binder\SwitchExpressionBinder.cs (6)
80diagnostics.Add(ErrorCode.ERR_SwitchArmSubsumed, arm.Pattern.Syntax.Location); 107ErrorCode warningCode = 108requiresFalseWhenClause ? ErrorCode.WRN_SwitchExpressionNotExhaustiveWithWhen : 109unnamedEnumValue ? ErrorCode.WRN_SwitchExpressionNotExhaustiveWithUnnamedEnumValue : 110ErrorCode.WRN_SwitchExpressionNotExhaustive; 213diagnostics.Add(ErrorCode.ERR_BadPatternExpression, SwitchExpressionSyntax.GoverningExpression.Location, switchGoverningExpression.Display);
Binder\UsingStatementBinder.cs (5)
271ErrorCode errorCode = implementsAlternateIDisposable 272? (hasAwait ? ErrorCode.ERR_NoConvToIAsyncDispWrongAsync : ErrorCode.ERR_NoConvToIDispWrongAsync) 273: (hasAwait ? ErrorCode.ERR_NoConvToIAsyncDisp : ErrorCode.ERR_NoConvToIDisp);
Binder\WithLambdaParametersBinder.cs (4)
82diagnostics.Add(ErrorCode.ERR_YieldInAnonMeth, node.YieldKeyword.GetLocation()); 136diagnostics.Add(ErrorCode.ERR_LocalIllegallyOverrides, newLocation, name); 149diagnostics.Add(ErrorCode.ERR_QueryRangeVariableOverrides, newLocation, name); 154diagnostics.Add(ErrorCode.ERR_InternalError, newLocation);
BoundTree\BoundDiscardExpression.cs (1)
23Binder.Error(diagnosticsOpt, ErrorCode.ERR_DiscardTypeInferenceFailed, this.Syntax);
BoundTree\BoundTreeVisitors.cs (2)
175diagnostics.Add(ErrorCode.ERR_InsufficientStack, GetTooLongOrComplexExpressionErrorLocation(Node)); 180diagnostics.Add(ErrorCode.ERR_InsufficientStack, GetTooLongOrComplexExpressionErrorLocation(Node));
BoundTree\UnboundLambda.cs (3)
906diagnostics.Add(ErrorCode.ERR_AnonymousReturnExpected, lambdaSymbol.DiagnosticLocation, this.MessageID.Localize(), delegateType); 922diagnostics.Add(ErrorCode.ERR_CantConvAsyncAnonFuncReturns, lambdaSymbol.DiagnosticLocation, lambdaSymbol.MessageID.Localize(), delegateType); 1435if (ErrorFacts.PreventsSuccessfulDelegateConversion((ErrorCode)diagnostic.Code))
BoundTree\VariablePendingInference.cs (6)
17protected override ErrorCode InferenceFailedError => ErrorCode.ERR_TypeInferenceFailedForImplicitlyTypedDeconstructionVariable; 22protected override ErrorCode InferenceFailedError => ErrorCode.ERR_TypeInferenceFailedForImplicitlyTypedOutVariable; 69diagnosticsOpt.Add(ErrorCode.ERR_ScopedRefAndRefStructOnly, 139protected abstract ErrorCode InferenceFailedError { get; }
CodeGen\EmitConversion.cs (1)
425_diagnostics.Add(ErrorCode.ERR_BadDelegateConstructor, syntax.Location, delegateType);
CodeGen\EmitExpression.cs (2)
88_diagnostics.Add(ErrorCode.ERR_InsufficientStack, 2113_diagnostics.Add(ErrorCode.ERR_AbstractBaseCall, call.Syntax, actualMethodTargetedByTheCall);
CodeGen\EmitStatement.cs (3)
387_diagnostics.Add(ErrorCode.ERR_InsufficientStack, 711_diagnostics.Add(ErrorCode.ERR_ModuleEmitFailure, block.Syntax.Location, ((Cci.INamedEntity)_module).Name, "Exception handling is not allowed in exception filters"); 940_diagnostics.Add(ErrorCode.ERR_ModuleEmitFailure, statement.Syntax.Location, ((Cci.INamedEntity)_module).Name, "Exception handling is not allowed in exception filters");
CommandLine\CSharpCommandLineParser.cs (106)
157AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, "<text>", name.ToString()); 212AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, MessageID.IDS_Text.Localize(), "/langversion:"); 218AddDiagnostic(diagnostics, ErrorCode.ERR_LanguageVersionCannotHaveLeadingZeroes, value); 226AddDiagnostic(diagnostics, ErrorCode.ERR_BadCompatMode, value); 239AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsNumber, nameMemory.ToString()); 245AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsNumber, nameMemory.ToString()); 325AddDiagnostic(diagnostics, ErrorCode.ERR_StdInOptionProvidedButConsoleInputIsNotRedirected); 367AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, "<text>", arg); 380AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, "<text>", name); 387AddDiagnostic(diagnostics, ErrorCode.FTL_BadCodepage, value); 398AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, "<text>", name); 404AddDiagnostic(diagnostics, ErrorCode.FTL_BadChecksumAlgorithm, value); 432AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsNumber, name); 439AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsNumber, name); 454AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, MessageID.IDS_Text.Localize(), name); 478AddDiagnostic(diagnostics, ErrorCode.ERR_BadNullableContextOption, value); 508AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, "<text>", name); 533AddDiagnostic(diagnostics, ErrorCode.ERR_MissingGuidForOption, "<text>", name); 540AddDiagnostic(diagnostics, ErrorCode.ERR_InvalidFormatForGuidForOption, value, name); 550AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, "<text>", arg); 569AddDiagnostic(diagnostics, ErrorCode.WRN_BadUILang, value); 584AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, "<path>", name); 596AddDiagnostic(diagnostics, ErrorCode.ERR_NoFileSpec, arg); 609AddDiagnostic(diagnostics, ErrorCode.ERR_NoFileSpec, arg); 635AddDiagnostic(diagnostics, ErrorCode.FTL_InvalidTarget); 650AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, "<text>", arg); 655AddDiagnostic(diagnostics, ErrorCode.ERR_InvalidAssemblyName, "<text>", arg); 668AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, MessageID.IDS_Text.Localize(), "modulename"); 682AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, "<string>", arg); 699AddDiagnostic(diagnostics, ErrorCode.ERR_NoFileSpec, arg); 716AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, MessageID.IDS_Text.Localize(), arg); 729AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, MessageID.IDS_Text.Localize(), arg); 737AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, MessageID.IDS_Text.Localize(), "/doc:"); // Different argument. 749AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, MessageID.IDS_Text.Localize(), "/addmodule:"); 753AddDiagnostic(diagnostics, ErrorCode.ERR_NoFileSpec, arg); 822AddDiagnostic(diagnostics, ErrorCode.ERR_NoFileSpec, arg); 839AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, MessageID.IDS_Text.Localize(), name); 855AddDiagnostic(diagnostics, ErrorCode.ERR_BadDebugType, value); 950AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsNumber, name); 971AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsNumber, name); 998AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsNumber, name); 1006AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsNumber, name); 1010AddDiagnostic(diagnostics, ErrorCode.ERR_BadWarningLevel); 1075AddDiagnostic(diagnostics, ErrorCode.ERR_NoFileSpec, "keyfile"); 1096AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, MessageID.IDS_Text.Localize(), "keycontainer"); 1140AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsNumber, name); 1144AddDiagnostic(diagnostics, ErrorCode.ERR_BadBaseNumber, value); 1158AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, MessageID.IDS_Text.Localize(), "subsystemversion"); 1170AddDiagnostic(diagnostics, ErrorCode.ERR_InvalidSubsystemVersion, value); 1179AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, MessageID.IDS_Text.Localize(), "touchedfiles"); 1207AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, "<text>", name); 1241AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsNumber, name); 1245AddDiagnostic(diagnostics, ErrorCode.ERR_InvalidFileAlignment, value); 1249AddDiagnostic(diagnostics, ErrorCode.ERR_InvalidFileAlignment, value); 1261AddDiagnostic(diagnostics, ErrorCode.ERR_NoFileSpec, arg); 1314AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, ErrorLogOptionFormat, RemoveQuotesAndSlashes(arg)); 1321AddDiagnostic(diagnostics, ErrorCode.ERR_BadSwitchValue, valueMemory.Value.ToString(), "/errorlog:", ErrorLogOptionFormat); 1330AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, ":<text>", RemoveQuotesAndSlashes(arg)); 1342AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, "<text>", name); 1356AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, "<file list>", name); 1371AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, "<file list>", name); 1406AddDiagnostic(diagnostics, ErrorCode.ERR_StdInOptionProvidedButConsoleInputIsNotRedirected); 1423AddDiagnostic(diagnostics, ErrorCode.ERR_BadSwitch, arg); 1439AddDiagnostic(diagnostics, diagnosticOptions, ErrorCode.ERR_NoRefOutWhenRefOnly); 1444AddDiagnostic(diagnostics, diagnosticOptions, ErrorCode.ERR_NoNetModuleOutputWhenRefOutOrRefOnly); 1449AddDiagnostic(diagnostics, diagnosticOptions, ErrorCode.WRN_NoSources); 1466AddDiagnostic(diagnostics, ErrorCode.ERR_BadBaseNumber, string.Format("0x{0:X}", baseAddress)); 1490AddDiagnostic(diagnostics, ErrorCode.ERR_NoOutputDirectory); 1505AddDiagnostic(diagnostics, ErrorCode.ERR_SourceLinkRequiresPdb); 1515AddDiagnostic(diagnostics, ErrorCode.ERR_CannotEmbedWithoutPdb); 1600diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_CompilationOptionNotAvailable, 1666AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, MessageID.IDS_PathList.Localize(), switchName); 1675AddDiagnostic(diagnostics, ErrorCode.WRN_InvalidSearchPathDir, path, origin.Localize(), MessageID.IDS_DirectoryHasInvalidPath.Localize()); 1679AddDiagnostic(diagnostics, ErrorCode.WRN_InvalidSearchPathDir, path, origin.Localize(), MessageID.IDS_DirectoryDoesNotExist.Localize()); 1692AddDiagnostic(diagnostics, ErrorCode.ERR_NoFileSpec, arg); 1699AddDiagnostic(diagnostics, ErrorCode.ERR_NoFileSpec, arg); 1729AddDiagnostic(diagnostics, ErrorCode.ERR_OutputNeedsName); 1743AddDiagnostic(diagnostics, ErrorCode.FTL_InvalidInputFileName, outputFileName); 1754AddDiagnostic(diagnostics, ErrorCode.FTL_InvalidInputFileName, outputFileName); 1769AddDiagnostic(diagnostics, ErrorCode.ERR_AssemblyNameOnNonModule); 1823outputDiagnostics.Add(Diagnostic.Create(CSharp.MessageProvider.Instance, (int)ErrorCode.WRN_DefineIdentifierRequired, valueMemory.ToString())); 1855outputDiagnostics.Add(Diagnostic.Create(CSharp.MessageProvider.Instance, (int)ErrorCode.WRN_DefineIdentifierRequired, id)); 1883AddDiagnostic(diagnostics, ErrorCode.ERR_BadPlatformType, value); 1911AddDiagnostic(diagnostics, ErrorCode.FTL_InvalidTarget); 1920AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, MessageID.IDS_Namespace1.Localize(), arg); 1934AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, MessageID.IDS_Text.Localize(), arg); 1939AddDiagnostic(diagnostics, ErrorCode.ERR_NoFileSpec, arg); 1961AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, MessageID.IDS_Text.Localize(), arg); 1968AddDiagnostic(diagnostics, ErrorCode.ERR_NoFileSpec, arg); 1993AddDiagnostic(diagnostics, ErrorCode.ERR_BadExternIdentifier, alias); 2029AddDiagnostic(diagnostics, ErrorCode.ERR_OneAliasPerReference); 2035AddDiagnostic(diagnostics, ErrorCode.ERR_AliasMissingFile, alias); 2047AddDiagnostic(diagnostics, ErrorCode.ERR_CantHaveWin32ResAndIcon); 2052AddDiagnostic(diagnostics, ErrorCode.ERR_CantHaveWin32ResAndManifest); 2058AddDiagnostic(diagnostics, ErrorCode.WRN_CantHaveManifestForModule); 2074AddDiagnostic(diagnostics, ErrorCode.ERR_InvalidInstrumentationKind, kind); 2102AddDiagnostic(diagnostics, ErrorCode.ERR_BadResourceVis, rawAccessibility ?? ""); 2106AddDiagnostic(diagnostics, ErrorCode.ERR_NoFileSpec, argName); 2111AddDiagnostic(diagnostics, ErrorCode.FTL_InvalidInputFileName, filePath); 2143ids.Add(CSharp.MessageProvider.Instance.GetIdForErrorCode((int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotation)); 2144ids.Add(CSharp.MessageProvider.Instance.GetIdForErrorCode((int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotationInGeneratedCode)); 2150ErrorFacts.IsWarning((ErrorCode)number)) 2192AddDiagnostic(diagnostics, ErrorCode.WRN_UnimplementedCommandLineSwitch, "/" + switchName); 2200private static void AddDiagnostic(IList<Diagnostic> diagnostics, ErrorCode errorCode) 2205private static void AddDiagnostic(IList<Diagnostic> diagnostics, ErrorCode errorCode, params object[] arguments) 2213private static void AddDiagnostic(IList<Diagnostic> diagnostics, Dictionary<string, ReportDiagnostic> warningOptions, ErrorCode errorCode, params object[] arguments)
CommandLine\CSharpCompiler.cs (8)
107diagnostics.Add(new DiagnosticInfo(MessageProvider, (int)ErrorCode.WRN_FileAlreadyIncluded, 141diagnostics.Add(new DiagnosticInfo(MessageProvider, (int)ErrorCode.ERR_CantReadConfigFile, appConfigPath, ex.Message)); 362(int)ErrorCode.ERR_NoSourceFile, 386{ Code: (int)ErrorCode.ERR_BadAccess, Arguments: [Symbol s] } => s, 387{ Code: (int)ErrorCode.ERR_InaccessibleGetter, Arguments: [Symbol s] } => s, 388{ Code: (int)ErrorCode.ERR_InaccessibleSetter, Arguments: [Symbol s] } => s, 389{ Code: (int)ErrorCode.ERR_ImplicitImplementationOfInaccessibleInterfaceMember, Arguments: [_, Symbol s, _] } => s, 401new CSDiagnosticInfo(ErrorCode.ERR_SymbolDefinedInAssembly, symbol, symbol.ContainingAssembly),
Compilation\CSharpCompilation.cs (32)
626diagnostics.Add(ErrorCode.ERR_DebugEntryPointNotSourceMethodDefinition, Location.None); 1872ErrorCode.ERR_GlobalSingleTypeNameNotFound, 1974diagnostics.Add(ErrorCode.ERR_SimpleProgramNotAnExecutable, simpleProgramEntryPointSymbol.ReturnTypeSyntax.Location); 2026diagnostics.Add(ErrorCode.WRN_MainIgnored, NoLocation.Singleton, mainTypeName); 2033diagnostics.Add(ErrorCode.ERR_BadCompilationOptionValue, NoLocation.Singleton, nameof(CSharpCompilationOptions.MainTypeName), mainTypeName); 2040diagnostics.Add(ErrorCode.ERR_MainClassNotFound, NoLocation.Singleton, mainTypeName); 2047diagnostics.Add(ErrorCode.ERR_MainClassNotClass, mainTypeOrNamespace.GetFirstLocation(), mainTypeOrNamespace); 2068diagnostics.Add(ErrorCode.WRN_MainIgnored, main.GetFirstLocation(), main); 2096noMainFoundDiagnostics.Add(ErrorCode.WRN_InvalidMainSig, candidate.GetFirstLocation(), candidate); 2104noMainFoundDiagnostics.Add(ErrorCode.WRN_MainCantBeGeneric, candidate.GetFirstLocation(), candidate); 2127diagnostics.Add(ErrorCode.ERR_NonTaskMainCantBeAsync, candidate.GetFirstLocation()); 2160ErrorCode.WRN_SyncAndAsyncEntryPoints, 2188if (diagnostic.Code == (int)ErrorCode.WRN_InvalidMainSig || diagnostic.Code == (int)ErrorCode.WRN_MainCantBeGeneric) 2202diagnostics.Add(ErrorCode.ERR_NoEntryPoint, NoLocation.Singleton); 2206diagnostics.Add(ErrorCode.ERR_NoMainInClass, mainType.GetFirstLocation(), mainType); 2217diagnostics.Add(ErrorCode.ERR_EntryPointCannotBeUnmanagedCallersOnly, viableEntryPoint.GetFirstLocation()); 2225ErrorCode.ERR_MultipleEntryPoints, 2373=> code == (int)ErrorCode.ERR_NoTypeDef; 2782ErrorCode code = info.Kind == SyntaxKind.ExternAliasDirective 2783? ErrorCode.HDN_UnusedExternAlias 2784: ErrorCode.HDN_UnusedUsingDirective; 3110builder.Add(new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_CompilationOptionNotAvailable, 3117builder.Add(new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_CompilationOptionNotAvailable, 3124builder.Add(ErrorCode.WRN_DeprecatedFeatureFlag, Location.None, 3678excludeDiagnostics.Add((int)ErrorCode.ERR_ConcreteMissingBody); 3698diagnostics.Add(ErrorCode.ERR_ModuleEmitFailure, NoLocation.Singleton, ((Cci.INamedEntity)moduleBeingBuilt).Name, 3849_diagnostics.Add(ErrorCode.ERR_FileTypeNonUniquePath, location, symbol, filePath); 3883diagnostics.Add(ErrorCode.ERR_DuplicateInterceptor, attributeLocation); 3973diagnostics.Add(new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, m), NoLocation.Singleton); 4017runtimeMDVersionDiagnostics.Add(ErrorCode.WRN_NoRuntimeMetadataVersion, NoLocation.Singleton); 4081diagnostics.Add(ErrorCode.WRN_ConflictingChecksum, new SourceLocation(checksumDirective), path);
Compilation\CSharpCompilerDiagnosticAnalyzer.cs (4)
23var errorCodes = Enum.GetValues(typeof(ErrorCode)); 25foreach (ErrorCode errorCode in errorCodes) 29errorCode is not (ErrorCode.Void or ErrorCode.Unknown))
Compilation\CSharpDiagnosticFilter.cs (11)
20private static readonly ErrorCode[] s_alinkWarnings = { ErrorCode.WRN_ConflictingMachineAssembly, 21ErrorCode.WRN_RefCultureMismatch, 22ErrorCode.WRN_InvalidVersionFormat }; 76if (s_alinkWarnings.Contains((ErrorCode)d.Code) && 77specificDiagnosticOptions.Keys.Contains(CSharp.MessageProvider.Instance.GetIdForErrorCode((int)ErrorCode.WRN_ALinkWarn))) 79reportAction = GetDiagnosticReport(ErrorFacts.GetSeverity(ErrorCode.WRN_ALinkWarn), 82CSharp.MessageProvider.Instance.GetIdForErrorCode((int)ErrorCode.WRN_ALinkWarn), 83ErrorFacts.GetWarningLevel(ErrorCode.WRN_ALinkWarn), 322if (!isSpecified && errorCode is (int)ErrorCode.WRN_Experimental or (int)ErrorCode.WRN_ExperimentalWithMessage)
Compilation\SyntaxAndDeclarationManager.cs (2)
221(int)ErrorCode.ERR_SourceFileReferencesNotSupported, 231(int)ErrorCode.ERR_NoSourceFile,
Compiler\ClsComplianceChecker.cs (41)
132this.AddDiagnostic(ErrorCode.WRN_CLS_NotOnModules, warningLocation); 136this.AddDiagnostic(ErrorCode.WRN_CLS_NotOnModules2, warningLocation); 155this.AddDiagnostic(ErrorCode.WRN_CLS_ModuleMissingCLS, warningLocation); 260this.AddDiagnostic(ErrorCode.WRN_CLS_BadAttributeType, symbol.GetFirstLocation(), symbol); 335this.AddDiagnostic(ErrorCode.WRN_CLS_NoVarArgs, symbol.GetFirstLocation()); 350this.AddDiagnostic(ErrorCode.ERR_AttributeNotOnAccessor, attributeLocation, attribute.AttributeClass.Name, attributeUsage.GetValidTargetsErrorArgument()); 414this.AddDiagnostic(ErrorCode.WRN_CLS_VolatileField, symbol.GetFirstLocation(), symbol); 460this.AddDiagnostic(ErrorCode.WRN_CLS_MeaninglessOnPrivateType, symbol.GetFirstLocation(), symbol); 504this.AddDiagnostic(ErrorCode.WRN_CLS_BadInterfaceMember, symbol.GetFirstLocation(), symbol); 508this.AddDiagnostic(ErrorCode.WRN_CLS_NoAbstractMembers, symbol.GetFirstLocation(), symbol); 525this.AddDiagnostic(ErrorCode.WRN_CLS_BadInterface, symbol.GetFirstLocation(), symbol, interfaceType); 536this.AddDiagnostic(ErrorCode.WRN_CLS_BadBase, symbol.GetFirstLocation(), symbol, baseType); 549this.AddDiagnostic(ErrorCode.WRN_CLS_IllegalTrueInFalse, symbol.GetFirstLocation(), symbol, containingType); 566this.AddDiagnostic(ErrorCode.WRN_CLS_BadTypeVar, typeParameter.GetFirstLocation(), constraintType.Type); 580this.AddDiagnostic(ErrorCode.WRN_CLS_BadArgType, parameter.GetFirstLocation(), parameter.Type); 612this.AddDiagnostic(ErrorCode.WRN_CLS_ArrayArgumentToAttribute, warningLocation); 628this.AddDiagnostic(ErrorCode.WRN_CLS_ArrayArgumentToAttribute, warningLocation); 646this.AddDiagnostic(ErrorCode.WRN_CLS_ArrayArgumentToAttribute, warningLocation); 697this.AddDiagnostic(ErrorCode.WRN_CLS_MeaninglessOnParam, attributeLocation); 707this.AddDiagnostic(ErrorCode.WRN_CLS_MeaninglessOnReturn, attributeLocation); 715ErrorCode code; 720code = ErrorCode.WRN_CLS_BadFieldPropType; 724code = ErrorCode.WRN_CLS_BadFieldPropType; 728code = ErrorCode.WRN_CLS_BadFieldPropType; 732code = ErrorCode.WRN_CLS_BadReturnType; 792ErrorCode code = IsTrue(compliance) 793? ErrorCode.WRN_CLS_AssemblyNotCLS 794: ErrorCode.WRN_CLS_AssemblyNotCLS2; 896this.AddDiagnostic(ErrorCode.WRN_CLS_BadIdentifierCase, symbol.GetFirstLocation(), symbol); 909ErrorCode code; 921this.AddDiagnostic(ErrorCode.WRN_CLS_BadIdentifierCase, symbol.GetFirstLocation(), symbol); 956this.AddDiagnostic(ErrorCode.WRN_CLS_BadIdentifier, symbol.GetFirstLocation(), name); 1253private void AddDiagnostic(ErrorCode code, Location location) 1260private void AddDiagnostic(ErrorCode code, Location location, params object[] args) 1316private static bool TryGetCollisionErrorCode(Symbol x, Symbol y, out ErrorCode code) 1323code = ErrorCode.Void; 1410sawArrayOfArraysDifference ? ErrorCode.WRN_CLS_OverloadUnnamed : 1411sawArrayRankDifference ? ErrorCode.WRN_CLS_OverloadRefOut : // Lumping rank difference with refkind is odd, but matches dev11. 1412sawRefKindDifference ? ErrorCode.WRN_CLS_OverloadRefOut : 1413ErrorCode.Void; 1415return code != ErrorCode.Void;
Compiler\DocumentationCommentCompiler.cs (13)
111diagnostics.Add(ErrorCode.ERR_DocFileGen, Location.None, e.Message); 451_diagnostics.Add(ErrorCode.WRN_MissingXMLComment, location, symbol); 591_diagnostics.Add(ErrorCode.WRN_MissingParamTag, location, parameter.Name, symbol); 611_diagnostics.Add(ErrorCode.WRN_MissingTypeParamTag, location, typeParameter, symbol); 700_diagnostics.Add(ErrorCode.WRN_XMLParseError, location, GetDescription(e)); 889if ((ErrorCode)diag.Code == ErrorCode.WRN_XMLParseError) 1311diagnostics.Add(ErrorCode.WRN_UnmatchedParamTag, identifier.Location, identifier); 1314diagnostics.Add(ErrorCode.WRN_UnmatchedParamRefTag, identifier.Location, identifier, memberSymbol); 1317diagnostics.Add(ErrorCode.WRN_UnmatchedTypeParamTag, identifier.Location, identifier); 1320diagnostics.Add(ErrorCode.WRN_UnmatchedTypeParamRefTag, identifier.Location, identifier, memberSymbol); 1341diagnostics.Add(ErrorCode.WRN_DuplicateParamTag, syntax.Location, identifier); 1351diagnostics.Add(ErrorCode.WRN_DuplicateTypeParamTag, syntax.Location, identifier);
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (7)
283_diagnostics.Add(ErrorCode.WRN_FailedInclude, location, filePathValue, xpathValue, new LocalizableErrorArgument(MessageID.IDS_OperationCausedStackOverflow)); 304includeDiagnostics.Add(ErrorCode.WRN_InvalidInclude, location, subMessage); 315includeDiagnostics.Add(ErrorCode.WRN_FailedInclude, location, filePathValue, xpathValue, new CodeAnalysisResourcesLocalizableErrorArgument(nameof(CodeAnalysisResources.XmlReferencesNotSupported))); 325includeDiagnostics.Add(ErrorCode.WRN_FailedInclude, location, filePathValue, xpathValue, new CodeAnalysisResourcesLocalizableErrorArgument(nameof(CodeAnalysisResources.FileNotFound))); 346includeDiagnostics.Add(ErrorCode.WRN_FailedInclude, location, filePathValue, xpathValue, e.Message); 358includeDiagnostics.Add(ErrorCode.WRN_FailedInclude, location, filePathValue, xpathValue, errorMessage); 405includeDiagnostics.Add(ErrorCode.WRN_XMLParseIncludeError, errorLocation, GetDescription(e)); //NOTE: location is in included file.
Compiler\MethodBodySynthesizer.cs (1)
368diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_MissingPredefinedMember,
Compiler\MethodCompiler.cs (3)
206diagnostics.Add(ErrorCode.ERR_ModuleEmitFailure, NoLocation.Singleton, ((Cci.INamedEntity)moduleBeingBuiltOpt).Name!, 1744diagnosticsForThisMethod.Add(ErrorCode.ERR_TooManyLocals, method.GetFirstLocation()); 1920ErrorCode.ERR_StaticConstructorWithExplicitConstructorCall,
Compiler\TypeCompilationState.cs (1)
232diagnostics.Add(ErrorCode.ERR_IndirectRecursiveConstructorCall, syntax.Location, method1);
Compiler\UnprocessedDocumentationCommentFinder.cs (1)
104_diagnostics.Add(ErrorCode.WRN_UnprocessedXMLComment, new SourceLocation(trivia.SyntaxTree, new TextSpan(start, length)));
CSharpCompilationOptions.cs (12)
759builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_NoMainOnDLL)); 764builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_BadCompilationOptionValue, nameof(MainTypeName), MainTypeName)); 770builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_BadPlatformType, Platform.ToString())); 775MetadataHelpers.CheckAssemblyOrModuleName(ModuleName, MessageProvider.Instance, (int)ErrorCode.ERR_BadModuleName, builder); 780builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_BadCompilationOptionValue, nameof(OutputKind), OutputKind.ToString())); 785builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_BadCompilationOptionValue, nameof(OptimizationLevel), OptimizationLevel.ToString())); 790builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_BadCompilationOptionValue, nameof(ScriptClassName), ScriptClassName ?? "null")); 795builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_BadCompilationOptionValue, nameof(WarningLevel), WarningLevel)); 800builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_BadCompilationOptionValue, nameof(Usings), Usings.Where(u => !u.IsValidClrNamespaceName()).First() ?? "null")); 805builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_BadPrefer32OnLib)); 810builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_BadCompilationOptionValue, nameof(MetadataImportOptions), MetadataImportOptions.ToString())); 815builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_BadCompilationOptionValueAccepted, nameof(MemorySafetyRulesVersion), MemorySafetyRulesVersion, string.Join(", ", [(int)MemorySafetyRulesVersion.Version1, (int)MemorySafetyRulesVersion.Version2])));
CSharpParseOptions.cs (3)
254builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_BadLanguageVersion, LanguageVersion.ToString())); 263builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_InvalidPreprocessingSymbol, "null")); 267builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_InvalidPreprocessingSymbol, symbol));
Declarations\DeclarationTreeBuilder.cs (12)
197bag.Add(ErrorCode.ERR_SimpleProgramIsEmpty, ((EmptyStatementSyntax)firstGlobalStatement.Statement).SemicolonToken.GetLocation()); 451diagnostics.Add(ErrorCode.ERR_GlobalUsingOutOfOrder, directive.GlobalKeyword.GetLocation()); 537diagnostics.Add(ErrorCode.ERR_MultipleFileScopedNamespace, node.Name.GetLocation()); 546diagnostics.Add(ErrorCode.ERR_FileScopedAndNormalNamespace, node.Name.GetLocation()); 564diagnostics.Add(ErrorCode.ERR_FileScopedNamespaceNotBeforeAllMembers, node.Name.GetLocation()); 576diagnostics.Add(ErrorCode.ERR_FileScopedAndNormalNamespace, node.Name.GetLocation()); 583diagnostics.Add(ErrorCode.ERR_UnexpectedGenericName, node.Name.GetLocation()); 588diagnostics.Add(ErrorCode.ERR_UnexpectedAliasedName, node.Name.GetLocation()); 593diagnostics.Add(ErrorCode.ERR_BadModifiersOnNamespace, node.AttributeLists[0].GetLocation()); 598diagnostics.Add(ErrorCode.ERR_BadModifiersOnNamespace, node.Modifiers[0].GetLocation()); 605diagnostics.Add(ErrorCode.ERR_GlobalUsingInNamespace, directive.GlobalKeyword.GetLocation()); 770diagnostics.Add(ErrorCode.ERR_UnexpectedParameterList, node.ParameterList.GetLocation());
DocumentationComments\SourceDocumentationCommentUtils.cs (1)
81diagnostics.Add(ErrorCode.WRN_UnprocessedXMLComment, new SourceLocation(tree, new TextSpan(start, length)));
Emitter\EditAndContinue\EmitHelpers.cs (2)
106diagnostics.Add(ErrorCode.ERR_ModuleEmitFailure, NoLocation.Singleton, compilation.AssemblyName, e.Message); 180ErrorCode.ERR_ModuleEmitFailure,
Emitter\EditAndContinue\PEDeltaAssemblyBuilder.cs (1)
268diagnostics.Add(new CSDiagnosticInfo(ErrorCode.ERR_EncNoPIAReference, embeddedType.AdaptedSymbol), Location.None);
Emitter\Model\AttributeDataAdapter.cs (1)
46context.Diagnostics.Add(ErrorCode.ERR_NotAnAttributeClass, context.Location ?? NoLocation.Singleton, this.AttributeClass);
Emitter\Model\PEAssemblyBuilder.cs (3)
162context.Diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_CryptoHashFailed), NoLocation.Singleton)); 199diagnostics.Add(new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, modules[i]), NoLocation.Singleton); 686diagnostics.Add(ErrorCode.ERR_TypeReserved, userDefinedAttribute.GetFirstLocation(), description.FullName);
Emitter\Model\PEModuleBuilder.cs (10)
179diagnostics.Add(new CSDiagnosticInfo(ErrorCode.WRN_ReferencedAssemblyDoesNotHaveStrongName, assembly), NoLocation.Singleton); 186diagnostics.Add(new CSDiagnosticInfo(ErrorCode.WRN_RefCultureMismatch, assembly, refIdentity.CultureName), NoLocation.Singleton); 205diagnostics.Add(new CSDiagnosticInfo(ErrorCode.WRN_ConflictingMachineAssembly, assembly), NoLocation.Singleton); 748diagnostics.Add(ErrorCode.ERR_ExportedTypeConflictsWithDeclaration, NoLocation.Singleton, type, type.ContainingModule); 752diagnostics.Add(ErrorCode.ERR_ForwardedTypeConflictsWithDeclaration, NoLocation.Singleton, type); 768diagnostics.Add(ErrorCode.ERR_ExportedTypesConflict, NoLocation.Singleton, type, type.ContainingModule, contender, contender.ContainingModule); 773diagnostics.Add(ErrorCode.ERR_ForwardedTypeConflictsWithExportedType, NoLocation.Singleton, type, type.ContainingAssembly, contender, contender.ContainingModule); 778diagnostics.Add(ErrorCode.ERR_ForwardedTypesConflict, NoLocation.Singleton, type, type.ContainingAssembly, contender, contender.ContainingAssembly); 1143diagnostics.Add(new CSDiagnostic(diagInfo ?? new CSDiagnosticInfo(ErrorCode.ERR_BogusType, string.Empty), syntaxNodeOpt == null ? NoLocation.Singleton : syntaxNodeOpt.Location)); 1260new CSDiagnosticInfo(ErrorCode.ERR_PredefinedValueTupleTypeMustBeStruct, namedTypeSymbol.MetadataName),
Emitter\NoPia\EmbeddedEvent.cs (2)
110EmbeddedTypesManager.Error(diagnostics, ErrorCode.ERR_MissingSourceInterface, syntaxNodeOpt, underlyingContainingType, UnderlyingEvent.AdaptedEventSymbol); 119EmbeddedTypesManager.Error(diagnostics, ErrorCode.ERR_MissingMethodOnSourceInterface, syntaxNodeOpt, sourceInterface, UnderlyingEvent.AdaptedEventSymbol.MetadataName, UnderlyingEvent.AdaptedEventSymbol);
Emitter\NoPia\EmbeddedType.cs (1)
291EmbeddedTypesManager.Error(diagnostics, ErrorCode.ERR_InteropTypeMissingAttribute, syntaxNodeOpt, UnderlyingNamedType.AdaptedNamedTypeSymbol, description.FullName);
Emitter\NoPia\EmbeddedTypesManager.cs (17)
259Error(diagnostics, ErrorCode.ERR_InteropTypesWithSameNameAndGuid, null, 268Error(diagnostics, ErrorCode.ERR_LocalTypeNameClash, null, 291Error(diagnostics, ErrorCode.WRN_ReferencedAssemblyReferencesLinkedPIA, null, 317ErrorCode error = ErrorCode.Unknown; 328error = ErrorCode.ERR_DefaultInterfaceImplementationInNoPIAType; 333error = ErrorCode.ERR_ReAbstractionInNoPIAType; 339if (error != ErrorCode.Unknown) 353error = ErrorCode.ERR_NoPIANestedType; 361error = ErrorCode.ERR_GenericsUsedInNoPIAType; 368error = ErrorCode.ERR_NewCoClassOnLink; 372if (error != ErrorCode.Unknown) 381private static void ReportNotEmbeddableSymbol(ErrorCode error, Symbol symbol, SyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics, EmbeddedTypesManager optTypeManager) 390internal static void Error(DiagnosticBag diagnostics, ErrorCode code, SyntaxNode syntaxOpt, params object[] args) 513ReportNotEmbeddableSymbol(ErrorCode.ERR_InteropStructContainsMethods, field.AdaptedFieldSymbol.ContainingType, syntaxNodeOpt, diagnostics, this); 548ReportNotEmbeddableSymbol(ErrorCode.ERR_InteropStructContainsMethods, type.UnderlyingNamedType.AdaptedNamedTypeSymbol, syntaxNodeOpt, diagnostics, this); 555Error(diagnostics, ErrorCode.ERR_InteropMethodWithBody, syntaxNodeOpt, method.AdaptedMethodSymbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat));
Errors\CSDiagnosticInfo.cs (8)
19public static readonly DiagnosticInfo VoidDiagnosticInfo = new CSDiagnosticInfo(ErrorCode.Void); 23internal CSDiagnosticInfo(ErrorCode code) 28internal CSDiagnosticInfo(ErrorCode code, params object[] args) 33internal CSDiagnosticInfo(ErrorCode code, ImmutableArray<Symbol> symbols, object[] args) 38internal CSDiagnosticInfo(ErrorCode code, object[] args, ImmutableArray<Symbol> symbols, ImmutableArray<Location> additionalLocations) 42Debug.Assert(code != ErrorCode.ERR_InternalError); 58internal new ErrorCode Code => (ErrorCode)base.Code;
Errors\CSharpDiagnosticFormatter.cs (1)
17return diagnostic.Descriptor.HelpLinkUri == ErrorFacts.GetHelpLink((ErrorCode)diagnostic.Code);
Errors\DiagnosticBagExtensions.cs (3)
21internal static CSDiagnosticInfo Add(this DiagnosticBag diagnostics, ErrorCode code, Location location) 37internal static CSDiagnosticInfo Add(this DiagnosticBag diagnostics, ErrorCode code, Location location, params object[] args) 45internal static CSDiagnosticInfo Add(this DiagnosticBag diagnostics, ErrorCode code, Location location, ImmutableArray<Symbol> symbols, params object[] args)
Errors\DiagnosticInfoWithSymbols.cs (2)
16internal DiagnosticInfoWithSymbols(ErrorCode errorCode, object[] arguments, ImmutableArray<Symbol> symbols) 22internal DiagnosticInfoWithSymbols(bool isWarningAsError, ErrorCode errorCode, object[] arguments, ImmutableArray<Symbol> symbols)
Errors\ErrorFacts.cs (2448)
21private static readonly Lazy<ImmutableDictionary<ErrorCode, string>> s_categoriesMap = new Lazy<ImmutableDictionary<ErrorCode, string>>(CreateCategoriesMap); 28nullableWarnings.Add(GetId(ErrorCode.WRN_NullReferenceAssignment)); 29nullableWarnings.Add(GetId(ErrorCode.WRN_NullReferenceReceiver)); 30nullableWarnings.Add(GetId(ErrorCode.WRN_NullReferenceReturn)); 31nullableWarnings.Add(GetId(ErrorCode.WRN_NullReferenceArgument)); 32nullableWarnings.Add(GetId(ErrorCode.WRN_UninitializedNonNullableField)); 33nullableWarnings.Add(GetId(ErrorCode.WRN_NullabilityMismatchInAssignment)); 34nullableWarnings.Add(GetId(ErrorCode.WRN_NullabilityMismatchInArgument)); 35nullableWarnings.Add(GetId(ErrorCode.WRN_NullabilityMismatchInArgumentForOutput)); 36nullableWarnings.Add(GetId(ErrorCode.WRN_NullabilityMismatchInReturnTypeOfTargetDelegate)); 37nullableWarnings.Add(GetId(ErrorCode.WRN_NullabilityMismatchInParameterTypeOfTargetDelegate)); 38nullableWarnings.Add(GetId(ErrorCode.WRN_NullAsNonNullable)); 39nullableWarnings.Add(GetId(ErrorCode.WRN_NullableValueTypeMayBeNull)); 40nullableWarnings.Add(GetId(ErrorCode.WRN_NullabilityMismatchInTypeParameterConstraint)); 41nullableWarnings.Add(GetId(ErrorCode.WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint)); 42nullableWarnings.Add(GetId(ErrorCode.WRN_NullabilityMismatchInTypeParameterNotNullConstraint)); 43nullableWarnings.Add(GetId(ErrorCode.WRN_ThrowPossibleNull)); 44nullableWarnings.Add(GetId(ErrorCode.WRN_UnboxPossibleNull)); 45nullableWarnings.Add(GetId(ErrorCode.WRN_SwitchExpressionNotExhaustiveForNull)); 46nullableWarnings.Add(GetId(ErrorCode.WRN_SwitchExpressionNotExhaustiveForNullWithWhen)); 48nullableWarnings.Add(GetId(ErrorCode.WRN_ConvertingNullableToNonNullable)); 49nullableWarnings.Add(GetId(ErrorCode.WRN_DisallowNullAttributeForbidsMaybeNullAssignment)); 50nullableWarnings.Add(GetId(ErrorCode.WRN_ParameterConditionallyDisallowsNull)); 52nullableWarnings.Add(GetId(ErrorCode.WRN_NullabilityMismatchInTypeOnOverride)); 53nullableWarnings.Add(GetId(ErrorCode.WRN_NullabilityMismatchInReturnTypeOnOverride)); 54nullableWarnings.Add(GetId(ErrorCode.WRN_NullabilityMismatchInReturnTypeOnPartial)); 55nullableWarnings.Add(GetId(ErrorCode.WRN_NullabilityMismatchInParameterTypeOnOverride)); 56nullableWarnings.Add(GetId(ErrorCode.WRN_NullabilityMismatchInParameterTypeOnPartial)); 57nullableWarnings.Add(GetId(ErrorCode.WRN_NullabilityMismatchInTypeOnImplicitImplementation)); 58nullableWarnings.Add(GetId(ErrorCode.WRN_NullabilityMismatchInReturnTypeOnImplicitImplementation)); 59nullableWarnings.Add(GetId(ErrorCode.WRN_NullabilityMismatchInParameterTypeOnImplicitImplementation)); 60nullableWarnings.Add(GetId(ErrorCode.WRN_NullabilityMismatchInTypeOnExplicitImplementation)); 61nullableWarnings.Add(GetId(ErrorCode.WRN_NullabilityMismatchInReturnTypeOnExplicitImplementation)); 62nullableWarnings.Add(GetId(ErrorCode.WRN_NullabilityMismatchInParameterTypeOnExplicitImplementation)); 63nullableWarnings.Add(GetId(ErrorCode.WRN_NullabilityMismatchInConstraintsOnImplicitImplementation)); 64nullableWarnings.Add(GetId(ErrorCode.WRN_NullabilityMismatchInExplicitlyImplementedInterface)); 65nullableWarnings.Add(GetId(ErrorCode.WRN_NullabilityMismatchInInterfaceImplementedByBase)); 66nullableWarnings.Add(GetId(ErrorCode.WRN_DuplicateInterfaceWithNullabilityMismatchInBaseList)); 67nullableWarnings.Add(GetId(ErrorCode.WRN_NullabilityMismatchInConstraintsOnPartialImplementation)); 68nullableWarnings.Add(GetId(ErrorCode.WRN_NullReferenceInitializer)); 69nullableWarnings.Add(GetId(ErrorCode.WRN_ShouldNotReturn)); 70nullableWarnings.Add(GetId(ErrorCode.WRN_DoesNotReturnMismatch)); 71nullableWarnings.Add(GetId(ErrorCode.WRN_TopLevelNullabilityMismatchInParameterTypeOnExplicitImplementation)); 72nullableWarnings.Add(GetId(ErrorCode.WRN_TopLevelNullabilityMismatchInParameterTypeOnImplicitImplementation)); 73nullableWarnings.Add(GetId(ErrorCode.WRN_TopLevelNullabilityMismatchInParameterTypeOnOverride)); 74nullableWarnings.Add(GetId(ErrorCode.WRN_TopLevelNullabilityMismatchInReturnTypeOnExplicitImplementation)); 75nullableWarnings.Add(GetId(ErrorCode.WRN_TopLevelNullabilityMismatchInReturnTypeOnImplicitImplementation)); 76nullableWarnings.Add(GetId(ErrorCode.WRN_TopLevelNullabilityMismatchInReturnTypeOnOverride)); 77nullableWarnings.Add(GetId(ErrorCode.WRN_MemberNotNull)); 78nullableWarnings.Add(GetId(ErrorCode.WRN_MemberNotNullBadMember)); 79nullableWarnings.Add(GetId(ErrorCode.WRN_MemberNotNullWhen)); 80nullableWarnings.Add(GetId(ErrorCode.WRN_ParameterDisallowsNull)); 81nullableWarnings.Add(GetId(ErrorCode.WRN_ParameterNotNullIfNotNull)); 82nullableWarnings.Add(GetId(ErrorCode.WRN_ReturnNotNullIfNotNull)); 83nullableWarnings.Add(GetId(ErrorCode.WRN_NullabilityMismatchInReturnTypeOnInterceptor)); 84nullableWarnings.Add(GetId(ErrorCode.WRN_NullabilityMismatchInParameterTypeOnInterceptor)); 86nullableWarnings.Add(GetId(ErrorCode.WRN_UninitializedNonNullableBackingField)); 91private static string GetId(ErrorCode errorCode) 96private static ImmutableDictionary<ErrorCode, string> CreateCategoriesMap() 98var map = new Dictionary<ErrorCode, string>() 106internal static DiagnosticSeverity GetSeverity(ErrorCode code) 108if (code == ErrorCode.Void) 112else if (code == ErrorCode.Unknown) 143public static string GetMessage(ErrorCode code, CultureInfo culture) 150public static LocalizableResourceString GetMessageFormat(ErrorCode code) 155public static LocalizableResourceString GetTitle(ErrorCode code) 160public static LocalizableResourceString GetDescription(ErrorCode code) 165public static string GetHelpLink(ErrorCode code) 170public static string GetCategory(ErrorCode code) 194s_resourceManager = new System.Resources.ResourceManager(typeof(CSharpResources).FullName, typeof(ErrorCode).GetTypeInfo().Assembly); 201internal static int GetWarningLevel(ErrorCode code) 213case ErrorCode.WRN_UnassignedInternalRefField: 217case ErrorCode.WRN_InterceptsLocationAttributeUnsupportedSignature: 221case ErrorCode.WRN_AddressOfInAsync: 222case ErrorCode.WRN_ByValArraySizeConstRequired: 226case ErrorCode.WRN_LowerCaseTypeName: 230case ErrorCode.WRN_PartialMethodTypeDifference: 234case ErrorCode.WRN_NubExprIsConstBool2: 235case ErrorCode.WRN_StaticInAsOrIs: 236case ErrorCode.WRN_PrecedenceInversion: 237case ErrorCode.WRN_UseDefViolationPropertyUnsupportedVersion: 238case ErrorCode.WRN_UseDefViolationFieldUnsupportedVersion: 239case ErrorCode.WRN_UnassignedThisAutoPropertyUnsupportedVersion: 240case ErrorCode.WRN_UnassignedThisUnsupportedVersion: 241case ErrorCode.WRN_ParamUnassigned: 242case ErrorCode.WRN_UseDefViolationProperty: 243case ErrorCode.WRN_UseDefViolationField: 244case ErrorCode.WRN_UseDefViolationThisUnsupportedVersion: 245case ErrorCode.WRN_UseDefViolationOut: 246case ErrorCode.WRN_UseDefViolation: 247case ErrorCode.WRN_SyncAndAsyncEntryPoints: 248case ErrorCode.WRN_ParameterIsStaticClass: 249case ErrorCode.WRN_ReturnTypeIsStaticClass: 253case ErrorCode.WRN_InvalidMainSig: 254case ErrorCode.WRN_LowercaseEllSuffix: 255case ErrorCode.WRN_NewNotRequired: 256case ErrorCode.WRN_MainCantBeGeneric: 257case ErrorCode.WRN_ProtectedInSealed: 258case ErrorCode.WRN_UnassignedInternalField: 259case ErrorCode.WRN_MissingParamTag: 260case ErrorCode.WRN_MissingXMLComment: 261case ErrorCode.WRN_MissingTypeParamTag: 262case ErrorCode.WRN_InvalidVersionFormat: 264case ErrorCode.WRN_UnreferencedEvent: 265case ErrorCode.WRN_DuplicateUsing: 266case ErrorCode.WRN_UnreferencedVar: 267case ErrorCode.WRN_UnreferencedField: 268case ErrorCode.WRN_UnreferencedVarAssg: 269case ErrorCode.WRN_UnreferencedLocalFunction: 270case ErrorCode.WRN_SequentialOnPartialClass: 271case ErrorCode.WRN_UnreferencedFieldAssg: 272case ErrorCode.WRN_AmbiguousXMLReference: 273case ErrorCode.WRN_PossibleMistakenNullStatement: 274case ErrorCode.WRN_EqualsWithoutGetHashCode: 275case ErrorCode.WRN_EqualityOpWithoutEquals: 276case ErrorCode.WRN_EqualityOpWithoutGetHashCode: 277case ErrorCode.WRN_IncorrectBooleanAssg: 278case ErrorCode.WRN_BitwiseOrSignExtend: 279case ErrorCode.WRN_TypeParameterSameAsOuterTypeParameter: 280case ErrorCode.WRN_InvalidAssemblyName: 281case ErrorCode.WRN_UnifyReferenceBldRev: 282case ErrorCode.WRN_AssignmentToSelf: 283case ErrorCode.WRN_ComparisonToSelf: 284case ErrorCode.WRN_IsDynamicIsConfusing: 285case ErrorCode.WRN_DebugFullNameTooLong: 286case ErrorCode.WRN_PdbLocalNameTooLong: 287case ErrorCode.WRN_RecordEqualsWithoutGetHashCode: 289case ErrorCode.WRN_NewRequired: 290case ErrorCode.WRN_NewOrOverrideExpected: 291case ErrorCode.WRN_UnreachableCode: 292case ErrorCode.WRN_UnreferencedLabel: 293case ErrorCode.WRN_NegativeArrayIndex: 294case ErrorCode.WRN_BadRefCompareLeft: 295case ErrorCode.WRN_BadRefCompareRight: 296case ErrorCode.WRN_PatternIsAmbiguous: 297case ErrorCode.WRN_PatternNotPublicOrNotInstance: 298case ErrorCode.WRN_PatternBadSignature: 299case ErrorCode.WRN_SameFullNameThisNsAgg: 300case ErrorCode.WRN_SameFullNameThisAggAgg: 301case ErrorCode.WRN_SameFullNameThisAggNs: 302case ErrorCode.WRN_GlobalAliasDefn: 303case ErrorCode.WRN_AlwaysNull: 304case ErrorCode.WRN_CmpAlwaysFalse: 305case ErrorCode.WRN_GotoCaseShouldConvert: 306case ErrorCode.WRN_NubExprIsConstBool: 307case ErrorCode.WRN_ExplicitImplCollision: 308case ErrorCode.WRN_DeprecatedSymbolStr: 309case ErrorCode.WRN_VacuousIntegralComp: 310case ErrorCode.WRN_AssignmentToLockOrDispose: 311case ErrorCode.WRN_DeprecatedCollectionInitAddStr: 312case ErrorCode.WRN_DeprecatedCollectionInitAdd: 313case ErrorCode.WRN_DuplicateParamTag: 314case ErrorCode.WRN_UnmatchedParamTag: 315case ErrorCode.WRN_UnprocessedXMLComment: 316case ErrorCode.WRN_InvalidSearchPathDir: 317case ErrorCode.WRN_UnifyReferenceMajMin: 318case ErrorCode.WRN_DuplicateTypeParamTag: 319case ErrorCode.WRN_UnmatchedTypeParamTag: 320case ErrorCode.WRN_UnmatchedParamRefTag: 321case ErrorCode.WRN_UnmatchedTypeParamRefTag: 322case ErrorCode.WRN_CantHaveManifestForModule: 323case ErrorCode.WRN_DynamicDispatchToConditionalMethod: 324case ErrorCode.WRN_NoSources: 325case ErrorCode.WRN_CLS_MeaninglessOnPrivateType: 326case ErrorCode.WRN_CLS_AssemblyNotCLS2: 327case ErrorCode.WRN_MainIgnored: 328case ErrorCode.WRN_UnqualifiedNestedTypeInCref: 329case ErrorCode.WRN_NoRuntimeMetadataVersion: 331case ErrorCode.WRN_IsAlwaysTrue: 332case ErrorCode.WRN_IsAlwaysFalse: 333case ErrorCode.WRN_ByRefNonAgileField: 334case ErrorCode.WRN_VolatileByRef: 335case ErrorCode.WRN_FinalizeMethod: 336case ErrorCode.WRN_DeprecatedSymbol: 337case ErrorCode.WRN_ExternMethodNoImplementation: 338case ErrorCode.WRN_AttributeLocationOnBadDeclaration: 339case ErrorCode.WRN_InvalidAttributeLocation: 340case ErrorCode.WRN_NonObsoleteOverridingObsolete: 341case ErrorCode.WRN_CoClassWithoutComImport: 342case ErrorCode.WRN_ObsoleteOverridingNonObsolete: 343case ErrorCode.WRN_ExternCtorNoImplementation: 344case ErrorCode.WRN_WarningDirective: 345case ErrorCode.WRN_UnreachableGeneralCatch: 346case ErrorCode.WRN_DefaultValueForUnconsumedLocation: 347case ErrorCode.WRN_EmptySwitch: 348case ErrorCode.WRN_XMLParseError: 349case ErrorCode.WRN_BadXMLRef: 350case ErrorCode.WRN_BadXMLRefParamType: 351case ErrorCode.WRN_BadXMLRefReturnType: 352case ErrorCode.WRN_BadXMLRefSyntax: 353case ErrorCode.WRN_FailedInclude: 354case ErrorCode.WRN_InvalidInclude: 355case ErrorCode.WRN_XMLParseIncludeError: 356case ErrorCode.WRN_ALinkWarn: 357case ErrorCode.WRN_AssemblyAttributeFromModuleIsOverridden: 358case ErrorCode.WRN_CmdOptionConflictsSource: 359case ErrorCode.WRN_IllegalPragma: 360case ErrorCode.WRN_IllegalPPWarning: 361case ErrorCode.WRN_BadRestoreNumber: 362case ErrorCode.WRN_NonECMAFeature: 363case ErrorCode.WRN_ErrorOverride: 364case ErrorCode.WRN_MultiplePredefTypes: 365case ErrorCode.WRN_TooManyLinesForDebugger: 366case ErrorCode.WRN_CallOnNonAgileField: 367case ErrorCode.WRN_InvalidNumber: 368case ErrorCode.WRN_IllegalPPChecksum: 369case ErrorCode.WRN_EndOfPPLineExpected: 370case ErrorCode.WRN_ConflictingChecksum: 371case ErrorCode.WRN_DotOnDefault: 372case ErrorCode.WRN_BadXMLRefTypeVar: 373case ErrorCode.WRN_ReferencedAssemblyReferencesLinkedPIA: 374case ErrorCode.WRN_MultipleRuntimeImplementationMatches: 375case ErrorCode.WRN_MultipleRuntimeOverrideMatches: 376case ErrorCode.WRN_FileAlreadyIncluded: 377case ErrorCode.WRN_NoConfigNotOnCommandLine: 378case ErrorCode.WRN_AnalyzerCannotBeCreated: 379case ErrorCode.WRN_NoAnalyzerInAssembly: 380case ErrorCode.WRN_UnableToLoadAnalyzer: 381case ErrorCode.WRN_DefineIdentifierRequired: 382case ErrorCode.WRN_CLS_NoVarArgs: 383case ErrorCode.WRN_CLS_BadArgType: 384case ErrorCode.WRN_CLS_BadReturnType: 385case ErrorCode.WRN_CLS_BadFieldPropType: 386case ErrorCode.WRN_CLS_BadIdentifierCase: 387case ErrorCode.WRN_CLS_OverloadRefOut: 388case ErrorCode.WRN_CLS_OverloadUnnamed: 389case ErrorCode.WRN_CLS_BadIdentifier: 390case ErrorCode.WRN_CLS_BadBase: 391case ErrorCode.WRN_CLS_BadInterfaceMember: 392case ErrorCode.WRN_CLS_NoAbstractMembers: 393case ErrorCode.WRN_CLS_NotOnModules: 394case ErrorCode.WRN_CLS_ModuleMissingCLS: 395case ErrorCode.WRN_CLS_AssemblyNotCLS: 396case ErrorCode.WRN_CLS_BadAttributeType: 397case ErrorCode.WRN_CLS_ArrayArgumentToAttribute: 398case ErrorCode.WRN_CLS_NotOnModules2: 399case ErrorCode.WRN_CLS_IllegalTrueInFalse: 400case ErrorCode.WRN_CLS_MeaninglessOnParam: 401case ErrorCode.WRN_CLS_MeaninglessOnReturn: 402case ErrorCode.WRN_CLS_BadTypeVar: 403case ErrorCode.WRN_CLS_VolatileField: 404case ErrorCode.WRN_CLS_BadInterface: 405case ErrorCode.WRN_UnobservedAwaitableExpression: 406case ErrorCode.WRN_CallerLineNumberParamForUnconsumedLocation: 407case ErrorCode.WRN_CallerFilePathParamForUnconsumedLocation: 408case ErrorCode.WRN_CallerMemberNameParamForUnconsumedLocation: 409case ErrorCode.WRN_CallerFilePathPreferredOverCallerMemberName: 410case ErrorCode.WRN_CallerLineNumberPreferredOverCallerMemberName: 411case ErrorCode.WRN_CallerLineNumberPreferredOverCallerFilePath: 412case ErrorCode.WRN_DelaySignButNoKey: 413case ErrorCode.WRN_UnimplementedCommandLineSwitch: 414case ErrorCode.WRN_DeprecatedFeatureFlag: 415case ErrorCode.WRN_BadUILang: 416case ErrorCode.WRN_RefCultureMismatch: 417case ErrorCode.WRN_ConflictingMachineAssembly: 418case ErrorCode.WRN_FilterIsConstantTrue: 419case ErrorCode.WRN_FilterIsConstantFalse: 420case ErrorCode.WRN_FilterIsConstantFalseRedundantTryCatch: 421case ErrorCode.WRN_IdentifierOrNumericLiteralExpected: 422case ErrorCode.WRN_ReferencedAssemblyDoesNotHaveStrongName: 423case ErrorCode.WRN_AlignmentMagnitude: 424case ErrorCode.WRN_AttributeIgnoredWhenPublicSigning: 425case ErrorCode.WRN_TupleLiteralNameMismatch: 426case ErrorCode.WRN_WindowsExperimental: 427case ErrorCode.WRN_AttributesOnBackingFieldsNotAvailable: 428case ErrorCode.WRN_TupleBinopLiteralNameMismatch: 429case ErrorCode.WRN_TypeParameterSameAsOuterMethodTypeParameter: 430case ErrorCode.WRN_ConvertingNullableToNonNullable: 431case ErrorCode.WRN_NullReferenceAssignment: 432case ErrorCode.WRN_NullReferenceReceiver: 433case ErrorCode.WRN_NullReferenceReturn: 434case ErrorCode.WRN_NullReferenceArgument: 435case ErrorCode.WRN_NullabilityMismatchInTypeOnOverride: 436case ErrorCode.WRN_NullabilityMismatchInReturnTypeOnOverride: 437case ErrorCode.WRN_NullabilityMismatchInReturnTypeOnPartial: 438case ErrorCode.WRN_NullabilityMismatchInParameterTypeOnOverride: 439case ErrorCode.WRN_NullabilityMismatchInParameterTypeOnPartial: 440case ErrorCode.WRN_NullabilityMismatchInConstraintsOnPartialImplementation: 441case ErrorCode.WRN_NullabilityMismatchInTypeOnImplicitImplementation: 442case ErrorCode.WRN_NullabilityMismatchInReturnTypeOnImplicitImplementation: 443case ErrorCode.WRN_NullabilityMismatchInParameterTypeOnImplicitImplementation: 444case ErrorCode.WRN_DuplicateInterfaceWithNullabilityMismatchInBaseList: 445case ErrorCode.WRN_NullabilityMismatchInInterfaceImplementedByBase: 446case ErrorCode.WRN_NullabilityMismatchInExplicitlyImplementedInterface: 447case ErrorCode.WRN_NullabilityMismatchInTypeOnExplicitImplementation: 448case ErrorCode.WRN_NullabilityMismatchInReturnTypeOnExplicitImplementation: 449case ErrorCode.WRN_NullabilityMismatchInParameterTypeOnExplicitImplementation: 450case ErrorCode.WRN_UninitializedNonNullableField: 451case ErrorCode.WRN_NullabilityMismatchInAssignment: 452case ErrorCode.WRN_NullabilityMismatchInArgument: 453case ErrorCode.WRN_NullabilityMismatchInArgumentForOutput: 454case ErrorCode.WRN_NullabilityMismatchInReturnTypeOfTargetDelegate: 455case ErrorCode.WRN_NullabilityMismatchInParameterTypeOfTargetDelegate: 456case ErrorCode.WRN_NullAsNonNullable: 457case ErrorCode.WRN_NullableValueTypeMayBeNull: 458case ErrorCode.WRN_NullabilityMismatchInTypeParameterConstraint: 459case ErrorCode.WRN_MissingNonNullTypesContextForAnnotation: 460case ErrorCode.WRN_MissingNonNullTypesContextForAnnotationInGeneratedCode: 461case ErrorCode.WRN_NullabilityMismatchInConstraintsOnImplicitImplementation: 462case ErrorCode.WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint: 463case ErrorCode.WRN_SwitchExpressionNotExhaustive: 464case ErrorCode.WRN_IsTypeNamedUnderscore: 465case ErrorCode.WRN_GivenExpressionNeverMatchesPattern: 466case ErrorCode.WRN_GivenExpressionAlwaysMatchesConstant: 467case ErrorCode.WRN_SwitchExpressionNotExhaustiveWithUnnamedEnumValue: 468case ErrorCode.WRN_CaseConstantNamedUnderscore: 469case ErrorCode.WRN_ThrowPossibleNull: 470case ErrorCode.WRN_UnboxPossibleNull: 471case ErrorCode.WRN_SwitchExpressionNotExhaustiveForNull: 472case ErrorCode.WRN_ImplicitCopyInReadOnlyMember: 473case ErrorCode.WRN_UnconsumedEnumeratorCancellationAttributeUsage: 474case ErrorCode.WRN_UndecoratedCancellationTokenParameter: 475case ErrorCode.WRN_NullabilityMismatchInTypeParameterNotNullConstraint: 476case ErrorCode.WRN_DisallowNullAttributeForbidsMaybeNullAssignment: 477case ErrorCode.WRN_ParameterConditionallyDisallowsNull: 478case ErrorCode.WRN_NullReferenceInitializer: 479case ErrorCode.WRN_ShouldNotReturn: 480case ErrorCode.WRN_DoesNotReturnMismatch: 481case ErrorCode.WRN_TopLevelNullabilityMismatchInReturnTypeOnOverride: 482case ErrorCode.WRN_TopLevelNullabilityMismatchInParameterTypeOnOverride: 483case ErrorCode.WRN_TopLevelNullabilityMismatchInReturnTypeOnImplicitImplementation: 484case ErrorCode.WRN_TopLevelNullabilityMismatchInParameterTypeOnImplicitImplementation: 485case ErrorCode.WRN_TopLevelNullabilityMismatchInReturnTypeOnExplicitImplementation: 486case ErrorCode.WRN_TopLevelNullabilityMismatchInParameterTypeOnExplicitImplementation: 487case ErrorCode.WRN_ConstOutOfRangeChecked: 488case ErrorCode.WRN_MemberNotNull: 489case ErrorCode.WRN_MemberNotNullBadMember: 490case ErrorCode.WRN_MemberNotNullWhen: 491case ErrorCode.WRN_GeneratorFailedDuringInitialization: 492case ErrorCode.WRN_GeneratorFailedDuringGeneration: 493case ErrorCode.WRN_ParameterDisallowsNull: 494case ErrorCode.WRN_GivenExpressionAlwaysMatchesPattern: 495case ErrorCode.WRN_IsPatternAlways: 496case ErrorCode.WRN_SwitchExpressionNotExhaustiveWithWhen: 497case ErrorCode.WRN_SwitchExpressionNotExhaustiveForNullWithWhen: 498case ErrorCode.WRN_RecordNamedDisallowed: 499case ErrorCode.WRN_ParameterNotNullIfNotNull: 500case ErrorCode.WRN_ReturnNotNullIfNotNull: 501case ErrorCode.WRN_AnalyzerReferencesFramework: 502case ErrorCode.WRN_UnreadRecordParameter: 503case ErrorCode.WRN_DoNotCompareFunctionPointers: 504case ErrorCode.WRN_CallerArgumentExpressionParamForUnconsumedLocation: 505case ErrorCode.WRN_CallerLineNumberPreferredOverCallerArgumentExpression: 506case ErrorCode.WRN_CallerFilePathPreferredOverCallerArgumentExpression: 507case ErrorCode.WRN_CallerMemberNamePreferredOverCallerArgumentExpression: 508case ErrorCode.WRN_CallerArgumentExpressionAttributeHasInvalidParameterName: 509case ErrorCode.WRN_CallerArgumentExpressionAttributeSelfReferential: 510case ErrorCode.WRN_ParameterOccursAfterInterpolatedStringHandlerParameter: 511case ErrorCode.WRN_InterpolatedStringHandlerArgumentAttributeIgnoredOnLambdaParameters: 512case ErrorCode.WRN_CompileTimeCheckedOverflow: 513case ErrorCode.WRN_MethGrpToNonDel: 514case ErrorCode.WRN_UseDefViolationPropertySupportedVersion: 515case ErrorCode.WRN_UseDefViolationFieldSupportedVersion: 516case ErrorCode.WRN_UseDefViolationThisSupportedVersion: 517case ErrorCode.WRN_UnassignedThisAutoPropertySupportedVersion: 518case ErrorCode.WRN_UnassignedThisSupportedVersion: 519case ErrorCode.WRN_ObsoleteMembersShouldNotBeRequired: 520case ErrorCode.WRN_AnalyzerReferencesNewerCompiler: 521case ErrorCode.WRN_DuplicateAnalyzerReference: 522case ErrorCode.WRN_ScopedMismatchInParameterOfTarget: 523case ErrorCode.WRN_ScopedMismatchInParameterOfOverrideOrImplementation: 524case ErrorCode.WRN_ManagedAddr: 525case ErrorCode.WRN_EscapeVariable: 526case ErrorCode.WRN_EscapeStackAlloc: 527case ErrorCode.WRN_RefReturnNonreturnableLocal: 528case ErrorCode.WRN_RefReturnNonreturnableLocal2: 529case ErrorCode.WRN_RefReturnStructThis: 530case ErrorCode.WRN_RefAssignNarrower: 531case ErrorCode.WRN_MismatchedRefEscapeInTernary: 532case ErrorCode.WRN_RefReturnParameter: 533case ErrorCode.WRN_RefReturnScopedParameter: 534case ErrorCode.WRN_RefReturnParameter2: 535case ErrorCode.WRN_RefReturnScopedParameter2: 536case ErrorCode.WRN_RefReturnLocal: 537case ErrorCode.WRN_RefReturnLocal2: 538case ErrorCode.WRN_RefAssignReturnOnly: 539case ErrorCode.WRN_RefReturnOnlyParameter: 540case ErrorCode.WRN_RefReturnOnlyParameter2: 541case ErrorCode.WRN_RefAssignValEscapeWider: 542case ErrorCode.WRN_OptionalParamValueMismatch: 543case ErrorCode.WRN_ParamsArrayInLambdaOnly: 544case ErrorCode.WRN_CapturedPrimaryConstructorParameterPassedToBase: 545case ErrorCode.WRN_UnreadPrimaryConstructorParameter: 546case ErrorCode.WRN_InterceptorSignatureMismatch: 547case ErrorCode.WRN_NullabilityMismatchInReturnTypeOnInterceptor: 548case ErrorCode.WRN_NullabilityMismatchInParameterTypeOnInterceptor: 549case ErrorCode.WRN_CapturedPrimaryConstructorParameterInFieldInitializer: 550case ErrorCode.WRN_PrimaryConstructorParameterIsShadowedAndNotPassedToBase: 551case ErrorCode.WRN_InlineArrayIndexerNotUsed: 552case ErrorCode.WRN_InlineArraySliceNotUsed: 553case ErrorCode.WRN_InlineArrayConversionOperatorNotUsed: 554case ErrorCode.WRN_InlineArrayNotSupportedByLanguage: 555case ErrorCode.WRN_BadArgRef: 556case ErrorCode.WRN_ArgExpectedRefOrIn: 557case ErrorCode.WRN_RefReadonlyNotVariable: 558case ErrorCode.WRN_ArgExpectedIn: 559case ErrorCode.WRN_OverridingDifferentRefness: 560case ErrorCode.WRN_HidingDifferentRefness: 561case ErrorCode.WRN_TargetDifferentRefness: 562case ErrorCode.WRN_RefReadonlyParameterDefaultValue: 563case ErrorCode.WRN_UseDefViolationRefField: 564case ErrorCode.WRN_Experimental: 565case ErrorCode.WRN_ExperimentalWithMessage: 566case ErrorCode.WRN_CollectionExpressionRefStructMayAllocate: 567case ErrorCode.WRN_CollectionExpressionRefStructSpreadMayAllocate: 568case ErrorCode.WRN_ConvertingLock: 569case ErrorCode.WRN_PartialMemberSignatureDifference: 570case ErrorCode.WRN_FieldIsAmbiguous: 571case ErrorCode.WRN_UninitializedNonNullableBackingField: 572case ErrorCode.WRN_AccessorDoesNotUseBackingField: 573case ErrorCode.WRN_UnscopedRefAttributeOldRules: 574case ErrorCode.WRN_RedundantPattern: 588internal static bool IsBuildOnlyDiagnostic(ErrorCode code) 593ErrorCode.WRN_ALinkWarn 594or ErrorCode.WRN_UnreferencedField 595or ErrorCode.WRN_UnreferencedFieldAssg 596or ErrorCode.WRN_UnreferencedEvent 597or ErrorCode.WRN_UnassignedInternalField 598or ErrorCode.ERR_MissingPredefinedMember 599or ErrorCode.ERR_PredefinedTypeNotFound 600or ErrorCode.ERR_NoEntryPoint 601or ErrorCode.WRN_InvalidMainSig 602or ErrorCode.ERR_MultipleEntryPoints 603or ErrorCode.WRN_MainIgnored 604or ErrorCode.ERR_MainClassNotClass 605or ErrorCode.WRN_MainCantBeGeneric 606or ErrorCode.ERR_NoMainInClass 607or ErrorCode.ERR_MainClassNotFound 608or ErrorCode.WRN_SyncAndAsyncEntryPoints 609or ErrorCode.ERR_BadDelegateConstructor 610or ErrorCode.ERR_InsufficientStack 611or ErrorCode.ERR_ModuleEmitFailure 612or ErrorCode.ERR_TooManyLocals 613or ErrorCode.ERR_BindToBogus 614or ErrorCode.ERR_ExportedTypeConflictsWithDeclaration 615or ErrorCode.ERR_ForwardedTypeConflictsWithDeclaration 616or ErrorCode.ERR_ExportedTypesConflict 617or ErrorCode.ERR_ForwardedTypeConflictsWithExportedType 618or ErrorCode.ERR_ByRefTypeAndAwait 619or ErrorCode.ERR_RefReturningCallAndAwait 620or ErrorCode.ERR_SpecialByRefInLambda 621or ErrorCode.ERR_DynamicRequiredTypesMissing 622or ErrorCode.ERR_CannotBeConvertedToUtf8 623or ErrorCode.ERR_FileTypeNonUniquePath 624or ErrorCode.ERR_InterceptorSignatureMismatch 625or ErrorCode.ERR_InterceptorMustHaveMatchingThisParameter 626or ErrorCode.ERR_InterceptorMustNotHaveThisParameter 627or ErrorCode.ERR_DuplicateInterceptor 628or ErrorCode.WRN_InterceptorSignatureMismatch 629or ErrorCode.ERR_InterceptorNotAccessible 630or ErrorCode.ERR_InterceptorScopedMismatch 631or ErrorCode.WRN_NullabilityMismatchInReturnTypeOnInterceptor 632or ErrorCode.WRN_NullabilityMismatchInParameterTypeOnInterceptor 633or ErrorCode.ERR_InterceptorCannotInterceptNameof 634or ErrorCode.ERR_SymbolDefinedInAssembly 635or ErrorCode.ERR_InterceptorArityNotCompatible 636or ErrorCode.ERR_InterceptorCannotBeGeneric 637or ErrorCode.ERR_InterceptableMethodMustBeOrdinary 638or ErrorCode.ERR_PossibleAsyncIteratorWithoutYield 639or ErrorCode.ERR_PossibleAsyncIteratorWithoutYieldOrAwait 640or ErrorCode.ERR_RefLocalAcrossAwait 641or ErrorCode.ERR_DataSectionStringLiteralHashCollision 642or ErrorCode.ERR_NonTaskMainCantBeAsync 643or ErrorCode.ERR_FunctionPointerTypesInAttributeNotSupported 644or ErrorCode.ERR_EncUpdateFailedMissingSymbol 645or ErrorCode.ERR_EncNoPIAReference 646or ErrorCode.ERR_EncReferenceToAddedMember 647or ErrorCode.ERR_EncUpdateRequiresEmittingExplicitInterfaceImplementationNotSupportedByTheRuntime 648or ErrorCode.ERR_AbstractBaseRecordImplementation 649or ErrorCode.ERR_WrongArityAsyncReturn 650or ErrorCode.ERR_BadAsyncMethodBuilderTaskProperty 656ErrorCode.Void 657or ErrorCode.Unknown 658or ErrorCode.ERR_NoMetadataFile 659or ErrorCode.FTL_MetadataCantOpenFile 660or ErrorCode.ERR_NoTypeDef 661or ErrorCode.ERR_OutputWriteFailed 662or ErrorCode.ERR_BadBinaryOps 663or ErrorCode.ERR_IntDivByZero 664or ErrorCode.ERR_BadIndexLHS 665or ErrorCode.ERR_BadIndexCount 666or ErrorCode.ERR_BadUnaryOp 667or ErrorCode.ERR_ThisInStaticMeth 668or ErrorCode.ERR_ThisInBadContext 669or ErrorCode.ERR_NoImplicitConv 670or ErrorCode.ERR_NoExplicitConv 671or ErrorCode.ERR_ConstOutOfRange 672or ErrorCode.ERR_AmbigBinaryOps 673or ErrorCode.ERR_AmbigUnaryOp 674or ErrorCode.ERR_InAttrOnOutParam 675or ErrorCode.ERR_ValueCantBeNull 676or ErrorCode.ERR_NoExplicitBuiltinConv 677or ErrorCode.FTL_DebugEmitFailure 678or ErrorCode.ERR_BadVisReturnType 679or ErrorCode.ERR_BadVisParamType 680or ErrorCode.ERR_BadVisFieldType 681or ErrorCode.ERR_BadVisPropertyType 682or ErrorCode.ERR_BadVisIndexerReturn 683or ErrorCode.ERR_BadVisIndexerParam 684or ErrorCode.ERR_BadVisOpReturn 685or ErrorCode.ERR_BadVisOpParam 686or ErrorCode.ERR_BadVisDelegateReturn 687or ErrorCode.ERR_BadVisDelegateParam 688or ErrorCode.ERR_BadVisBaseClass 689or ErrorCode.ERR_BadVisBaseInterface 690or ErrorCode.ERR_EventNeedsBothAccessors 691or ErrorCode.ERR_EventNotDelegate 692or ErrorCode.ERR_InterfaceEventInitializer 693or ErrorCode.ERR_BadEventUsage 694or ErrorCode.ERR_ExplicitEventFieldImpl 695or ErrorCode.ERR_CantOverrideNonEvent 696or ErrorCode.ERR_AddRemoveMustHaveBody 697or ErrorCode.ERR_AbstractEventInitializer 698or ErrorCode.ERR_PossibleBadNegCast 699or ErrorCode.ERR_ReservedEnumerator 700or ErrorCode.ERR_AsMustHaveReferenceType 701or ErrorCode.WRN_LowercaseEllSuffix 702or ErrorCode.ERR_BadEventUsageNoField 703or ErrorCode.ERR_ConstraintOnlyAllowedOnGenericDecl 704or ErrorCode.ERR_TypeParamMustBeIdentifier 705or ErrorCode.ERR_MemberReserved 706or ErrorCode.ERR_DuplicateParamName 707or ErrorCode.ERR_DuplicateNameInNS 708or ErrorCode.ERR_DuplicateNameInClass 709or ErrorCode.ERR_NameNotInContext 710or ErrorCode.ERR_AmbigContext 711or ErrorCode.WRN_DuplicateUsing 712or ErrorCode.ERR_BadMemberFlag 713or ErrorCode.ERR_BadMemberProtection 714or ErrorCode.WRN_NewRequired 715or ErrorCode.WRN_NewNotRequired 716or ErrorCode.ERR_CircConstValue 717or ErrorCode.ERR_MemberAlreadyExists 718or ErrorCode.ERR_StaticNotVirtual 719or ErrorCode.ERR_OverrideNotNew 720or ErrorCode.WRN_NewOrOverrideExpected 721or ErrorCode.ERR_OverrideNotExpected 722or ErrorCode.ERR_NamespaceUnexpected 723or ErrorCode.ERR_NoSuchMember 724or ErrorCode.ERR_BadSKknown 725or ErrorCode.ERR_BadSKunknown 726or ErrorCode.ERR_ObjectRequired 727or ErrorCode.ERR_AmbigCall 728or ErrorCode.ERR_BadAccess 729or ErrorCode.ERR_MethDelegateMismatch 730or ErrorCode.ERR_RetObjectRequired 731or ErrorCode.ERR_RetNoObjectRequired 732or ErrorCode.ERR_LocalDuplicate 733or ErrorCode.ERR_AssgLvalueExpected 734or ErrorCode.ERR_StaticConstParam 735or ErrorCode.ERR_NotConstantExpression 736or ErrorCode.ERR_NotNullConstRefField 737or ErrorCode.ERR_LocalIllegallyOverrides 738or ErrorCode.ERR_BadUsingNamespace 739or ErrorCode.ERR_NoBreakOrCont 740or ErrorCode.ERR_DuplicateLabel 741or ErrorCode.ERR_NoConstructors 742or ErrorCode.ERR_NoNewAbstract 743or ErrorCode.ERR_ConstValueRequired 744or ErrorCode.ERR_CircularBase 745or ErrorCode.ERR_MethodNameExpected 746or ErrorCode.ERR_ConstantExpected 747or ErrorCode.ERR_V6SwitchGoverningTypeValueExpected 748or ErrorCode.ERR_DuplicateCaseLabel 749or ErrorCode.ERR_InvalidGotoCase 750or ErrorCode.ERR_PropertyLacksGet 751or ErrorCode.ERR_BadExceptionType 752or ErrorCode.ERR_BadEmptyThrow 753or ErrorCode.ERR_BadFinallyLeave 754or ErrorCode.ERR_LabelShadow 755or ErrorCode.ERR_LabelNotFound 756or ErrorCode.ERR_UnreachableCatch 757or ErrorCode.ERR_ReturnExpected 758or ErrorCode.WRN_UnreachableCode 759or ErrorCode.ERR_SwitchFallThrough 760or ErrorCode.WRN_UnreferencedLabel 761or ErrorCode.ERR_UseDefViolation 762or ErrorCode.WRN_UnreferencedVar 763or ErrorCode.ERR_UseDefViolationField 764or ErrorCode.ERR_UnassignedThisUnsupportedVersion 765or ErrorCode.ERR_AmbigQM 766or ErrorCode.ERR_InvalidQM 767or ErrorCode.ERR_NoBaseClass 768or ErrorCode.ERR_BaseIllegal 769or ErrorCode.ERR_ObjectProhibited 770or ErrorCode.ERR_ParamUnassigned 771or ErrorCode.ERR_InvalidArray 772or ErrorCode.ERR_ExternHasBody 773or ErrorCode.ERR_AbstractAndExtern 774or ErrorCode.ERR_BadAttributeParamType 775or ErrorCode.ERR_BadAttributeArgument 776or ErrorCode.WRN_IsAlwaysTrue 777or ErrorCode.WRN_IsAlwaysFalse 778or ErrorCode.ERR_LockNeedsReference 779or ErrorCode.ERR_NullNotValid 780or ErrorCode.ERR_UseDefViolationThisUnsupportedVersion 781or ErrorCode.ERR_ArgsInvalid 782or ErrorCode.ERR_AssgReadonly 783or ErrorCode.ERR_RefReadonly 784or ErrorCode.ERR_PtrExpected 785or ErrorCode.ERR_PtrIndexSingle 786or ErrorCode.WRN_ByRefNonAgileField 787or ErrorCode.ERR_AssgReadonlyStatic 788or ErrorCode.ERR_RefReadonlyStatic 789or ErrorCode.ERR_AssgReadonlyProp 790or ErrorCode.ERR_IllegalStatement 791or ErrorCode.ERR_BadGetEnumerator 792or ErrorCode.ERR_AbstractBaseCall 793or ErrorCode.ERR_RefProperty 794or ErrorCode.ERR_ManagedAddr 795or ErrorCode.ERR_BadFixedInitType 796or ErrorCode.ERR_FixedMustInit 797or ErrorCode.ERR_InvalidAddrOp 798or ErrorCode.ERR_FixedNeeded 799or ErrorCode.ERR_FixedNotNeeded 800or ErrorCode.ERR_UnsafeNeeded 801or ErrorCode.ERR_OpTFRetType 802or ErrorCode.ERR_OperatorNeedsMatch 803or ErrorCode.ERR_BadBoolOp 804or ErrorCode.ERR_MustHaveOpTF 805or ErrorCode.WRN_UnreferencedVarAssg 806or ErrorCode.ERR_CheckedOverflow 807or ErrorCode.ERR_ConstOutOfRangeChecked 808or ErrorCode.ERR_BadVarargs 809or ErrorCode.ERR_ParamsMustBeCollection 810or ErrorCode.ERR_IllegalArglist 811or ErrorCode.ERR_IllegalUnsafe 812or ErrorCode.ERR_AmbigMember 813or ErrorCode.ERR_BadForeachDecl 814or ErrorCode.ERR_ParamsLast 815or ErrorCode.ERR_SizeofUnsafe 816or ErrorCode.ERR_DottedTypeNameNotFoundInNS 817or ErrorCode.ERR_FieldInitRefNonstatic 818or ErrorCode.ERR_SealedNonOverride 819or ErrorCode.ERR_CantOverrideSealed 820or ErrorCode.ERR_VoidError 821or ErrorCode.ERR_ConditionalOnOverride 822or ErrorCode.ERR_PointerInAsOrIs 823or ErrorCode.ERR_CallingFinalizeDeprecated 824or ErrorCode.ERR_SingleTypeNameNotFound 825or ErrorCode.ERR_NegativeStackAllocSize 826or ErrorCode.ERR_NegativeArraySize 827or ErrorCode.ERR_OverrideFinalizeDeprecated 828or ErrorCode.ERR_CallingBaseFinalizeDeprecated 829or ErrorCode.WRN_NegativeArrayIndex 830or ErrorCode.WRN_BadRefCompareLeft 831or ErrorCode.WRN_BadRefCompareRight 832or ErrorCode.ERR_BadCastInFixed 833or ErrorCode.ERR_StackallocInCatchFinally 834or ErrorCode.ERR_VarargsLast 835or ErrorCode.ERR_MissingPartial 836or ErrorCode.ERR_PartialTypeKindConflict 837or ErrorCode.ERR_PartialModifierConflict 838or ErrorCode.ERR_PartialMultipleBases 839or ErrorCode.ERR_PartialWrongTypeParams 840or ErrorCode.ERR_PartialWrongConstraints 841or ErrorCode.ERR_NoImplicitConvCast 842or ErrorCode.ERR_PartialMisplaced 843or ErrorCode.ERR_MisplacedExtension 844or ErrorCode.ERR_ImportedCircularBase 845or ErrorCode.ERR_UseDefViolationOut 846or ErrorCode.ERR_ArraySizeInDeclaration 847or ErrorCode.ERR_InaccessibleGetter 848or ErrorCode.ERR_InaccessibleSetter 849or ErrorCode.ERR_InvalidPropertyAccessMod 850or ErrorCode.ERR_DuplicatePropertyAccessMods 851or ErrorCode.ERR_AccessModMissingAccessor 852or ErrorCode.ERR_UnimplementedInterfaceAccessor 853or ErrorCode.WRN_PatternIsAmbiguous 854or ErrorCode.WRN_PatternNotPublicOrNotInstance 855or ErrorCode.WRN_PatternBadSignature 856or ErrorCode.ERR_FriendRefNotEqualToThis 857or ErrorCode.WRN_SequentialOnPartialClass 858or ErrorCode.ERR_BadConstType 859or ErrorCode.ERR_NoNewTyvar 860or ErrorCode.ERR_BadArity 861or ErrorCode.ERR_BadTypeArgument 862or ErrorCode.ERR_TypeArgsNotAllowed 863or ErrorCode.ERR_HasNoTypeVars 864or ErrorCode.ERR_NewConstraintNotSatisfied 865or ErrorCode.ERR_GenericConstraintNotSatisfiedRefType 866or ErrorCode.ERR_GenericConstraintNotSatisfiedNullableEnum 867or ErrorCode.ERR_GenericConstraintNotSatisfiedNullableInterface 868or ErrorCode.ERR_GenericConstraintNotSatisfiedTyVar 869or ErrorCode.ERR_GenericConstraintNotSatisfiedValType 870or ErrorCode.ERR_DuplicateGeneratedName 871or ErrorCode.ERR_GlobalSingleTypeNameNotFound 872or ErrorCode.ERR_NewBoundMustBeLast 873or ErrorCode.ERR_TypeVarCantBeNull 874or ErrorCode.ERR_DuplicateBound 875or ErrorCode.ERR_ClassBoundNotFirst 876or ErrorCode.ERR_BadRetType 877or ErrorCode.ERR_DuplicateConstraintClause 878or ErrorCode.ERR_CantInferMethTypeArgs 879or ErrorCode.ERR_LocalSameNameAsTypeParam 880or ErrorCode.ERR_AsWithTypeVar 881or ErrorCode.ERR_BadIndexerNameAttr 882or ErrorCode.ERR_AttrArgWithTypeVars 883or ErrorCode.ERR_NewTyvarWithArgs 884or ErrorCode.ERR_AbstractSealedStatic 885or ErrorCode.WRN_AmbiguousXMLReference 886or ErrorCode.WRN_VolatileByRef 887or ErrorCode.ERR_ComImportWithImpl 888or ErrorCode.ERR_ComImportWithBase 889or ErrorCode.ERR_ImplBadConstraints 890or ErrorCode.ERR_DottedTypeNameNotFoundInAgg 891or ErrorCode.ERR_MethGrpToNonDel 892or ErrorCode.ERR_BadExternAlias 893or ErrorCode.ERR_ColColWithTypeAlias 894or ErrorCode.ERR_AliasNotFound 895or ErrorCode.ERR_SameFullNameAggAgg 896or ErrorCode.ERR_SameFullNameNsAgg 897or ErrorCode.WRN_SameFullNameThisNsAgg 898or ErrorCode.WRN_SameFullNameThisAggAgg 899or ErrorCode.WRN_SameFullNameThisAggNs 900or ErrorCode.ERR_SameFullNameThisAggThisNs 901or ErrorCode.ERR_ExternAfterElements 902or ErrorCode.WRN_GlobalAliasDefn 903or ErrorCode.ERR_SealedStaticClass 904or ErrorCode.ERR_PrivateAbstractAccessor 905or ErrorCode.ERR_ValueExpected 906or ErrorCode.ERR_UnboxNotLValue 907or ErrorCode.ERR_AnonMethGrpInForEach 908or ErrorCode.ERR_BadIncDecRetType 909or ErrorCode.ERR_TypeConstraintsMustBeUniqueAndFirst 910or ErrorCode.ERR_RefValBoundWithClass 911or ErrorCode.ERR_NewBoundWithVal 912or ErrorCode.ERR_RefConstraintNotSatisfied 913or ErrorCode.ERR_ValConstraintNotSatisfied 914or ErrorCode.ERR_CircularConstraint 915or ErrorCode.ERR_BaseConstraintConflict 916or ErrorCode.ERR_ConWithValCon 917or ErrorCode.ERR_AmbigUDConv 918or ErrorCode.WRN_AlwaysNull 919or ErrorCode.ERR_OverrideWithConstraints 920or ErrorCode.ERR_AmbigOverride 921or ErrorCode.ERR_DecConstError 922or ErrorCode.WRN_CmpAlwaysFalse 923or ErrorCode.WRN_FinalizeMethod 924or ErrorCode.ERR_ExplicitImplParams 925or ErrorCode.WRN_GotoCaseShouldConvert 926or ErrorCode.ERR_MethodImplementingAccessor 927or ErrorCode.WRN_NubExprIsConstBool 928or ErrorCode.WRN_ExplicitImplCollision 929or ErrorCode.ERR_AbstractHasBody 930or ErrorCode.ERR_ConcreteMissingBody 931or ErrorCode.ERR_AbstractAndSealed 932or ErrorCode.ERR_AbstractNotVirtual 933or ErrorCode.ERR_StaticConstant 934or ErrorCode.ERR_CantOverrideNonFunction 935or ErrorCode.ERR_CantOverrideNonVirtual 936or ErrorCode.ERR_CantChangeAccessOnOverride 937or ErrorCode.ERR_CantChangeReturnTypeOnOverride 938or ErrorCode.ERR_CantDeriveFromSealedType 939or ErrorCode.ERR_AbstractInConcreteClass 940or ErrorCode.ERR_StaticConstructorWithExplicitConstructorCall 941or ErrorCode.ERR_StaticConstructorWithAccessModifiers 942or ErrorCode.ERR_RecursiveConstructorCall 943or ErrorCode.ERR_ObjectCallingBaseConstructor 944or ErrorCode.ERR_StructWithBaseConstructorCall 945or ErrorCode.ERR_StructLayoutCycle 946or ErrorCode.ERR_InterfacesCantContainFields 947or ErrorCode.ERR_InterfacesCantContainConstructors 948or ErrorCode.ERR_NonInterfaceInInterfaceList 949or ErrorCode.ERR_DuplicateInterfaceInBaseList 950or ErrorCode.ERR_CycleInInterfaceInheritance 951or ErrorCode.ERR_HidingAbstractMethod 952or ErrorCode.ERR_UnimplementedAbstractMethod 953or ErrorCode.ERR_UnimplementedInterfaceMember 954or ErrorCode.ERR_ObjectCantHaveBases 955or ErrorCode.ERR_ExplicitInterfaceImplementationNotInterface 956or ErrorCode.ERR_InterfaceMemberNotFound 957or ErrorCode.ERR_ClassDoesntImplementInterface 958or ErrorCode.ERR_ExplicitInterfaceImplementationInNonClassOrStruct 959or ErrorCode.ERR_MemberNameSameAsType 960or ErrorCode.ERR_EnumeratorOverflow 961or ErrorCode.ERR_CantOverrideNonProperty 962or ErrorCode.ERR_NoGetToOverride 963or ErrorCode.ERR_NoSetToOverride 964or ErrorCode.ERR_PropertyCantHaveVoidType 965or ErrorCode.ERR_PropertyWithNoAccessors 966or ErrorCode.ERR_NewVirtualInSealed 967or ErrorCode.ERR_ExplicitPropertyAddingAccessor 968or ErrorCode.ERR_ExplicitPropertyMissingAccessor 969or ErrorCode.ERR_ConversionWithInterface 970or ErrorCode.ERR_ConversionWithBase 971or ErrorCode.ERR_ConversionWithDerived 972or ErrorCode.ERR_IdentityConversion 973or ErrorCode.ERR_ConversionNotInvolvingContainedType 974or ErrorCode.ERR_DuplicateConversionInClass 975or ErrorCode.ERR_OperatorsMustBeStaticAndPublic 976or ErrorCode.ERR_BadIncDecSignature 977or ErrorCode.ERR_BadUnaryOperatorSignature 978or ErrorCode.ERR_BadBinaryOperatorSignature 979or ErrorCode.ERR_BadShiftOperatorSignature 980or ErrorCode.ERR_InterfacesCantContainConversionOrEqualityOperators 981or ErrorCode.ERR_CantOverrideBogusMethod 982or ErrorCode.ERR_CantCallSpecialMethod 983or ErrorCode.ERR_BadTypeReference 984or ErrorCode.ERR_BadDestructorName 985or ErrorCode.ERR_OnlyClassesCanContainDestructors 986or ErrorCode.ERR_ConflictAliasAndMember 987or ErrorCode.ERR_ConditionalOnSpecialMethod 988or ErrorCode.ERR_ConditionalMustReturnVoid 989or ErrorCode.ERR_DuplicateAttribute 990or ErrorCode.ERR_ConditionalOnInterfaceMethod 991or ErrorCode.ERR_OperatorCantReturnVoid 992or ErrorCode.ERR_InvalidAttributeArgument 993or ErrorCode.ERR_AttributeOnBadSymbolType 994or ErrorCode.ERR_FloatOverflow 995or ErrorCode.ERR_InvalidReal 996or ErrorCode.ERR_ComImportWithoutUuidAttribute 997or ErrorCode.ERR_InvalidNamedArgument 998or ErrorCode.ERR_DllImportOnInvalidMethod 999or ErrorCode.ERR_FieldCantBeRefAny 1000or ErrorCode.ERR_ArrayElementCantBeRefAny 1001or ErrorCode.WRN_DeprecatedSymbol 1002or ErrorCode.ERR_NotAnAttributeClass 1003or ErrorCode.ERR_BadNamedAttributeArgument 1004or ErrorCode.WRN_DeprecatedSymbolStr 1005or ErrorCode.ERR_DeprecatedSymbolStr 1006or ErrorCode.ERR_IndexerCantHaveVoidType 1007or ErrorCode.ERR_VirtualPrivate 1008or ErrorCode.ERR_ArrayInitToNonArrayType 1009or ErrorCode.ERR_ArrayInitInBadPlace 1010or ErrorCode.ERR_MissingStructOffset 1011or ErrorCode.WRN_ExternMethodNoImplementation 1012or ErrorCode.WRN_ProtectedInSealed 1013or ErrorCode.ERR_InterfaceImplementedByConditional 1014or ErrorCode.ERR_InterfaceImplementedImplicitlyByVariadic 1015or ErrorCode.ERR_IllegalRefParam 1016or ErrorCode.ERR_BadArgumentToAttribute 1017or ErrorCode.ERR_StructOffsetOnBadStruct 1018or ErrorCode.ERR_StructOffsetOnBadField 1019or ErrorCode.ERR_AttributeUsageOnNonAttributeClass 1020or ErrorCode.WRN_PossibleMistakenNullStatement 1021or ErrorCode.ERR_DuplicateNamedAttributeArgument 1022or ErrorCode.ERR_DeriveFromEnumOrValueType 1023or ErrorCode.ERR_DefaultMemberOnIndexedType 1024or ErrorCode.ERR_BogusType 1025or ErrorCode.ERR_CStyleArray 1026or ErrorCode.WRN_VacuousIntegralComp 1027or ErrorCode.ERR_AbstractAttributeClass 1028or ErrorCode.ERR_BadNamedAttributeArgumentType 1029or ErrorCode.WRN_AttributeLocationOnBadDeclaration 1030or ErrorCode.WRN_InvalidAttributeLocation 1031or ErrorCode.WRN_EqualsWithoutGetHashCode 1032or ErrorCode.WRN_EqualityOpWithoutEquals 1033or ErrorCode.WRN_EqualityOpWithoutGetHashCode 1034or ErrorCode.ERR_OutAttrOnRefParam 1035or ErrorCode.ERR_OverloadRefKind 1036or ErrorCode.ERR_LiteralDoubleCast 1037or ErrorCode.WRN_IncorrectBooleanAssg 1038or ErrorCode.ERR_ProtectedInStruct 1039or ErrorCode.ERR_InconsistentIndexerNames 1040or ErrorCode.ERR_ComImportWithUserCtor 1041or ErrorCode.ERR_FieldCantHaveVoidType 1042or ErrorCode.WRN_NonObsoleteOverridingObsolete 1043or ErrorCode.ERR_SystemVoid 1044or ErrorCode.ERR_ExplicitParamArrayOrCollection 1045or ErrorCode.WRN_BitwiseOrSignExtend 1046or ErrorCode.ERR_VolatileStruct 1047or ErrorCode.ERR_VolatileAndReadonly 1048or ErrorCode.ERR_AbstractField 1049or ErrorCode.ERR_BogusExplicitImpl 1050or ErrorCode.ERR_ExplicitMethodImplAccessor 1051or ErrorCode.WRN_CoClassWithoutComImport 1052or ErrorCode.ERR_ConditionalWithOutParam 1053or ErrorCode.ERR_AccessorImplementingMethod 1054or ErrorCode.ERR_AliasQualAsExpression 1055or ErrorCode.ERR_DerivingFromATyVar 1056or ErrorCode.ERR_DuplicateTypeParameter 1057or ErrorCode.WRN_TypeParameterSameAsOuterTypeParameter 1058or ErrorCode.ERR_TypeVariableSameAsParent 1059or ErrorCode.ERR_UnifyingInterfaceInstantiations 1060or ErrorCode.ERR_TyVarNotFoundInConstraint 1061or ErrorCode.ERR_BadBoundType 1062or ErrorCode.ERR_SpecialTypeAsBound 1063or ErrorCode.ERR_BadVisBound 1064or ErrorCode.ERR_LookupInTypeVariable 1065or ErrorCode.ERR_BadConstraintType 1066or ErrorCode.ERR_InstanceMemberInStaticClass 1067or ErrorCode.ERR_StaticBaseClass 1068or ErrorCode.ERR_ConstructorInStaticClass 1069or ErrorCode.ERR_DestructorInStaticClass 1070or ErrorCode.ERR_InstantiatingStaticClass 1071or ErrorCode.ERR_StaticDerivedFromNonObject 1072or ErrorCode.ERR_StaticClassInterfaceImpl 1073or ErrorCode.ERR_OperatorInStaticClass 1074or ErrorCode.ERR_ConvertToStaticClass 1075or ErrorCode.ERR_ConstraintIsStaticClass 1076or ErrorCode.ERR_GenericArgIsStaticClass 1077or ErrorCode.ERR_ArrayOfStaticClass 1078or ErrorCode.ERR_IndexerInStaticClass 1079or ErrorCode.ERR_ParameterIsStaticClass 1080or ErrorCode.ERR_ReturnTypeIsStaticClass 1081or ErrorCode.ERR_VarDeclIsStaticClass 1082or ErrorCode.ERR_BadEmptyThrowInFinally 1083or ErrorCode.ERR_InvalidSpecifier 1084or ErrorCode.WRN_AssignmentToLockOrDispose 1085or ErrorCode.ERR_ForwardedTypeInThisAssembly 1086or ErrorCode.ERR_ForwardedTypeIsNested 1087or ErrorCode.ERR_CycleInTypeForwarder 1088or ErrorCode.ERR_AssemblyNameOnNonModule 1089or ErrorCode.ERR_InvalidFwdType 1090or ErrorCode.ERR_CloseUnimplementedInterfaceMemberStatic 1091or ErrorCode.ERR_CloseUnimplementedInterfaceMemberNotPublic 1092or ErrorCode.ERR_CloseUnimplementedInterfaceMemberWrongReturnType 1093or ErrorCode.ERR_DuplicateTypeForwarder 1094or ErrorCode.ERR_ExpectedSelectOrGroup 1095or ErrorCode.ERR_ExpectedContextualKeywordOn 1096or ErrorCode.ERR_ExpectedContextualKeywordEquals 1097or ErrorCode.ERR_ExpectedContextualKeywordBy 1098or ErrorCode.ERR_InvalidAnonymousTypeMemberDeclarator 1099or ErrorCode.ERR_InvalidInitializerElementInitializer 1100or ErrorCode.ERR_InconsistentLambdaParameterUsage 1101or ErrorCode.ERR_PartialMemberCannotBeAbstract 1102or ErrorCode.ERR_PartialMemberOnlyInPartialClass 1103or ErrorCode.ERR_PartialMemberNotExplicit 1104or ErrorCode.ERR_PartialMethodExtensionDifference 1105or ErrorCode.ERR_PartialMethodOnlyOneLatent 1106or ErrorCode.ERR_PartialMethodOnlyOneActual 1107or ErrorCode.ERR_PartialMemberParamsDifference 1108or ErrorCode.ERR_PartialMethodMustHaveLatent 1109or ErrorCode.ERR_PartialMethodInconsistentConstraints 1110or ErrorCode.ERR_PartialMethodToDelegate 1111or ErrorCode.ERR_PartialMemberStaticDifference 1112or ErrorCode.ERR_PartialMemberUnsafeDifference 1113or ErrorCode.ERR_PartialMethodInExpressionTree 1114or ErrorCode.ERR_ExplicitImplCollisionOnRefOut 1115or ErrorCode.ERR_IndirectRecursiveConstructorCall 1116or ErrorCode.WRN_ObsoleteOverridingNonObsolete 1117or ErrorCode.WRN_DebugFullNameTooLong 1118or ErrorCode.ERR_ImplicitlyTypedVariableAssignedBadValue 1119or ErrorCode.ERR_ImplicitlyTypedVariableWithNoInitializer 1120or ErrorCode.ERR_ImplicitlyTypedVariableMultipleDeclarator 1121or ErrorCode.ERR_ImplicitlyTypedVariableAssignedArrayInitializer 1122or ErrorCode.ERR_ImplicitlyTypedLocalCannotBeFixed 1123or ErrorCode.ERR_ImplicitlyTypedVariableCannotBeConst 1124or ErrorCode.WRN_ExternCtorNoImplementation 1125or ErrorCode.ERR_TypeVarNotFound 1126or ErrorCode.ERR_ImplicitlyTypedArrayNoBestType 1127or ErrorCode.ERR_AnonymousTypePropertyAssignedBadValue 1128or ErrorCode.ERR_ExpressionTreeContainsBaseAccess 1129or ErrorCode.ERR_ExpressionTreeContainsAssignment 1130or ErrorCode.ERR_AnonymousTypeDuplicatePropertyName 1131or ErrorCode.ERR_StatementLambdaToExpressionTree 1132or ErrorCode.ERR_ExpressionTreeMustHaveDelegate 1133or ErrorCode.ERR_AnonymousTypeNotAvailable 1134or ErrorCode.ERR_LambdaInIsAs 1135or ErrorCode.ERR_ExpressionTreeContainsMultiDimensionalArrayInitializer 1136or ErrorCode.ERR_MissingArgument 1137or ErrorCode.ERR_VariableUsedBeforeDeclaration 1138or ErrorCode.ERR_UnassignedThisAutoPropertyUnsupportedVersion 1139or ErrorCode.ERR_VariableUsedBeforeDeclarationAndHidesField 1140or ErrorCode.ERR_ExpressionTreeContainsBadCoalesce 1141or ErrorCode.ERR_ArrayInitializerExpected 1142or ErrorCode.ERR_ArrayInitializerIncorrectLength 1143or ErrorCode.ERR_ExpressionTreeContainsNamedArgument 1144or ErrorCode.ERR_ExpressionTreeContainsOptionalArgument 1145or ErrorCode.ERR_ExpressionTreeContainsIndexedProperty 1146or ErrorCode.ERR_IndexedPropertyRequiresParams 1147or ErrorCode.ERR_IndexedPropertyMustHaveAllOptionalParams 1148or ErrorCode.ERR_IdentifierExpected 1149or ErrorCode.ERR_SemicolonExpected 1150or ErrorCode.ERR_SyntaxError 1151or ErrorCode.ERR_DuplicateModifier 1152or ErrorCode.ERR_DuplicateAccessor 1153or ErrorCode.ERR_IntegralTypeExpected 1154or ErrorCode.ERR_IllegalEscape 1155or ErrorCode.ERR_NewlineInConst 1156or ErrorCode.ERR_EmptyCharConst 1157or ErrorCode.ERR_TooManyCharsInConst 1158or ErrorCode.ERR_InvalidNumber 1159or ErrorCode.ERR_GetOrSetExpected 1160or ErrorCode.ERR_ClassTypeExpected 1161or ErrorCode.ERR_NamedArgumentExpected 1162or ErrorCode.ERR_TooManyCatches 1163or ErrorCode.ERR_ThisOrBaseExpected 1164or ErrorCode.ERR_OvlUnaryOperatorExpected 1165or ErrorCode.ERR_OvlBinaryOperatorExpected 1166or ErrorCode.ERR_IntOverflow 1167or ErrorCode.ERR_EOFExpected 1168or ErrorCode.ERR_BadEmbeddedStmt 1169or ErrorCode.ERR_PPDirectiveExpected 1170or ErrorCode.ERR_EndOfPPLineExpected 1171or ErrorCode.ERR_CloseParenExpected 1172or ErrorCode.ERR_EndifDirectiveExpected 1173or ErrorCode.ERR_UnexpectedDirective 1174or ErrorCode.ERR_ErrorDirective 1175or ErrorCode.WRN_WarningDirective 1176or ErrorCode.ERR_TypeExpected 1177or ErrorCode.ERR_PPDefFollowsToken 1178or ErrorCode.ERR_OpenEndedComment 1179or ErrorCode.ERR_OvlOperatorExpected 1180or ErrorCode.ERR_EndRegionDirectiveExpected 1181or ErrorCode.ERR_UnterminatedStringLit 1182or ErrorCode.ERR_BadDirectivePlacement 1183or ErrorCode.ERR_IdentifierExpectedKW 1184or ErrorCode.ERR_SemiOrLBraceExpected 1185or ErrorCode.ERR_MultiTypeInDeclaration 1186or ErrorCode.ERR_AddOrRemoveExpected 1187or ErrorCode.ERR_UnexpectedCharacter 1188or ErrorCode.ERR_ProtectedInStatic 1189or ErrorCode.WRN_UnreachableGeneralCatch 1190or ErrorCode.ERR_IncrementLvalueExpected 1191or ErrorCode.ERR_NoSuchMemberOrExtension 1192or ErrorCode.WRN_DeprecatedCollectionInitAddStr 1193or ErrorCode.ERR_DeprecatedCollectionInitAddStr 1194or ErrorCode.WRN_DeprecatedCollectionInitAdd 1195or ErrorCode.ERR_DefaultValueNotAllowed 1196or ErrorCode.WRN_DefaultValueForUnconsumedLocation 1197or ErrorCode.ERR_PartialWrongTypeParamsVariance 1198or ErrorCode.ERR_GlobalSingleTypeNameNotFoundFwd 1199or ErrorCode.ERR_DottedTypeNameNotFoundInNSFwd 1200or ErrorCode.ERR_SingleTypeNameNotFoundFwd 1201or ErrorCode.WRN_IdentifierOrNumericLiteralExpected 1202or ErrorCode.ERR_UnexpectedToken 1203or ErrorCode.ERR_BadThisParam 1204or ErrorCode.ERR_BadTypeforThis 1205or ErrorCode.ERR_BadParamModThis 1206or ErrorCode.ERR_BadExtensionMeth 1207or ErrorCode.ERR_BadExtensionAgg 1208or ErrorCode.ERR_DupParamMod 1209or ErrorCode.ERR_ExtensionMethodsDecl 1210or ErrorCode.ERR_ExtensionAttrNotFound 1211or ErrorCode.ERR_ExplicitExtension 1212or ErrorCode.ERR_ValueTypeExtDelegate 1213or ErrorCode.ERR_BadArgCount 1214or ErrorCode.ERR_BadArgType 1215or ErrorCode.ERR_NoSourceFile 1216or ErrorCode.ERR_CantRefResource 1217or ErrorCode.ERR_ResourceNotUnique 1218or ErrorCode.ERR_ImportNonAssembly 1219or ErrorCode.ERR_RefLvalueExpected 1220or ErrorCode.ERR_BaseInStaticMeth 1221or ErrorCode.ERR_BaseInBadContext 1222or ErrorCode.ERR_RbraceExpected 1223or ErrorCode.ERR_LbraceExpected 1224or ErrorCode.ERR_InExpected 1225or ErrorCode.ERR_InvalidPreprocExpr 1226or ErrorCode.ERR_InvalidMemberDecl 1227or ErrorCode.ERR_MemberNeedsType 1228or ErrorCode.ERR_BadBaseType 1229or ErrorCode.WRN_EmptySwitch 1230or ErrorCode.ERR_ExpectedEndTry 1231or ErrorCode.ERR_InvalidExprTerm 1232or ErrorCode.ERR_BadNewExpr 1233or ErrorCode.ERR_NoNamespacePrivate 1234or ErrorCode.ERR_BadVarDecl 1235or ErrorCode.ERR_UsingAfterElements 1236or ErrorCode.ERR_BadBinOpArgs 1237or ErrorCode.ERR_BadUnOpArgs 1238or ErrorCode.ERR_NoVoidParameter 1239or ErrorCode.ERR_DuplicateAlias 1240or ErrorCode.ERR_BadProtectedAccess 1241or ErrorCode.ERR_AddModuleAssembly 1242or ErrorCode.ERR_BindToBogusProp2 1243or ErrorCode.ERR_BindToBogusProp1 1244or ErrorCode.ERR_NoVoidHere 1245or ErrorCode.ERR_IndexerNeedsParam 1246or ErrorCode.ERR_BadArraySyntax 1247or ErrorCode.ERR_BadOperatorSyntax 1248or ErrorCode.ERR_OutputNeedsName 1249or ErrorCode.ERR_CantHaveWin32ResAndManifest 1250or ErrorCode.ERR_CantHaveWin32ResAndIcon 1251or ErrorCode.ERR_CantReadResource 1252or ErrorCode.ERR_DocFileGen 1253or ErrorCode.WRN_XMLParseError 1254or ErrorCode.WRN_DuplicateParamTag 1255or ErrorCode.WRN_UnmatchedParamTag 1256or ErrorCode.WRN_MissingParamTag 1257or ErrorCode.WRN_BadXMLRef 1258or ErrorCode.ERR_BadStackAllocExpr 1259or ErrorCode.ERR_InvalidLineNumber 1260or ErrorCode.ERR_MissingPPFile 1261or ErrorCode.ERR_ForEachMissingMember 1262or ErrorCode.WRN_BadXMLRefParamType 1263or ErrorCode.WRN_BadXMLRefReturnType 1264or ErrorCode.ERR_BadWin32Res 1265or ErrorCode.WRN_BadXMLRefSyntax 1266or ErrorCode.ERR_BadModifierLocation 1267or ErrorCode.ERR_MissingArraySize 1268or ErrorCode.WRN_UnprocessedXMLComment 1269or ErrorCode.WRN_FailedInclude 1270or ErrorCode.WRN_InvalidInclude 1271or ErrorCode.WRN_MissingXMLComment 1272or ErrorCode.WRN_XMLParseIncludeError 1273or ErrorCode.ERR_BadDelArgCount 1274or ErrorCode.ERR_UnexpectedSemicolon 1275or ErrorCode.ERR_MethodReturnCantBeRefAny 1276or ErrorCode.ERR_CompileCancelled 1277or ErrorCode.ERR_MethodArgCantBeRefAny 1278or ErrorCode.ERR_AssgReadonlyLocal 1279or ErrorCode.ERR_RefReadonlyLocal 1280or ErrorCode.ERR_CantUseRequiredAttribute 1281or ErrorCode.ERR_NoModifiersOnAccessor 1282or ErrorCode.ERR_ParamsCantBeWithModifier 1283or ErrorCode.ERR_ReturnNotLValue 1284or ErrorCode.ERR_MissingCoClass 1285or ErrorCode.ERR_AmbiguousAttribute 1286or ErrorCode.ERR_BadArgExtraRef 1287or ErrorCode.WRN_CmdOptionConflictsSource 1288or ErrorCode.ERR_BadCompatMode 1289or ErrorCode.ERR_DelegateOnConditional 1290or ErrorCode.ERR_CantMakeTempFile 1291or ErrorCode.ERR_BadArgRef 1292or ErrorCode.ERR_YieldInAnonMeth 1293or ErrorCode.ERR_ReturnInIterator 1294or ErrorCode.ERR_BadIteratorArgType 1295or ErrorCode.ERR_BadIteratorReturn 1296or ErrorCode.ERR_BadYieldInFinally 1297or ErrorCode.ERR_BadYieldInTryOfCatch 1298or ErrorCode.ERR_EmptyYield 1299or ErrorCode.ERR_AnonDelegateCantUse 1300or ErrorCode.ERR_AnonDelegateCantUseRefLike 1301or ErrorCode.ERR_UnsupportedPrimaryConstructorParameterCapturingRef 1302or ErrorCode.ERR_UnsupportedPrimaryConstructorParameterCapturingRefLike 1303or ErrorCode.ERR_AnonDelegateCantUseStructPrimaryConstructorParameterInMember 1304or ErrorCode.ERR_AnonDelegateCantUseStructPrimaryConstructorParameterCaptured 1305or ErrorCode.ERR_BadYieldInCatch 1306or ErrorCode.ERR_BadDelegateLeave 1307or ErrorCode.WRN_IllegalPragma 1308or ErrorCode.WRN_IllegalPPWarning 1309or ErrorCode.WRN_BadRestoreNumber 1310or ErrorCode.ERR_VarargsIterator 1311or ErrorCode.ERR_UnsafeIteratorArgType 1312or ErrorCode.ERR_BadCoClassSig 1313or ErrorCode.ERR_MultipleIEnumOfT 1314or ErrorCode.ERR_FixedDimsRequired 1315or ErrorCode.ERR_FixedNotInStruct 1316or ErrorCode.ERR_AnonymousReturnExpected 1317or ErrorCode.WRN_NonECMAFeature 1318or ErrorCode.ERR_ExpectedVerbatimLiteral 1319or ErrorCode.ERR_AssgReadonly2 1320or ErrorCode.ERR_RefReadonly2 1321or ErrorCode.ERR_AssgReadonlyStatic2 1322or ErrorCode.ERR_RefReadonlyStatic2 1323or ErrorCode.ERR_AssgReadonlyLocal2Cause 1324or ErrorCode.ERR_RefReadonlyLocal2Cause 1325or ErrorCode.ERR_AssgReadonlyLocalCause 1326or ErrorCode.ERR_RefReadonlyLocalCause 1327or ErrorCode.WRN_ErrorOverride 1328or ErrorCode.ERR_AnonMethToNonDel 1329or ErrorCode.ERR_CantConvAnonMethParams 1330or ErrorCode.ERR_CantConvAnonMethReturns 1331or ErrorCode.ERR_IllegalFixedType 1332or ErrorCode.ERR_FixedOverflow 1333or ErrorCode.ERR_InvalidFixedArraySize 1334or ErrorCode.ERR_FixedBufferNotFixed 1335or ErrorCode.ERR_AttributeNotOnAccessor 1336or ErrorCode.WRN_InvalidSearchPathDir 1337or ErrorCode.ERR_IllegalVarArgs 1338or ErrorCode.ERR_IllegalParams 1339or ErrorCode.ERR_BadModifiersOnNamespace 1340or ErrorCode.ERR_BadPlatformType 1341or ErrorCode.ERR_ThisStructNotInAnonMeth 1342or ErrorCode.ERR_NoConvToIDisp 1343or ErrorCode.ERR_BadParamRef 1344or ErrorCode.ERR_BadParamExtraRef 1345or ErrorCode.ERR_BadParamType 1346or ErrorCode.ERR_BadExternIdentifier 1347or ErrorCode.ERR_AliasMissingFile 1348or ErrorCode.ERR_GlobalExternAlias 1349or ErrorCode.WRN_MultiplePredefTypes 1350or ErrorCode.ERR_LocalCantBeFixedAndHoisted 1351or ErrorCode.WRN_TooManyLinesForDebugger 1352or ErrorCode.ERR_CantConvAnonMethNoParams 1353or ErrorCode.ERR_ConditionalOnNonAttributeClass 1354or ErrorCode.WRN_CallOnNonAgileField 1355or ErrorCode.WRN_InvalidNumber 1356or ErrorCode.WRN_IllegalPPChecksum 1357or ErrorCode.WRN_EndOfPPLineExpected 1358or ErrorCode.WRN_ConflictingChecksum 1359or ErrorCode.WRN_InvalidAssemblyName 1360or ErrorCode.WRN_UnifyReferenceMajMin 1361or ErrorCode.WRN_UnifyReferenceBldRev 1362or ErrorCode.ERR_DuplicateImport 1363or ErrorCode.ERR_DuplicateImportSimple 1364or ErrorCode.ERR_AssemblyMatchBadVersion 1365or ErrorCode.ERR_FixedNeedsLvalue 1366or ErrorCode.WRN_DuplicateTypeParamTag 1367or ErrorCode.WRN_UnmatchedTypeParamTag 1368or ErrorCode.WRN_MissingTypeParamTag 1369or ErrorCode.ERR_CantChangeTypeOnOverride 1370or ErrorCode.ERR_DoNotUseFixedBufferAttr 1371or ErrorCode.WRN_AssignmentToSelf 1372or ErrorCode.WRN_ComparisonToSelf 1373or ErrorCode.ERR_CantOpenWin32Res 1374or ErrorCode.WRN_DotOnDefault 1375or ErrorCode.ERR_NoMultipleInheritance 1376or ErrorCode.ERR_BaseClassMustBeFirst 1377or ErrorCode.WRN_BadXMLRefTypeVar 1378or ErrorCode.ERR_FriendAssemblyBadArgs 1379or ErrorCode.ERR_FriendAssemblySNReq 1380or ErrorCode.ERR_DelegateOnNullable 1381or ErrorCode.ERR_BadCtorArgCount 1382or ErrorCode.ERR_GlobalAttributesNotFirst 1383or ErrorCode.ERR_ExpressionExpected 1384or ErrorCode.WRN_UnmatchedParamRefTag 1385or ErrorCode.WRN_UnmatchedTypeParamRefTag 1386or ErrorCode.ERR_DefaultValueMustBeConstant 1387or ErrorCode.ERR_DefaultValueBeforeRequiredValue 1388or ErrorCode.ERR_NamedArgumentSpecificationBeforeFixedArgument 1389or ErrorCode.ERR_BadNamedArgument 1390or ErrorCode.ERR_DuplicateNamedArgument 1391or ErrorCode.ERR_RefOutDefaultValue 1392or ErrorCode.ERR_NamedArgumentForArray 1393or ErrorCode.ERR_DefaultValueForExtensionParameter 1394or ErrorCode.ERR_NamedArgumentUsedInPositional 1395or ErrorCode.ERR_DefaultValueUsedWithAttributes 1396or ErrorCode.ERR_BadNamedArgumentForDelegateInvoke 1397or ErrorCode.ERR_NoPIAAssemblyMissingAttribute 1398or ErrorCode.ERR_NoCanonicalView 1399or ErrorCode.ERR_NoConversionForDefaultParam 1400or ErrorCode.ERR_DefaultValueForParamsParameter 1401or ErrorCode.ERR_NewCoClassOnLink 1402or ErrorCode.ERR_NoPIANestedType 1403or ErrorCode.ERR_InteropTypeMissingAttribute 1404or ErrorCode.ERR_InteropStructContainsMethods 1405or ErrorCode.ERR_InteropTypesWithSameNameAndGuid 1406or ErrorCode.ERR_NoPIAAssemblyMissingAttributes 1407or ErrorCode.ERR_AssemblySpecifiedForLinkAndRef 1408or ErrorCode.ERR_LocalTypeNameClash 1409or ErrorCode.WRN_ReferencedAssemblyReferencesLinkedPIA 1410or ErrorCode.ERR_NotNullRefDefaultParameter 1411or ErrorCode.ERR_FixedLocalInLambda 1412or ErrorCode.ERR_MissingMethodOnSourceInterface 1413or ErrorCode.ERR_MissingSourceInterface 1414or ErrorCode.ERR_GenericsUsedInNoPIAType 1415or ErrorCode.ERR_GenericsUsedAcrossAssemblies 1416or ErrorCode.ERR_NoConversionForNubDefaultParam 1417or ErrorCode.ERR_InvalidSubsystemVersion 1418or ErrorCode.ERR_InteropMethodWithBody 1419or ErrorCode.ERR_BadWarningLevel 1420or ErrorCode.ERR_BadDebugType 1421or ErrorCode.ERR_BadResourceVis 1422or ErrorCode.ERR_DefaultValueTypeMustMatch 1423or ErrorCode.ERR_DefaultValueBadValueType 1424or ErrorCode.ERR_MemberAlreadyInitialized 1425or ErrorCode.ERR_MemberCannotBeInitialized 1426or ErrorCode.ERR_StaticMemberInObjectInitializer 1427or ErrorCode.ERR_ReadonlyValueTypeInObjectInitializer 1428or ErrorCode.ERR_ValueTypePropertyInObjectInitializer 1429or ErrorCode.ERR_UnsafeTypeInObjectCreation 1430or ErrorCode.ERR_EmptyElementInitializer 1431or ErrorCode.ERR_InitializerAddHasWrongSignature 1432or ErrorCode.ERR_CollectionInitRequiresIEnumerable 1433or ErrorCode.ERR_CantOpenWin32Manifest 1434or ErrorCode.WRN_CantHaveManifestForModule 1435or ErrorCode.ERR_BadInstanceArgType 1436or ErrorCode.ERR_QueryDuplicateRangeVariable 1437or ErrorCode.ERR_QueryRangeVariableOverrides 1438or ErrorCode.ERR_QueryRangeVariableAssignedBadValue 1439or ErrorCode.ERR_QueryNoProviderCastable 1440or ErrorCode.ERR_QueryNoProviderStandard 1441or ErrorCode.ERR_QueryNoProvider 1442or ErrorCode.ERR_QueryOuterKey 1443or ErrorCode.ERR_QueryInnerKey 1444or ErrorCode.ERR_QueryOutRefRangeVariable 1445or ErrorCode.ERR_QueryMultipleProviders 1446or ErrorCode.ERR_QueryTypeInferenceFailedMulti 1447or ErrorCode.ERR_QueryTypeInferenceFailed 1448or ErrorCode.ERR_QueryTypeInferenceFailedSelectMany 1449or ErrorCode.ERR_ExpressionTreeContainsPointerOp 1450or ErrorCode.ERR_ExpressionTreeContainsAnonymousMethod 1451or ErrorCode.ERR_AnonymousMethodToExpressionTree 1452or ErrorCode.ERR_QueryRangeVariableReadOnly 1453or ErrorCode.ERR_QueryRangeVariableSameAsTypeParam 1454or ErrorCode.ERR_TypeVarNotFoundRangeVariable 1455or ErrorCode.ERR_BadArgTypesForCollectionAdd 1456or ErrorCode.ERR_ByRefParameterInExpressionTree 1457or ErrorCode.ERR_VarArgsInExpressionTree 1458or ErrorCode.ERR_InitializerAddHasParamModifiers 1459or ErrorCode.ERR_NonInvocableMemberCalled 1460or ErrorCode.WRN_MultipleRuntimeImplementationMatches 1461or ErrorCode.WRN_MultipleRuntimeOverrideMatches 1462or ErrorCode.ERR_ObjectOrCollectionInitializerWithDelegateCreation 1463or ErrorCode.ERR_InvalidConstantDeclarationType 1464or ErrorCode.ERR_IllegalVarianceSyntax 1465or ErrorCode.ERR_UnexpectedVariance 1466or ErrorCode.ERR_BadDynamicTypeof 1467or ErrorCode.ERR_ExpressionTreeContainsDynamicOperation 1468or ErrorCode.ERR_BadDynamicConversion 1469or ErrorCode.ERR_DeriveFromDynamic 1470or ErrorCode.ERR_DeriveFromConstructedDynamic 1471or ErrorCode.ERR_DynamicTypeAsBound 1472or ErrorCode.ERR_ConstructedDynamicTypeAsBound 1473or ErrorCode.ERR_ExplicitDynamicAttr 1474or ErrorCode.ERR_NoDynamicPhantomOnBase 1475or ErrorCode.ERR_NoDynamicPhantomOnBaseIndexer 1476or ErrorCode.ERR_BadArgTypeDynamicExtension 1477or ErrorCode.WRN_DynamicDispatchToConditionalMethod 1478or ErrorCode.ERR_NoDynamicPhantomOnBaseCtor 1479or ErrorCode.ERR_BadDynamicMethodArgMemgrp 1480or ErrorCode.ERR_BadDynamicMethodArgLambda 1481or ErrorCode.ERR_BadDynamicMethodArg 1482or ErrorCode.ERR_BadDynamicQuery 1483or ErrorCode.ERR_DynamicAttributeMissing 1484or ErrorCode.WRN_IsDynamicIsConfusing 1485or ErrorCode.ERR_BadAsyncReturn 1486or ErrorCode.ERR_BadAwaitInFinally 1487or ErrorCode.ERR_BadAwaitInCatch 1488or ErrorCode.ERR_BadAwaitArg 1489or ErrorCode.ERR_BadAsyncArgType 1490or ErrorCode.ERR_BadAsyncExpressionTree 1491or ErrorCode.ERR_MixingWinRTEventWithRegular 1492or ErrorCode.ERR_BadAwaitWithoutAsync 1493or ErrorCode.ERR_BadAsyncLacksBody 1494or ErrorCode.ERR_BadAwaitInQuery 1495or ErrorCode.ERR_BadAwaitInLock 1496or ErrorCode.ERR_TaskRetNoObjectRequired 1497or ErrorCode.ERR_FileNotFound 1498or ErrorCode.WRN_FileAlreadyIncluded 1499or ErrorCode.ERR_NoFileSpec 1500or ErrorCode.ERR_SwitchNeedsString 1501or ErrorCode.ERR_BadSwitch 1502or ErrorCode.WRN_NoSources 1503or ErrorCode.ERR_OpenResponseFile 1504or ErrorCode.ERR_CantOpenFileWrite 1505or ErrorCode.ERR_BadBaseNumber 1506or ErrorCode.ERR_BinaryFile 1507or ErrorCode.FTL_BadCodepage 1508or ErrorCode.ERR_NoMainOnDLL 1509or ErrorCode.FTL_InvalidTarget 1510or ErrorCode.FTL_InvalidInputFileName 1511or ErrorCode.WRN_NoConfigNotOnCommandLine 1512or ErrorCode.ERR_InvalidFileAlignment 1513or ErrorCode.WRN_DefineIdentifierRequired 1514or ErrorCode.FTL_OutputFileExists 1515or ErrorCode.ERR_OneAliasPerReference 1516or ErrorCode.ERR_SwitchNeedsNumber 1517or ErrorCode.ERR_MissingDebugSwitch 1518or ErrorCode.ERR_ComRefCallInExpressionTree 1519or ErrorCode.WRN_BadUILang 1520or ErrorCode.ERR_InvalidFormatForGuidForOption 1521or ErrorCode.ERR_MissingGuidForOption 1522or ErrorCode.ERR_InvalidOutputName 1523or ErrorCode.ERR_InvalidDebugInformationFormat 1524or ErrorCode.ERR_LegacyObjectIdSyntax 1525or ErrorCode.ERR_SourceLinkRequiresPdb 1526or ErrorCode.ERR_CannotEmbedWithoutPdb 1527or ErrorCode.ERR_BadSwitchValue 1528or ErrorCode.WRN_CLS_NoVarArgs 1529or ErrorCode.WRN_CLS_BadArgType 1530or ErrorCode.WRN_CLS_BadReturnType 1531or ErrorCode.WRN_CLS_BadFieldPropType 1532or ErrorCode.WRN_CLS_BadIdentifierCase 1533or ErrorCode.WRN_CLS_OverloadRefOut 1534or ErrorCode.WRN_CLS_OverloadUnnamed 1535or ErrorCode.WRN_CLS_BadIdentifier 1536or ErrorCode.WRN_CLS_BadBase 1537or ErrorCode.WRN_CLS_BadInterfaceMember 1538or ErrorCode.WRN_CLS_NoAbstractMembers 1539or ErrorCode.WRN_CLS_NotOnModules 1540or ErrorCode.WRN_CLS_ModuleMissingCLS 1541or ErrorCode.WRN_CLS_AssemblyNotCLS 1542or ErrorCode.WRN_CLS_BadAttributeType 1543or ErrorCode.WRN_CLS_ArrayArgumentToAttribute 1544or ErrorCode.WRN_CLS_NotOnModules2 1545or ErrorCode.WRN_CLS_IllegalTrueInFalse 1546or ErrorCode.WRN_CLS_MeaninglessOnPrivateType 1547or ErrorCode.WRN_CLS_AssemblyNotCLS2 1548or ErrorCode.WRN_CLS_MeaninglessOnParam 1549or ErrorCode.WRN_CLS_MeaninglessOnReturn 1550or ErrorCode.WRN_CLS_BadTypeVar 1551or ErrorCode.WRN_CLS_VolatileField 1552or ErrorCode.WRN_CLS_BadInterface 1553or ErrorCode.FTL_BadChecksumAlgorithm 1554or ErrorCode.ERR_BadAwaitArgIntrinsic 1555or ErrorCode.ERR_BadAwaitAsIdentifier 1556or ErrorCode.ERR_BadAwaitInFixed 1557or ErrorCode.ERR_UnsafeAsyncArgType 1558or ErrorCode.ERR_VarargsAsync 1559or ErrorCode.ERR_BadAwaitArgVoidCall 1560or ErrorCode.ERR_CantConvAsyncAnonFuncReturns 1561or ErrorCode.ERR_BadAwaiterPattern 1562or ErrorCode.ERR_BadSpecialByRefParameter 1563or ErrorCode.WRN_UnobservedAwaitableExpression 1564or ErrorCode.ERR_SynchronizedAsyncMethod 1565or ErrorCode.ERR_BadAsyncReturnExpression 1566or ErrorCode.ERR_NoConversionForCallerLineNumberParam 1567or ErrorCode.ERR_NoConversionForCallerFilePathParam 1568or ErrorCode.ERR_NoConversionForCallerMemberNameParam 1569or ErrorCode.ERR_BadCallerLineNumberParamWithoutDefaultValue 1570or ErrorCode.ERR_BadCallerFilePathParamWithoutDefaultValue 1571or ErrorCode.ERR_BadCallerMemberNameParamWithoutDefaultValue 1572or ErrorCode.ERR_BadPrefer32OnLib 1573or ErrorCode.WRN_CallerLineNumberParamForUnconsumedLocation 1574or ErrorCode.WRN_CallerFilePathParamForUnconsumedLocation 1575or ErrorCode.WRN_CallerMemberNameParamForUnconsumedLocation 1576or ErrorCode.ERR_DoesntImplementAwaitInterface 1577or ErrorCode.ERR_BadAwaitArg_NeedSystem 1578or ErrorCode.ERR_CantReturnVoid 1579or ErrorCode.ERR_SecurityCriticalOrSecuritySafeCriticalOnAsync 1580or ErrorCode.ERR_SecurityCriticalOrSecuritySafeCriticalOnAsyncInClassOrStruct 1581or ErrorCode.ERR_BadAwaitWithoutAsyncMethod 1582or ErrorCode.ERR_BadAwaitWithoutVoidAsyncMethod 1583or ErrorCode.ERR_BadAwaitWithoutAsyncLambda 1584or ErrorCode.ERR_NoSuchMemberOrExtensionNeedUsing 1585or ErrorCode.ERR_UnexpectedAliasedName 1586or ErrorCode.ERR_UnexpectedGenericName 1587or ErrorCode.ERR_UnexpectedUnboundGenericName 1588or ErrorCode.ERR_GlobalStatement 1589or ErrorCode.ERR_BadUsingType 1590or ErrorCode.ERR_ReservedAssemblyName 1591or ErrorCode.ERR_PPReferenceFollowsToken 1592or ErrorCode.ERR_ExpectedPPFile 1593or ErrorCode.ERR_ReferenceDirectiveOnlyAllowedInScripts 1594or ErrorCode.ERR_NameNotInContextPossibleMissingReference 1595or ErrorCode.ERR_MetadataNameTooLong 1596or ErrorCode.ERR_AttributesNotAllowed 1597or ErrorCode.ERR_ExternAliasNotAllowed 1598or ErrorCode.ERR_ConflictingAliasAndDefinition 1599or ErrorCode.ERR_GlobalDefinitionOrStatementExpected 1600or ErrorCode.ERR_ExpectedSingleScript 1601or ErrorCode.ERR_RecursivelyTypedVariable 1602or ErrorCode.ERR_YieldNotAllowedInScript 1603or ErrorCode.ERR_NamespaceNotAllowedInScript 1604or ErrorCode.WRN_StaticInAsOrIs 1605or ErrorCode.ERR_InvalidDelegateType 1606or ErrorCode.ERR_BadVisEventType 1607or ErrorCode.ERR_GlobalAttributesNotAllowed 1608or ErrorCode.ERR_PublicKeyFileFailure 1609or ErrorCode.ERR_PublicKeyContainerFailure 1610or ErrorCode.ERR_FriendRefSigningMismatch 1611or ErrorCode.ERR_CannotPassNullForFriendAssembly 1612or ErrorCode.ERR_SignButNoPrivateKey 1613or ErrorCode.WRN_DelaySignButNoKey 1614or ErrorCode.ERR_InvalidVersionFormat 1615or ErrorCode.WRN_InvalidVersionFormat 1616or ErrorCode.ERR_NoCorrespondingArgument 1617or ErrorCode.ERR_ResourceFileNameNotUnique 1618or ErrorCode.ERR_DllImportOnGenericMethod 1619or ErrorCode.ERR_ParameterNotValidForType 1620or ErrorCode.ERR_AttributeParameterRequired1 1621or ErrorCode.ERR_AttributeParameterRequired2 1622or ErrorCode.ERR_SecurityAttributeMissingAction 1623or ErrorCode.ERR_SecurityAttributeInvalidAction 1624or ErrorCode.ERR_SecurityAttributeInvalidActionAssembly 1625or ErrorCode.ERR_SecurityAttributeInvalidActionTypeOrMethod 1626or ErrorCode.ERR_PrincipalPermissionInvalidAction 1627or ErrorCode.ERR_FeatureNotValidInExpressionTree 1628or ErrorCode.ERR_MarshalUnmanagedTypeNotValidForFields 1629or ErrorCode.ERR_MarshalUnmanagedTypeOnlyValidForFields 1630or ErrorCode.ERR_PermissionSetAttributeInvalidFile 1631or ErrorCode.ERR_PermissionSetAttributeFileReadError 1632or ErrorCode.ERR_InvalidVersionFormat2 1633or ErrorCode.ERR_InvalidAssemblyCultureForExe 1634or ErrorCode.ERR_DuplicateAttributeInNetModule 1635or ErrorCode.ERR_CantOpenIcon 1636or ErrorCode.ERR_ErrorBuildingWin32Resources 1637or ErrorCode.ERR_BadAttributeParamDefaultArgument 1638or ErrorCode.ERR_MissingTypeInSource 1639or ErrorCode.ERR_MissingTypeInAssembly 1640or ErrorCode.ERR_SecurityAttributeInvalidTarget 1641or ErrorCode.ERR_InvalidAssemblyName 1642or ErrorCode.ERR_NoTypeDefFromModule 1643or ErrorCode.WRN_CallerFilePathPreferredOverCallerMemberName 1644or ErrorCode.WRN_CallerLineNumberPreferredOverCallerMemberName 1645or ErrorCode.WRN_CallerLineNumberPreferredOverCallerFilePath 1646or ErrorCode.ERR_InvalidDynamicCondition 1647or ErrorCode.ERR_WinRtEventPassedByRef 1648or ErrorCode.ERR_NetModuleNameMismatch 1649or ErrorCode.ERR_BadModuleName 1650or ErrorCode.ERR_BadCompilationOptionValue 1651or ErrorCode.ERR_BadAppConfigPath 1652or ErrorCode.WRN_AssemblyAttributeFromModuleIsOverridden 1653or ErrorCode.ERR_CmdOptionConflictsSource 1654or ErrorCode.ERR_FixedBufferTooManyDimensions 1655or ErrorCode.ERR_CantReadConfigFile 1656or ErrorCode.ERR_BadAwaitInCatchFilter 1657or ErrorCode.WRN_FilterIsConstantTrue 1658or ErrorCode.ERR_LinkedNetmoduleMetadataMustProvideFullPEImage 1659or ErrorCode.ERR_MetadataReferencesNotSupported 1660or ErrorCode.ERR_InvalidAssemblyCulture 1661or ErrorCode.ERR_MutuallyExclusiveOptions 1662or ErrorCode.ERR_InvalidDebugInfo 1663or ErrorCode.WRN_UnimplementedCommandLineSwitch 1664or ErrorCode.WRN_ReferencedAssemblyDoesNotHaveStrongName 1665or ErrorCode.ERR_InvalidSignaturePublicKey 1666or ErrorCode.ERR_ForwardedTypesConflict 1667or ErrorCode.WRN_RefCultureMismatch 1668or ErrorCode.ERR_AgnosticToMachineModule 1669or ErrorCode.ERR_ConflictingMachineModule 1670or ErrorCode.WRN_ConflictingMachineAssembly 1671or ErrorCode.ERR_CryptoHashFailed 1672or ErrorCode.ERR_MissingNetModuleReference 1673or ErrorCode.ERR_NetModuleNameMustBeUnique 1674or ErrorCode.ERR_UnsupportedTransparentIdentifierAccess 1675or ErrorCode.ERR_ParamDefaultValueDiffersFromAttribute 1676or ErrorCode.WRN_UnqualifiedNestedTypeInCref 1677or ErrorCode.HDN_UnusedUsingDirective 1678or ErrorCode.HDN_UnusedExternAlias 1679or ErrorCode.WRN_NoRuntimeMetadataVersion 1680or ErrorCode.ERR_FeatureNotAvailableInVersion1 1681or ErrorCode.ERR_FeatureNotAvailableInVersion2 1682or ErrorCode.ERR_FeatureNotAvailableInVersion3 1683or ErrorCode.ERR_FeatureNotAvailableInVersion4 1684or ErrorCode.ERR_FeatureNotAvailableInVersion5 1685or ErrorCode.ERR_FieldHasMultipleDistinctConstantValues 1686or ErrorCode.ERR_ComImportWithInitializers 1687or ErrorCode.WRN_PdbLocalNameTooLong 1688or ErrorCode.ERR_RetNoObjectRequiredLambda 1689or ErrorCode.ERR_TaskRetNoObjectRequiredLambda 1690or ErrorCode.WRN_AnalyzerCannotBeCreated 1691or ErrorCode.WRN_NoAnalyzerInAssembly 1692or ErrorCode.WRN_UnableToLoadAnalyzer 1693or ErrorCode.ERR_CantReadRulesetFile 1694or ErrorCode.ERR_BadPdbData 1695or ErrorCode.INF_UnableToLoadSomeTypesInAnalyzer 1696or ErrorCode.ERR_InitializerOnNonAutoProperty 1697or ErrorCode.ERR_AutoPropertyMustHaveGetAccessor 1698or ErrorCode.ERR_InstancePropertyInitializerInInterface 1699or ErrorCode.ERR_EnumsCantContainDefaultConstructor 1700or ErrorCode.ERR_EncodinglessSyntaxTree 1701or ErrorCode.ERR_BlockBodyAndExpressionBody 1702or ErrorCode.ERR_FeatureIsExperimental 1703or ErrorCode.ERR_FeatureNotAvailableInVersion6 1704or ErrorCode.ERR_SwitchFallOut 1705or ErrorCode.ERR_NullPropagatingOpInExpressionTree 1706or ErrorCode.WRN_NubExprIsConstBool2 1707or ErrorCode.ERR_DictionaryInitializerInExpressionTree 1708or ErrorCode.ERR_ExtensionCollectionElementInitializerInExpressionTree 1709or ErrorCode.ERR_UnclosedExpressionHole 1710or ErrorCode.ERR_UseDefViolationProperty 1711or ErrorCode.ERR_AutoPropertyMustOverrideSet 1712or ErrorCode.ERR_ExpressionHasNoName 1713or ErrorCode.ERR_SubexpressionNotInNameof 1714or ErrorCode.ERR_AliasQualifiedNameNotAnExpression 1715or ErrorCode.ERR_NameofMethodGroupWithTypeParameters 1716or ErrorCode.ERR_NoAliasHere 1717or ErrorCode.ERR_UnescapedCurly 1718or ErrorCode.ERR_EscapedCurly 1719or ErrorCode.ERR_TrailingWhitespaceInFormatSpecifier 1720or ErrorCode.ERR_EmptyFormatSpecifier 1721or ErrorCode.ERR_ErrorInReferencedAssembly 1722or ErrorCode.ERR_ExternHasConstructorInitializer 1723or ErrorCode.ERR_ExpressionOrDeclarationExpected 1724or ErrorCode.ERR_NameofExtensionMethod 1725or ErrorCode.WRN_AlignmentMagnitude 1726or ErrorCode.ERR_ConstantStringTooLong 1727or ErrorCode.ERR_DebugEntryPointNotSourceMethodDefinition 1728or ErrorCode.ERR_LoadDirectiveOnlyAllowedInScripts 1729or ErrorCode.ERR_PPLoadFollowsToken 1730or ErrorCode.ERR_SourceFileReferencesNotSupported 1731or ErrorCode.ERR_BadAwaitInStaticVariableInitializer 1732or ErrorCode.ERR_InvalidPathMap 1733or ErrorCode.ERR_PublicSignButNoKey 1734or ErrorCode.ERR_TooManyUserStrings 1735or ErrorCode.ERR_TooManyUserStrings_RestartRequired 1736or ErrorCode.ERR_PeWritingFailure 1737or ErrorCode.WRN_AttributeIgnoredWhenPublicSigning 1738or ErrorCode.ERR_OptionMustBeAbsolutePath 1739or ErrorCode.ERR_FeatureNotAvailableInVersion7 1740or ErrorCode.ERR_DynamicLocalFunctionParamsParameter 1741or ErrorCode.ERR_ExpressionTreeContainsLocalFunction 1742or ErrorCode.ERR_InvalidInstrumentationKind 1743or ErrorCode.ERR_LocalFunctionMissingBody 1744or ErrorCode.ERR_InvalidHashAlgorithmName 1745or ErrorCode.ERR_ThrowMisplaced 1746or ErrorCode.ERR_PatternNullableType 1747or ErrorCode.ERR_BadPatternExpression 1748or ErrorCode.ERR_SwitchExpressionValueExpected 1749or ErrorCode.ERR_SwitchCaseSubsumed 1750or ErrorCode.ERR_PatternWrongType 1751or ErrorCode.ERR_ExpressionTreeContainsIsMatch 1752or ErrorCode.WRN_TupleLiteralNameMismatch 1753or ErrorCode.ERR_TupleTooFewElements 1754or ErrorCode.ERR_TupleReservedElementName 1755or ErrorCode.ERR_TupleReservedElementNameAnyPosition 1756or ErrorCode.ERR_TupleDuplicateElementName 1757or ErrorCode.ERR_PredefinedTypeMemberNotFoundInAssembly 1758or ErrorCode.ERR_MissingDeconstruct 1759or ErrorCode.ERR_TypeInferenceFailedForImplicitlyTypedDeconstructionVariable 1760or ErrorCode.ERR_DeconstructRequiresExpression 1761or ErrorCode.ERR_DeconstructWrongCardinality 1762or ErrorCode.ERR_CannotDeconstructDynamic 1763or ErrorCode.ERR_DeconstructTooFewElements 1764or ErrorCode.ERR_ConversionNotTupleCompatible 1765or ErrorCode.ERR_DeconstructionVarFormDisallowsSpecificType 1766or ErrorCode.ERR_TupleElementNamesAttributeMissing 1767or ErrorCode.ERR_ExplicitTupleElementNamesAttribute 1768or ErrorCode.ERR_CantChangeTupleNamesOnOverride 1769or ErrorCode.ERR_DuplicateInterfaceWithTupleNamesInBaseList 1770or ErrorCode.ERR_ImplBadTupleNames 1771or ErrorCode.ERR_PartialMemberInconsistentTupleNames 1772or ErrorCode.ERR_ExpressionTreeContainsTupleLiteral 1773or ErrorCode.ERR_ExpressionTreeContainsTupleConversion 1774or ErrorCode.ERR_AutoPropertyCannotBeRefReturning 1775or ErrorCode.ERR_RefPropertyMustHaveGetAccessor 1776or ErrorCode.ERR_RefPropertyCannotHaveSetAccessor 1777or ErrorCode.ERR_CantChangeRefReturnOnOverride 1778or ErrorCode.ERR_MustNotHaveRefReturn 1779or ErrorCode.ERR_MustHaveRefReturn 1780or ErrorCode.ERR_RefReturnMustHaveIdentityConversion 1781or ErrorCode.ERR_CloseUnimplementedInterfaceMemberWrongRefReturn 1782or ErrorCode.ERR_RefReturningCallInExpressionTree 1783or ErrorCode.ERR_BadIteratorReturnRef 1784or ErrorCode.ERR_BadRefReturnExpressionTree 1785or ErrorCode.ERR_RefReturnLvalueExpected 1786or ErrorCode.ERR_RefReturnNonreturnableLocal 1787or ErrorCode.ERR_RefReturnNonreturnableLocal2 1788or ErrorCode.ERR_RefReturnRangeVariable 1789or ErrorCode.ERR_RefReturnReadonly 1790or ErrorCode.ERR_RefReturnReadonlyStatic 1791or ErrorCode.ERR_RefReturnReadonly2 1792or ErrorCode.ERR_RefReturnReadonlyStatic2 1793or ErrorCode.ERR_RefReturnParameter 1794or ErrorCode.ERR_RefReturnParameter2 1795or ErrorCode.ERR_RefReturnLocal 1796or ErrorCode.ERR_RefReturnLocal2 1797or ErrorCode.ERR_RefReturnStructThis 1798or ErrorCode.ERR_InitializeByValueVariableWithReference 1799or ErrorCode.ERR_InitializeByReferenceVariableWithValue 1800or ErrorCode.ERR_RefAssignmentMustHaveIdentityConversion 1801or ErrorCode.ERR_ByReferenceVariableMustBeInitialized 1802or ErrorCode.ERR_AnonDelegateCantUseLocal 1803or ErrorCode.ERR_PredefinedValueTupleTypeNotFound 1804or ErrorCode.ERR_SemiOrLBraceOrArrowExpected 1805or ErrorCode.ERR_NewWithTupleTypeSyntax 1806or ErrorCode.ERR_PredefinedValueTupleTypeMustBeStruct 1807or ErrorCode.ERR_DiscardTypeInferenceFailed 1808or ErrorCode.ERR_DeclarationExpressionNotPermitted 1809or ErrorCode.ERR_MustDeclareForeachIteration 1810or ErrorCode.ERR_TupleElementNamesInDeconstruction 1811or ErrorCode.ERR_ExpressionTreeContainsThrowExpression 1812or ErrorCode.ERR_DelegateRefMismatch 1813or ErrorCode.ERR_BadSourceCodeKind 1814or ErrorCode.ERR_BadDocumentationMode 1815or ErrorCode.ERR_BadLanguageVersion 1816or ErrorCode.ERR_ImplicitlyTypedVariableUsedInForbiddenZone 1817or ErrorCode.ERR_TypeInferenceFailedForImplicitlyTypedOutVariable 1818or ErrorCode.ERR_ExpressionTreeContainsOutVariable 1819or ErrorCode.ERR_VarInvocationLvalueReserved 1820or ErrorCode.ERR_PublicSignNetModule 1821or ErrorCode.ERR_BadAssemblyName 1822or ErrorCode.ERR_TypeForwardedToMultipleAssemblies 1823or ErrorCode.ERR_ExpressionTreeContainsDiscard 1824or ErrorCode.ERR_PatternDynamicType 1825or ErrorCode.ERR_VoidAssignment 1826or ErrorCode.ERR_VoidInTuple 1827or ErrorCode.ERR_Merge_conflict_marker_encountered 1828or ErrorCode.ERR_InvalidPreprocessingSymbol 1829or ErrorCode.ERR_FeatureNotAvailableInVersion7_1 1830or ErrorCode.ERR_LanguageVersionCannotHaveLeadingZeroes 1831or ErrorCode.ERR_CompilerAndLanguageVersion 1832or ErrorCode.WRN_WindowsExperimental 1833or ErrorCode.ERR_TupleInferredNamesNotAvailable 1834or ErrorCode.ERR_TypelessTupleInAs 1835or ErrorCode.ERR_NoRefOutWhenRefOnly 1836or ErrorCode.ERR_NoNetModuleOutputWhenRefOutOrRefOnly 1837or ErrorCode.ERR_BadOpOnNullOrDefaultOrNew 1838or ErrorCode.ERR_DefaultLiteralNotValid 1839or ErrorCode.ERR_PatternWrongGenericTypeInVersion 1840or ErrorCode.ERR_AmbigBinaryOpsOnDefault 1841or ErrorCode.ERR_FeatureNotAvailableInVersion7_2 1842or ErrorCode.WRN_UnreferencedLocalFunction 1843or ErrorCode.ERR_DynamicLocalFunctionTypeParameter 1844or ErrorCode.ERR_BadNonTrailingNamedArgument 1845or ErrorCode.ERR_NamedArgumentSpecificationBeforeFixedArgumentInDynamicInvocation 1846or ErrorCode.ERR_RefConditionalAndAwait 1847or ErrorCode.ERR_RefConditionalNeedsTwoRefs 1848or ErrorCode.ERR_RefConditionalDifferentTypes 1849or ErrorCode.ERR_BadParameterModifiers 1850or ErrorCode.ERR_RefReadonlyNotField 1851or ErrorCode.ERR_RefReadonlyNotField2 1852or ErrorCode.ERR_AssignReadonlyNotField 1853or ErrorCode.ERR_AssignReadonlyNotField2 1854or ErrorCode.ERR_RefReturnReadonlyNotField 1855or ErrorCode.ERR_RefReturnReadonlyNotField2 1856or ErrorCode.ERR_ExplicitReservedAttr 1857or ErrorCode.ERR_TypeReserved 1858or ErrorCode.ERR_EmbeddedAttributeMustFollowPattern 1859or ErrorCode.ERR_RefExtensionMustBeValueTypeOrConstrainedToOne 1860or ErrorCode.ERR_InExtensionMustBeValueType 1861or ErrorCode.ERR_FieldsInRoStruct 1862or ErrorCode.ERR_AutoPropsInRoStruct 1863or ErrorCode.ERR_FieldlikeEventsInRoStruct 1864or ErrorCode.ERR_FieldAutoPropCantBeByRefLike 1865or ErrorCode.ERR_StackAllocConversionNotPossible 1866or ErrorCode.ERR_EscapeCall 1867or ErrorCode.ERR_EscapeCall2 1868or ErrorCode.ERR_EscapeOther 1869or ErrorCode.ERR_CallArgMixing 1870or ErrorCode.ERR_MismatchedRefEscapeInTernary 1871or ErrorCode.ERR_EscapeVariable 1872or ErrorCode.ERR_EscapeStackAlloc 1873or ErrorCode.ERR_RefReturnThis 1874or ErrorCode.ERR_OutAttrOnInParam 1875or ErrorCode.ERR_PredefinedTypeAmbiguous 1876or ErrorCode.ERR_InvalidVersionFormatDeterministic 1877or ErrorCode.ERR_AttributeCtorInParameter 1878or ErrorCode.WRN_FilterIsConstantFalse 1879or ErrorCode.WRN_FilterIsConstantFalseRedundantTryCatch 1880or ErrorCode.ERR_ConditionalInInterpolation 1881or ErrorCode.ERR_CantUseVoidInArglist 1882or ErrorCode.ERR_InDynamicMethodArg 1883or ErrorCode.ERR_FeatureNotAvailableInVersion7_3 1884or ErrorCode.WRN_AttributesOnBackingFieldsNotAvailable 1885or ErrorCode.ERR_DoNotUseFixedBufferAttrOnProperty 1886or ErrorCode.ERR_RefLocalOrParamExpected 1887or ErrorCode.ERR_RefAssignNarrower 1888or ErrorCode.ERR_NewBoundWithUnmanaged 1889or ErrorCode.ERR_UnmanagedConstraintNotSatisfied 1890or ErrorCode.ERR_CantUseInOrOutInArglist 1891or ErrorCode.ERR_ConWithUnmanagedCon 1892or ErrorCode.ERR_UnmanagedBoundWithClass 1893or ErrorCode.ERR_InvalidStackAllocArray 1894or ErrorCode.ERR_ExpressionTreeContainsTupleBinOp 1895or ErrorCode.WRN_TupleBinopLiteralNameMismatch 1896or ErrorCode.ERR_TupleSizesMismatchForBinOps 1897or ErrorCode.ERR_ExprCannotBeFixed 1898or ErrorCode.ERR_InvalidObjectCreation 1899or ErrorCode.WRN_TypeParameterSameAsOuterMethodTypeParameter 1900or ErrorCode.ERR_OutVariableCannotBeByRef 1901or ErrorCode.ERR_DeconstructVariableCannotBeByRef 1902or ErrorCode.ERR_OmittedTypeArgument 1903or ErrorCode.ERR_FeatureNotAvailableInVersion8 1904or ErrorCode.ERR_AltInterpolatedVerbatimStringsNotAvailable 1905or ErrorCode.ERR_IteratorMustBeAsync 1906or ErrorCode.ERR_NoConvToIAsyncDisp 1907or ErrorCode.ERR_AwaitForEachMissingMember 1908or ErrorCode.ERR_BadGetAsyncEnumerator 1909or ErrorCode.ERR_MultipleIAsyncEnumOfT 1910or ErrorCode.ERR_ForEachMissingMemberWrongAsync 1911or ErrorCode.ERR_AwaitForEachMissingMemberWrongAsync 1912or ErrorCode.ERR_BadDynamicAwaitForEach 1913or ErrorCode.ERR_NoConvToIAsyncDispWrongAsync 1914or ErrorCode.ERR_NoConvToIDispWrongAsync 1915or ErrorCode.ERR_StaticLocalFunctionCannotCaptureVariable 1916or ErrorCode.ERR_StaticLocalFunctionCannotCaptureThis 1917or ErrorCode.ERR_AttributeNotOnEventAccessor 1918or ErrorCode.WRN_UnconsumedEnumeratorCancellationAttributeUsage 1919or ErrorCode.WRN_UndecoratedCancellationTokenParameter 1920or ErrorCode.ERR_MultipleEnumeratorCancellationAttributes 1921or ErrorCode.ERR_VarianceInterfaceNesting 1922or ErrorCode.ERR_ImplicitIndexIndexerWithName 1923or ErrorCode.ERR_ImplicitRangeIndexerWithName 1924or ErrorCode.ERR_WrongNumberOfSubpatterns 1925or ErrorCode.ERR_PropertyPatternNameMissing 1926or ErrorCode.ERR_MissingPattern 1927or ErrorCode.ERR_DefaultPattern 1928or ErrorCode.ERR_SwitchExpressionNoBestType 1929or ErrorCode.ERR_VarMayNotBindToType 1930or ErrorCode.WRN_SwitchExpressionNotExhaustive 1931or ErrorCode.ERR_SwitchArmSubsumed 1932or ErrorCode.ERR_ConstantPatternVsOpenType 1933or ErrorCode.WRN_CaseConstantNamedUnderscore 1934or ErrorCode.WRN_IsTypeNamedUnderscore 1935or ErrorCode.ERR_ExpressionTreeContainsSwitchExpression 1936or ErrorCode.ERR_SwitchGoverningExpressionRequiresParens 1937or ErrorCode.ERR_TupleElementNameMismatch 1938or ErrorCode.ERR_DeconstructParameterNameMismatch 1939or ErrorCode.ERR_IsPatternImpossible 1940or ErrorCode.WRN_GivenExpressionNeverMatchesPattern 1941or ErrorCode.WRN_GivenExpressionAlwaysMatchesConstant 1942or ErrorCode.ERR_PointerTypeInPatternMatching 1943or ErrorCode.ERR_ArgumentNameInITuplePattern 1944or ErrorCode.ERR_DiscardPatternInSwitchStatement 1945or ErrorCode.WRN_SwitchExpressionNotExhaustiveWithUnnamedEnumValue 1946or ErrorCode.WRN_ThrowPossibleNull 1947or ErrorCode.ERR_IllegalSuppression 1948or ErrorCode.WRN_ConvertingNullableToNonNullable 1949or ErrorCode.WRN_NullReferenceAssignment 1950or ErrorCode.WRN_NullReferenceReceiver 1951or ErrorCode.WRN_NullReferenceReturn 1952or ErrorCode.WRN_NullReferenceArgument 1953or ErrorCode.WRN_UnboxPossibleNull 1954or ErrorCode.WRN_DisallowNullAttributeForbidsMaybeNullAssignment 1955or ErrorCode.WRN_NullabilityMismatchInTypeOnOverride 1956or ErrorCode.WRN_NullabilityMismatchInReturnTypeOnOverride 1957or ErrorCode.WRN_NullabilityMismatchInParameterTypeOnOverride 1958or ErrorCode.WRN_NullabilityMismatchInParameterTypeOnPartial 1959or ErrorCode.WRN_NullabilityMismatchInTypeOnImplicitImplementation 1960or ErrorCode.WRN_NullabilityMismatchInReturnTypeOnImplicitImplementation 1961or ErrorCode.WRN_NullabilityMismatchInParameterTypeOnImplicitImplementation 1962or ErrorCode.WRN_NullabilityMismatchInTypeOnExplicitImplementation 1963or ErrorCode.WRN_NullabilityMismatchInReturnTypeOnExplicitImplementation 1964or ErrorCode.WRN_NullabilityMismatchInParameterTypeOnExplicitImplementation 1965or ErrorCode.WRN_UninitializedNonNullableField 1966or ErrorCode.WRN_NullabilityMismatchInAssignment 1967or ErrorCode.WRN_NullabilityMismatchInArgument 1968or ErrorCode.WRN_NullabilityMismatchInReturnTypeOfTargetDelegate 1969or ErrorCode.WRN_NullabilityMismatchInParameterTypeOfTargetDelegate 1970or ErrorCode.ERR_ExplicitNullableAttribute 1971or ErrorCode.WRN_NullabilityMismatchInArgumentForOutput 1972or ErrorCode.WRN_NullAsNonNullable 1973or ErrorCode.ERR_NullableUnconstrainedTypeParameter 1974or ErrorCode.ERR_AnnotationDisallowedInObjectCreation 1975or ErrorCode.WRN_NullableValueTypeMayBeNull 1976or ErrorCode.ERR_CompilationOptionNotAvailable 1977or ErrorCode.WRN_NullabilityMismatchInTypeParameterConstraint 1978or ErrorCode.WRN_MissingNonNullTypesContextForAnnotation 1979or ErrorCode.WRN_NullabilityMismatchInConstraintsOnImplicitImplementation 1980or ErrorCode.WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint 1981or ErrorCode.ERR_TripleDotNotAllowed 1982or ErrorCode.ERR_BadNullableContextOption 1983or ErrorCode.ERR_NullableDirectiveQualifierExpected 1984or ErrorCode.ERR_BadNullableTypeof 1985or ErrorCode.ERR_ExpressionTreeCantContainRefStruct 1986or ErrorCode.ERR_ElseCannotStartStatement 1987or ErrorCode.ERR_ExpressionTreeCantContainNullCoalescingAssignment 1988or ErrorCode.WRN_NullabilityMismatchInExplicitlyImplementedInterface 1989or ErrorCode.WRN_NullabilityMismatchInInterfaceImplementedByBase 1990or ErrorCode.WRN_DuplicateInterfaceWithNullabilityMismatchInBaseList 1991or ErrorCode.ERR_DuplicateExplicitImpl 1992or ErrorCode.ERR_UsingVarInSwitchCase 1993or ErrorCode.ERR_GoToForwardJumpOverUsingVar 1994or ErrorCode.ERR_GoToBackwardJumpOverUsingVar 1995or ErrorCode.ERR_IsNullableType 1996or ErrorCode.ERR_AsNullableType 1997or ErrorCode.ERR_FeatureInPreview 1998or ErrorCode.WRN_SwitchExpressionNotExhaustiveForNull 1999or ErrorCode.WRN_ImplicitCopyInReadOnlyMember 2000or ErrorCode.ERR_StaticMemberCantBeReadOnly 2001or ErrorCode.ERR_AutoSetterCantBeReadOnly 2002or ErrorCode.ERR_AutoPropertyWithSetterCantBeReadOnly 2003or ErrorCode.ERR_InvalidPropertyReadOnlyMods 2004or ErrorCode.ERR_InvalidPropertyUnsafeMods 2005or ErrorCode.ERR_DuplicatePropertyReadOnlyMods 2006or ErrorCode.ERR_SamePropertyUnsafeAccessorMods 2007or ErrorCode.ERR_FieldLikeEventCantBeReadOnly 2008or ErrorCode.ERR_PartialMemberReadOnlyDifference 2009or ErrorCode.ERR_ReadOnlyModMissingAccessor 2010or ErrorCode.ERR_OverrideRefConstraintNotSatisfied 2011or ErrorCode.ERR_OverrideValConstraintNotSatisfied 2012or ErrorCode.WRN_NullabilityMismatchInConstraintsOnPartialImplementation 2013or ErrorCode.ERR_NullableDirectiveTargetExpected 2014or ErrorCode.WRN_MissingNonNullTypesContextForAnnotationInGeneratedCode 2015or ErrorCode.WRN_NullReferenceInitializer 2016or ErrorCode.ERR_MultipleAnalyzerConfigsInSameDir 2017or ErrorCode.ERR_RuntimeDoesNotSupportDefaultInterfaceImplementation 2018or ErrorCode.ERR_RuntimeDoesNotSupportDefaultInterfaceImplementationForMember 2019or ErrorCode.ERR_InvalidModifierForLanguageVersion 2020or ErrorCode.ERR_ImplicitImplementationOfNonPublicInterfaceMember 2021or ErrorCode.ERR_MostSpecificImplementationIsNotFound 2022or ErrorCode.ERR_LanguageVersionDoesNotSupportInterfaceImplementationForMember 2023or ErrorCode.ERR_RuntimeDoesNotSupportProtectedAccessForInterfaceMember 2024or ErrorCode.ERR_DefaultInterfaceImplementationInNoPIAType 2025or ErrorCode.ERR_AbstractEventHasAccessors 2026or ErrorCode.WRN_NullabilityMismatchInTypeParameterNotNullConstraint 2027or ErrorCode.ERR_DuplicateNullSuppression 2028or ErrorCode.ERR_DefaultLiteralNoTargetType 2029or ErrorCode.ERR_ReAbstractionInNoPIAType 2030or ErrorCode.ERR_InternalError 2031or ErrorCode.ERR_ImplicitObjectCreationIllegalTargetType 2032or ErrorCode.ERR_ImplicitObjectCreationNotValid 2033or ErrorCode.ERR_ImplicitObjectCreationNoTargetType 2034or ErrorCode.ERR_BadFuncPointerParamModifier 2035or ErrorCode.ERR_BadFuncPointerArgCount 2036or ErrorCode.ERR_MethFuncPtrMismatch 2037or ErrorCode.ERR_FuncPtrRefMismatch 2038or ErrorCode.ERR_FuncPtrMethMustBeStatic 2039or ErrorCode.ERR_ExternEventInitializer 2040or ErrorCode.ERR_AmbigBinaryOpsOnUnconstrainedDefault 2041or ErrorCode.WRN_ParameterConditionallyDisallowsNull 2042or ErrorCode.WRN_ShouldNotReturn 2043or ErrorCode.WRN_TopLevelNullabilityMismatchInReturnTypeOnOverride 2044or ErrorCode.WRN_TopLevelNullabilityMismatchInParameterTypeOnOverride 2045or ErrorCode.WRN_TopLevelNullabilityMismatchInReturnTypeOnImplicitImplementation 2046or ErrorCode.WRN_TopLevelNullabilityMismatchInParameterTypeOnImplicitImplementation 2047or ErrorCode.WRN_TopLevelNullabilityMismatchInReturnTypeOnExplicitImplementation 2048or ErrorCode.WRN_TopLevelNullabilityMismatchInParameterTypeOnExplicitImplementation 2049or ErrorCode.WRN_DoesNotReturnMismatch 2050or ErrorCode.ERR_NoOutputDirectory 2051or ErrorCode.ERR_StdInOptionProvidedButConsoleInputIsNotRedirected 2052or ErrorCode.ERR_FeatureNotAvailableInVersion9 2053or ErrorCode.WRN_MemberNotNull 2054or ErrorCode.WRN_MemberNotNullWhen 2055or ErrorCode.WRN_MemberNotNullBadMember 2056or ErrorCode.WRN_ParameterDisallowsNull 2057or ErrorCode.WRN_ConstOutOfRangeChecked 2058or ErrorCode.ERR_DuplicateInterfaceWithDifferencesInBaseList 2059or ErrorCode.ERR_DesignatorBeneathPatternCombinator 2060or ErrorCode.ERR_UnsupportedTypeForRelationalPattern 2061or ErrorCode.ERR_RelationalPatternWithNaN 2062or ErrorCode.ERR_ConditionalOnLocalFunction 2063or ErrorCode.WRN_GeneratorFailedDuringInitialization 2064or ErrorCode.WRN_GeneratorFailedDuringGeneration 2065or ErrorCode.ERR_WrongFuncPtrCallingConvention 2066or ErrorCode.ERR_MissingAddressOf 2067or ErrorCode.ERR_CannotUseReducedExtensionMethodInAddressOf 2068or ErrorCode.ERR_CannotUseFunctionPointerAsFixedLocal 2069or ErrorCode.ERR_ExpressionTreeContainsPatternImplicitIndexer 2070or ErrorCode.ERR_ExpressionTreeContainsFromEndIndexExpression 2071or ErrorCode.ERR_ExpressionTreeContainsRangeExpression 2072or ErrorCode.WRN_GivenExpressionAlwaysMatchesPattern 2073or ErrorCode.WRN_IsPatternAlways 2074or ErrorCode.ERR_PartialMethodWithAccessibilityModsMustHaveImplementation 2075or ErrorCode.ERR_PartialMethodWithNonVoidReturnMustHaveAccessMods 2076or ErrorCode.ERR_PartialMethodWithOutParamMustHaveAccessMods 2077or ErrorCode.ERR_PartialMethodWithExtendedModMustHaveAccessMods 2078or ErrorCode.ERR_PartialMemberAccessibilityDifference 2079or ErrorCode.ERR_PartialMemberExtendedModDifference 2080or ErrorCode.ERR_SimpleProgramLocalIsReferencedOutsideOfTopLevelStatement 2081or ErrorCode.ERR_SimpleProgramMultipleUnitsWithTopLevelStatements 2082or ErrorCode.ERR_TopLevelStatementAfterNamespaceOrType 2083or ErrorCode.ERR_SimpleProgramNotAnExecutable 2084or ErrorCode.ERR_UnsupportedCallingConvention 2085or ErrorCode.ERR_InvalidFunctionPointerCallingConvention 2086or ErrorCode.ERR_InvalidFuncPointerReturnTypeModifier 2087or ErrorCode.ERR_DupReturnTypeMod 2088or ErrorCode.ERR_AddressOfMethodGroupInExpressionTree 2089or ErrorCode.ERR_CannotConvertAddressOfToDelegate 2090or ErrorCode.ERR_AddressOfToNonFunctionPointer 2091or ErrorCode.ERR_ModuleInitializerMethodMustBeOrdinary 2092or ErrorCode.ERR_ModuleInitializerMethodMustBeAccessibleOutsideTopLevelType 2093or ErrorCode.ERR_ModuleInitializerMethodMustBeStaticParameterlessVoid 2094or ErrorCode.ERR_ModuleInitializerMethodAndContainingTypesMustNotBeGeneric 2095or ErrorCode.ERR_PartialMethodReturnTypeDifference 2096or ErrorCode.ERR_PartialMemberRefReturnDifference 2097or ErrorCode.WRN_NullabilityMismatchInReturnTypeOnPartial 2098or ErrorCode.ERR_StaticAnonymousFunctionCannotCaptureVariable 2099or ErrorCode.ERR_StaticAnonymousFunctionCannotCaptureThis 2100or ErrorCode.ERR_OverrideDefaultConstraintNotSatisfied 2101or ErrorCode.ERR_DefaultConstraintOverrideOnly 2102or ErrorCode.WRN_ParameterNotNullIfNotNull 2103or ErrorCode.WRN_ReturnNotNullIfNotNull 2104or ErrorCode.WRN_PartialMethodTypeDifference 2105or ErrorCode.ERR_RuntimeDoesNotSupportCovariantReturnsOfClasses 2106or ErrorCode.ERR_RuntimeDoesNotSupportCovariantPropertiesOfClasses 2107or ErrorCode.WRN_SwitchExpressionNotExhaustiveWithWhen 2108or ErrorCode.WRN_SwitchExpressionNotExhaustiveForNullWithWhen 2109or ErrorCode.WRN_PrecedenceInversion 2110or ErrorCode.ERR_ExpressionTreeContainsWithExpression 2111or ErrorCode.WRN_AnalyzerReferencesFramework 2112or ErrorCode.WRN_RecordEqualsWithoutGetHashCode 2113or ErrorCode.ERR_AssignmentInitOnly 2114or ErrorCode.ERR_CantChangeInitOnlyOnOverride 2115or ErrorCode.ERR_CloseUnimplementedInterfaceMemberWrongInitOnly 2116or ErrorCode.ERR_ExplicitPropertyMismatchInitOnly 2117or ErrorCode.ERR_BadInitAccessor 2118or ErrorCode.ERR_InvalidWithReceiverType 2119or ErrorCode.ERR_CannotClone 2120or ErrorCode.ERR_CloneDisallowedInRecord 2121or ErrorCode.WRN_RecordNamedDisallowed 2122or ErrorCode.ERR_UnexpectedArgumentList 2123or ErrorCode.ERR_UnexpectedOrMissingConstructorInitializerInRecord 2124or ErrorCode.ERR_MultipleRecordParameterLists 2125or ErrorCode.ERR_BadRecordBase 2126or ErrorCode.ERR_BadInheritanceFromRecord 2127or ErrorCode.ERR_BadRecordMemberForPositionalParameter 2128or ErrorCode.ERR_NoCopyConstructorInBaseType 2129or ErrorCode.ERR_CopyConstructorMustInvokeBaseCopyConstructor 2130or ErrorCode.ERR_DoesNotOverrideMethodFromObject 2131or ErrorCode.ERR_SealedAPIInRecord 2132or ErrorCode.ERR_DoesNotOverrideBaseMethod 2133or ErrorCode.ERR_NotOverridableAPIInRecord 2134or ErrorCode.ERR_NonPublicAPIInRecord 2135or ErrorCode.ERR_SignatureMismatchInRecord 2136or ErrorCode.ERR_NonProtectedAPIInRecord 2137or ErrorCode.ERR_DoesNotOverrideBaseEqualityContract 2138or ErrorCode.ERR_StaticAPIInRecord 2139or ErrorCode.ERR_CopyConstructorWrongAccessibility 2140or ErrorCode.ERR_NonPrivateAPIInRecord 2141or ErrorCode.WRN_UnassignedThisAutoPropertyUnsupportedVersion 2142or ErrorCode.WRN_UnassignedThisUnsupportedVersion 2143or ErrorCode.WRN_ParamUnassigned 2144or ErrorCode.WRN_UseDefViolationProperty 2145or ErrorCode.WRN_UseDefViolationField 2146or ErrorCode.WRN_UseDefViolationThisUnsupportedVersion 2147or ErrorCode.WRN_UseDefViolationOut 2148or ErrorCode.WRN_UseDefViolation 2149or ErrorCode.ERR_CannotSpecifyManagedWithUnmanagedSpecifiers 2150or ErrorCode.ERR_RuntimeDoesNotSupportUnmanagedDefaultCallConv 2151or ErrorCode.ERR_TypeNotFound 2152or ErrorCode.ERR_TypeMustBePublic 2153or ErrorCode.ERR_InvalidUnmanagedCallersOnlyCallConv 2154or ErrorCode.ERR_CannotUseManagedTypeInUnmanagedCallersOnly 2155or ErrorCode.ERR_UnmanagedCallersOnlyMethodOrTypeCannotBeGeneric 2156or ErrorCode.ERR_UnmanagedCallersOnlyRequiresStatic 2157or ErrorCode.WRN_ParameterIsStaticClass 2158or ErrorCode.WRN_ReturnTypeIsStaticClass 2159or ErrorCode.ERR_EntryPointCannotBeUnmanagedCallersOnly 2160or ErrorCode.ERR_ModuleInitializerCannotBeUnmanagedCallersOnly 2161or ErrorCode.ERR_UnmanagedCallersOnlyMethodsCannotBeCalledDirectly 2162or ErrorCode.ERR_UnmanagedCallersOnlyMethodsCannotBeConvertedToDelegate 2163or ErrorCode.ERR_InitCannotBeReadonly 2164or ErrorCode.ERR_UnexpectedVarianceStaticMember 2165or ErrorCode.ERR_FunctionPointersCannotBeCalledWithNamedArguments 2166or ErrorCode.ERR_EqualityContractRequiresGetter 2167or ErrorCode.WRN_UnreadRecordParameter 2168or ErrorCode.ERR_BadFieldTypeInRecord 2169or ErrorCode.WRN_DoNotCompareFunctionPointers 2170or ErrorCode.ERR_RecordAmbigCtor 2171or ErrorCode.ERR_FunctionPointerTypesInAttributeNotSupported 2172or ErrorCode.ERR_InheritingFromRecordWithSealedToString 2173or ErrorCode.ERR_HiddenPositionalMember 2174or ErrorCode.ERR_GlobalUsingInNamespace 2175or ErrorCode.ERR_GlobalUsingOutOfOrder 2176or ErrorCode.ERR_AttributesRequireParenthesizedLambdaExpression 2177or ErrorCode.ERR_CannotInferDelegateType 2178or ErrorCode.ERR_InvalidNameInSubpattern 2179or ErrorCode.ERR_RuntimeDoesNotSupportStaticAbstractMembersInInterfaces 2180or ErrorCode.ERR_GenericConstraintNotSatisfiedInterfaceWithStaticAbstractMembers 2181or ErrorCode.ERR_BadAbstractUnaryOperatorSignature 2182or ErrorCode.ERR_BadAbstractIncDecSignature 2183or ErrorCode.ERR_BadAbstractIncDecRetType 2184or ErrorCode.ERR_BadAbstractBinaryOperatorSignature 2185or ErrorCode.ERR_BadAbstractShiftOperatorSignature 2186or ErrorCode.ERR_BadAbstractStaticMemberAccess 2187or ErrorCode.ERR_ExpressionTreeContainsAbstractStaticMemberAccess 2188or ErrorCode.ERR_CloseUnimplementedInterfaceMemberNotStatic 2189or ErrorCode.ERR_RuntimeDoesNotSupportStaticAbstractMembersInInterfacesForMember 2190or ErrorCode.ERR_ExplicitImplementationOfOperatorsMustBeStatic 2191or ErrorCode.ERR_AbstractConversionNotInvolvingContainedType 2192or ErrorCode.ERR_InterfaceImplementedByUnmanagedCallersOnlyMethod 2193or ErrorCode.HDN_DuplicateWithGlobalUsing 2194or ErrorCode.ERR_CantConvAnonMethReturnType 2195or ErrorCode.ERR_BuilderAttributeDisallowed 2196or ErrorCode.ERR_FeatureNotAvailableInVersion10 2197or ErrorCode.ERR_SimpleProgramIsEmpty 2198or ErrorCode.ERR_LineSpanDirectiveInvalidValue 2199or ErrorCode.ERR_LineSpanDirectiveEndLessThanStart 2200or ErrorCode.ERR_InterpolatedStringHandlerMethodReturnMalformed 2201or ErrorCode.ERR_InterpolatedStringHandlerMethodReturnInconsistent 2202or ErrorCode.ERR_NullInvalidInterpolatedStringHandlerArgumentName 2203or ErrorCode.ERR_NotInstanceInvalidInterpolatedStringHandlerArgumentName 2204or ErrorCode.ERR_InvalidInterpolatedStringHandlerArgumentName 2205or ErrorCode.ERR_TypeIsNotAnInterpolatedStringHandlerType 2206or ErrorCode.WRN_ParameterOccursAfterInterpolatedStringHandlerParameter 2207or ErrorCode.ERR_CannotUseSelfAsInterpolatedStringHandlerArgument 2208or ErrorCode.ERR_InterpolatedStringHandlerArgumentAttributeMalformed 2209or ErrorCode.ERR_InterpolatedStringHandlerArgumentLocatedAfterInterpolatedString 2210or ErrorCode.ERR_InterpolatedStringHandlerArgumentOptionalNotSpecified 2211or ErrorCode.ERR_ExpressionTreeContainsInterpolatedStringHandlerConversion 2212or ErrorCode.ERR_InterpolatedStringHandlerCreationCannotUseDynamic 2213or ErrorCode.ERR_MultipleFileScopedNamespace 2214or ErrorCode.ERR_FileScopedAndNormalNamespace 2215or ErrorCode.ERR_FileScopedNamespaceNotBeforeAllMembers 2216or ErrorCode.ERR_NoImplicitConvTargetTypedConditional 2217or ErrorCode.ERR_NonPublicParameterlessStructConstructor 2218or ErrorCode.ERR_NoConversionForCallerArgumentExpressionParam 2219or ErrorCode.WRN_CallerLineNumberPreferredOverCallerArgumentExpression 2220or ErrorCode.WRN_CallerFilePathPreferredOverCallerArgumentExpression 2221or ErrorCode.WRN_CallerMemberNamePreferredOverCallerArgumentExpression 2222or ErrorCode.WRN_CallerArgumentExpressionAttributeHasInvalidParameterName 2223or ErrorCode.ERR_BadCallerArgumentExpressionParamWithoutDefaultValue 2224or ErrorCode.WRN_CallerArgumentExpressionAttributeSelfReferential 2225or ErrorCode.WRN_CallerArgumentExpressionParamForUnconsumedLocation 2226or ErrorCode.ERR_NewlinesAreNotAllowedInsideANonVerbatimInterpolatedString 2227or ErrorCode.ERR_AttrTypeArgCannotBeTypeVar 2228or ErrorCode.ERR_AttrDependentTypeNotAllowed 2229or ErrorCode.WRN_InterpolatedStringHandlerArgumentAttributeIgnoredOnLambdaParameters 2230or ErrorCode.ERR_LambdaWithAttributesToExpressionTree 2231or ErrorCode.WRN_CompileTimeCheckedOverflow 2232or ErrorCode.WRN_MethGrpToNonDel 2233or ErrorCode.ERR_LambdaExplicitReturnTypeVar 2234or ErrorCode.ERR_InterpolatedStringsReferencingInstanceCannotBeInObjectInitializers 2235or ErrorCode.ERR_CannotUseRefInUnmanagedCallersOnly 2236or ErrorCode.ERR_CannotBeMadeNullable 2237or ErrorCode.ERR_UnsupportedTypeForListPattern 2238or ErrorCode.ERR_MisplacedSlicePattern 2239or ErrorCode.WRN_LowerCaseTypeName 2240or ErrorCode.ERR_RecordStructConstructorCallsDefaultConstructor 2241or ErrorCode.ERR_StructHasInitializersAndNoDeclaredConstructor 2242or ErrorCode.ERR_ListPatternRequiresLength 2243or ErrorCode.ERR_ScopedMismatchInParameterOfTarget 2244or ErrorCode.ERR_ScopedMismatchInParameterOfOverrideOrImplementation 2245or ErrorCode.ERR_ScopedMismatchInParameterOfPartial 2246or ErrorCode.ERR_RawStringNotInDirectives 2247or ErrorCode.ERR_UnterminatedRawString 2248or ErrorCode.ERR_TooManyQuotesForRawString 2249or ErrorCode.ERR_LineDoesNotStartWithSameWhitespace 2250or ErrorCode.ERR_RawStringDelimiterOnOwnLine 2251or ErrorCode.ERR_RawStringInVerbatimInterpolatedStrings 2252or ErrorCode.ERR_RawStringMustContainContent 2253or ErrorCode.ERR_LineContainsDifferentWhitespace 2254or ErrorCode.ERR_NotEnoughQuotesForRawString 2255or ErrorCode.ERR_NotEnoughCloseBracesForRawString 2256or ErrorCode.ERR_TooManyOpenBracesForRawString 2257or ErrorCode.ERR_TooManyCloseBracesForRawString 2258or ErrorCode.ERR_IllegalAtSequence 2259or ErrorCode.ERR_StringMustStartWithQuoteCharacter 2260or ErrorCode.ERR_NoEnumConstraint 2261or ErrorCode.ERR_NoDelegateConstraint 2262or ErrorCode.ERR_MisplacedRecord 2263or ErrorCode.ERR_PatternSpanCharCannotBeStringNull 2264or ErrorCode.ERR_UseDefViolationPropertyUnsupportedVersion 2265or ErrorCode.ERR_UseDefViolationFieldUnsupportedVersion 2266or ErrorCode.WRN_UseDefViolationPropertyUnsupportedVersion 2267or ErrorCode.WRN_UseDefViolationFieldUnsupportedVersion 2268or ErrorCode.WRN_UseDefViolationPropertySupportedVersion 2269or ErrorCode.WRN_UseDefViolationFieldSupportedVersion 2270or ErrorCode.WRN_UseDefViolationThisSupportedVersion 2271or ErrorCode.WRN_UnassignedThisAutoPropertySupportedVersion 2272or ErrorCode.WRN_UnassignedThisSupportedVersion 2273or ErrorCode.ERR_OperatorCantBeChecked 2274or ErrorCode.ERR_ImplicitConversionOperatorCantBeChecked 2275or ErrorCode.ERR_CheckedOperatorNeedsMatch 2276or ErrorCode.ERR_MisplacedUnchecked 2277or ErrorCode.ERR_LineSpanDirectiveRequiresSpace 2278or ErrorCode.ERR_RequiredNameDisallowed 2279or ErrorCode.ERR_OverrideMustHaveRequired 2280or ErrorCode.ERR_RequiredMemberCannotBeHidden 2281or ErrorCode.ERR_RequiredMemberCannotBeLessVisibleThanContainingType 2282or ErrorCode.ERR_ExplicitRequiredMember 2283or ErrorCode.ERR_RequiredMemberMustBeSettable 2284or ErrorCode.ERR_RequiredMemberMustBeSet 2285or ErrorCode.ERR_RequiredMembersMustBeAssignedValue 2286or ErrorCode.ERR_RequiredMembersInvalid 2287or ErrorCode.ERR_RequiredMembersBaseTypeInvalid 2288or ErrorCode.ERR_ChainingToSetsRequiredMembersRequiresSetsRequiredMembers 2289or ErrorCode.ERR_NewConstraintCannotHaveRequiredMembers 2290or ErrorCode.ERR_UnsupportedCompilerFeature 2291or ErrorCode.WRN_ObsoleteMembersShouldNotBeRequired 2292or ErrorCode.ERR_RefReturningPropertiesCannotBeRequired 2293or ErrorCode.ERR_ImplicitImplementationOfInaccessibleInterfaceMember 2294or ErrorCode.ERR_ScriptsAndSubmissionsCannotHaveRequiredMembers 2295or ErrorCode.ERR_BadAbstractEqualityOperatorSignature 2296or ErrorCode.ERR_BadBinaryReadOnlySpanConcatenation 2297or ErrorCode.ERR_ScopedRefAndRefStructOnly 2298or ErrorCode.ERR_ScopedDiscard 2299or ErrorCode.ERR_FixedFieldMustNotBeRef 2300or ErrorCode.ERR_RefFieldCannotReferToRefStruct 2301or ErrorCode.ERR_FileTypeDisallowedInSignature 2302or ErrorCode.ERR_FileTypeNoExplicitAccessibility 2303or ErrorCode.ERR_FileTypeBase 2304or ErrorCode.ERR_FileTypeNested 2305or ErrorCode.ERR_GlobalUsingStaticFileType 2306or ErrorCode.ERR_FileTypeNameDisallowed 2307or ErrorCode.ERR_FeatureNotAvailableInVersion11 2308or ErrorCode.ERR_RefFieldInNonRefStruct 2309or ErrorCode.WRN_AnalyzerReferencesNewerCompiler 2310or ErrorCode.ERR_CannotMatchOnINumberBase 2311or ErrorCode.ERR_ScopedTypeNameDisallowed 2312or ErrorCode.ERR_ImplicitlyTypedDefaultParameter 2313or ErrorCode.ERR_UnscopedRefAttributeUnsupportedTarget 2314or ErrorCode.ERR_RuntimeDoesNotSupportRefFields 2315or ErrorCode.ERR_ExplicitScopedRef 2316or ErrorCode.ERR_UnscopedScoped 2317or ErrorCode.WRN_DuplicateAnalyzerReference 2318or ErrorCode.ERR_FilePathCannotBeConvertedToUtf8 2319or ErrorCode.ERR_FileLocalDuplicateNameInNS 2320or ErrorCode.WRN_ScopedMismatchInParameterOfTarget 2321or ErrorCode.WRN_ScopedMismatchInParameterOfOverrideOrImplementation 2322or ErrorCode.ERR_RefReturnScopedParameter 2323or ErrorCode.ERR_RefReturnScopedParameter2 2324or ErrorCode.ERR_RefReturnOnlyParameter 2325or ErrorCode.ERR_RefReturnOnlyParameter2 2326or ErrorCode.ERR_RefAssignReturnOnly 2327or ErrorCode.WRN_ManagedAddr 2328or ErrorCode.WRN_EscapeVariable 2329or ErrorCode.WRN_EscapeStackAlloc 2330or ErrorCode.WRN_RefReturnNonreturnableLocal 2331or ErrorCode.WRN_RefReturnNonreturnableLocal2 2332or ErrorCode.WRN_RefReturnStructThis 2333or ErrorCode.WRN_RefAssignNarrower 2334or ErrorCode.WRN_MismatchedRefEscapeInTernary 2335or ErrorCode.WRN_RefReturnParameter 2336or ErrorCode.WRN_RefReturnScopedParameter 2337or ErrorCode.WRN_RefReturnParameter2 2338or ErrorCode.WRN_RefReturnScopedParameter2 2339or ErrorCode.WRN_RefReturnLocal 2340or ErrorCode.WRN_RefReturnLocal2 2341or ErrorCode.WRN_RefAssignReturnOnly 2342or ErrorCode.WRN_RefReturnOnlyParameter 2343or ErrorCode.WRN_RefReturnOnlyParameter2 2344or ErrorCode.ERR_RefAssignValEscapeWider 2345or ErrorCode.WRN_RefAssignValEscapeWider 2346or ErrorCode.WRN_OptionalParamValueMismatch 2347or ErrorCode.WRN_ParamsArrayInLambdaOnly 2348or ErrorCode.ERR_UnscopedRefAttributeUnsupportedMemberTarget 2349or ErrorCode.ERR_UnscopedRefAttributeInterfaceImplementation 2350or ErrorCode.ERR_UnrecognizedAttributeVersion 2351or ErrorCode.ERR_InvalidPrimaryConstructorParameterReference 2352or ErrorCode.ERR_AmbiguousPrimaryConstructorParameterAsColorColorReceiver 2353or ErrorCode.WRN_CapturedPrimaryConstructorParameterPassedToBase 2354or ErrorCode.WRN_UnreadPrimaryConstructorParameter 2355or ErrorCode.ERR_AssgReadonlyPrimaryConstructorParameter 2356or ErrorCode.ERR_RefReturnReadonlyPrimaryConstructorParameter 2357or ErrorCode.ERR_RefReadonlyPrimaryConstructorParameter 2358or ErrorCode.ERR_AssgReadonlyPrimaryConstructorParameter2 2359or ErrorCode.ERR_RefReturnReadonlyPrimaryConstructorParameter2 2360or ErrorCode.ERR_RefReadonlyPrimaryConstructorParameter2 2361or ErrorCode.ERR_RefReturnPrimaryConstructorParameter 2362or ErrorCode.ERR_StructLayoutCyclePrimaryConstructorParameter 2363or ErrorCode.ERR_UnexpectedParameterList 2364or ErrorCode.WRN_AddressOfInAsync 2365or ErrorCode.ERR_BadRefInUsingAlias 2366or ErrorCode.ERR_BadUnsafeInUsingDirective 2367or ErrorCode.ERR_BadNullableReferenceTypeInUsingAlias 2368or ErrorCode.ERR_BadStaticAfterUnsafe 2369or ErrorCode.ERR_BadCaseInSwitchArm 2370or ErrorCode.ERR_InterceptorsFeatureNotEnabled 2371or ErrorCode.ERR_InterceptorContainingTypeCannotBeGeneric 2372or ErrorCode.ERR_InterceptorPathNotInCompilation 2373or ErrorCode.ERR_InterceptorPathNotInCompilationWithCandidate 2374or ErrorCode.ERR_InterceptorPositionBadToken 2375or ErrorCode.ERR_InterceptorLineOutOfRange 2376or ErrorCode.ERR_InterceptorCharacterOutOfRange 2377or ErrorCode.ERR_InterceptorMethodMustBeOrdinary 2378or ErrorCode.ERR_InterceptorMustReferToStartOfTokenPosition 2379or ErrorCode.ERR_InterceptorFilePathCannotBeNull 2380or ErrorCode.ERR_InterceptorNameNotInvoked 2381or ErrorCode.ERR_InterceptorNonUniquePath 2382or ErrorCode.ERR_InterceptorLineCharacterMustBePositive 2383or ErrorCode.ERR_ConstantValueOfTypeExpected 2384or ErrorCode.ERR_UnsupportedPrimaryConstructorParameterCapturingRefAny 2385or ErrorCode.ERR_InterceptorCannotUseUnmanagedCallersOnly 2386or ErrorCode.ERR_BadUsingStaticType 2387or ErrorCode.WRN_CapturedPrimaryConstructorParameterInFieldInitializer 2388or ErrorCode.ERR_InlineArrayConversionToSpanNotSupported 2389or ErrorCode.ERR_InlineArrayConversionToReadOnlySpanNotSupported 2390or ErrorCode.ERR_InlineArrayIndexOutOfRange 2391or ErrorCode.ERR_InvalidInlineArrayLength 2392or ErrorCode.ERR_InvalidInlineArrayLayout 2393or ErrorCode.ERR_InvalidInlineArrayFields 2394or ErrorCode.ERR_ExpressionTreeContainsInlineArrayOperation 2395or ErrorCode.ERR_RuntimeDoesNotSupportInlineArrayTypes 2396or ErrorCode.ERR_InlineArrayBadIndex 2397or ErrorCode.ERR_NamedArgumentForInlineArray 2398or ErrorCode.ERR_CollectionExpressionTargetTypeNotConstructible 2399or ErrorCode.ERR_ExpressionTreeContainsCollectionExpression 2400or ErrorCode.ERR_CollectionExpressionNoTargetType 2401or ErrorCode.WRN_PrimaryConstructorParameterIsShadowedAndNotPassedToBase 2402or ErrorCode.ERR_InlineArrayUnsupportedElementFieldModifier 2403or ErrorCode.WRN_InlineArrayIndexerNotUsed 2404or ErrorCode.WRN_InlineArraySliceNotUsed 2405or ErrorCode.WRN_InlineArrayConversionOperatorNotUsed 2406or ErrorCode.WRN_InlineArrayNotSupportedByLanguage 2407or ErrorCode.ERR_CollectionBuilderAttributeMethodNotFound 2408or ErrorCode.ERR_CollectionBuilderAttributeInvalidType 2409or ErrorCode.ERR_CollectionBuilderAttributeInvalidMethodName 2410or ErrorCode.ERR_CollectionBuilderNoElementType 2411or ErrorCode.ERR_InlineArrayForEachNotSupported 2412or ErrorCode.ERR_RefReadOnlyWrongOrdering 2413or ErrorCode.WRN_BadArgRef 2414or ErrorCode.WRN_ArgExpectedRefOrIn 2415or ErrorCode.WRN_RefReadonlyNotVariable 2416or ErrorCode.ERR_BadArgExtraRefLangVersion 2417or ErrorCode.WRN_ArgExpectedIn 2418or ErrorCode.WRN_OverridingDifferentRefness 2419or ErrorCode.WRN_HidingDifferentRefness 2420or ErrorCode.WRN_TargetDifferentRefness 2421or ErrorCode.ERR_OutAttrOnRefReadonlyParam 2422or ErrorCode.WRN_RefReadonlyParameterDefaultValue 2423or ErrorCode.WRN_ByValArraySizeConstRequired 2424or ErrorCode.WRN_UseDefViolationRefField 2425or ErrorCode.ERR_FeatureNotAvailableInVersion12 2426or ErrorCode.ERR_CollectionExpressionEscape 2427or ErrorCode.WRN_Experimental 2428or ErrorCode.WRN_ExperimentalWithMessage 2429or ErrorCode.ERR_ExpectedInterpolatedString 2430or ErrorCode.ERR_InterceptorGlobalNamespace 2431or ErrorCode.WRN_CollectionExpressionRefStructMayAllocate 2432or ErrorCode.WRN_CollectionExpressionRefStructSpreadMayAllocate 2433or ErrorCode.ERR_CollectionExpressionImmutableArray 2434or ErrorCode.ERR_InvalidExperimentalDiagID 2435or ErrorCode.ERR_SpreadMissingMember 2436or ErrorCode.ERR_CollectionExpressionTargetNoElementType 2437or ErrorCode.ERR_CollectionExpressionMissingConstructor 2438or ErrorCode.ERR_CollectionExpressionMissingAdd 2439or ErrorCode.WRN_ConvertingLock 2440or ErrorCode.ERR_DynamicDispatchToParamsCollection 2441or ErrorCode.ERR_CollectionInitializerInfiniteChainOfAddCalls 2442or ErrorCode.ERR_ParamsCollectionInfiniteChainOfConstructorCalls 2443or ErrorCode.ERR_ParamsMemberCannotBeLessVisibleThanDeclaringMember 2444or ErrorCode.ERR_ParamsCollectionConstructorDoesntInitializeRequiredMember 2445or ErrorCode.ERR_ParamsCollectionExpressionTree 2446or ErrorCode.ERR_ParamsCollectionExtensionAddMethod 2447or ErrorCode.ERR_ParamsCollectionMissingConstructor 2448or ErrorCode.ERR_NoModifiersOnUsing 2449or ErrorCode.ERR_CannotDynamicInvokeOnExpression 2450or ErrorCode.ERR_InterceptsLocationDataInvalidFormat 2451or ErrorCode.ERR_InterceptsLocationUnsupportedVersion 2452or ErrorCode.ERR_InterceptsLocationDuplicateFile 2453or ErrorCode.ERR_InterceptsLocationFileNotFound 2454or ErrorCode.ERR_InterceptsLocationDataInvalidPosition 2455or ErrorCode.INF_TooManyBoundLambdas 2456or ErrorCode.ERR_BadYieldInUnsafe 2457or ErrorCode.ERR_AddressOfInIterator 2458or ErrorCode.ERR_RuntimeDoesNotSupportByRefLikeGenerics 2459or ErrorCode.ERR_RefStructConstraintAlreadySpecified 2460or ErrorCode.ERR_AllowsClauseMustBeLast 2461or ErrorCode.ERR_ClassIsCombinedWithRefStruct 2462or ErrorCode.ERR_NotRefStructConstraintNotSatisfied 2463or ErrorCode.ERR_RefStructDoesNotSupportDefaultInterfaceImplementationForMember 2464or ErrorCode.ERR_BadNonVirtualInterfaceMemberAccessOnAllowsRefLike 2465or ErrorCode.ERR_BadAllowByRefLikeEnumerator 2466or ErrorCode.ERR_PartialPropertyMissingImplementation 2467or ErrorCode.ERR_PartialPropertyMissingDefinition 2468or ErrorCode.ERR_PartialPropertyDuplicateDefinition 2469or ErrorCode.ERR_PartialPropertyDuplicateImplementation 2470or ErrorCode.ERR_PartialPropertyMissingAccessor 2471or ErrorCode.ERR_PartialPropertyUnexpectedAccessor 2472or ErrorCode.ERR_PartialPropertyInitMismatch 2473or ErrorCode.ERR_PartialMemberTypeDifference 2474or ErrorCode.WRN_PartialMemberSignatureDifference 2475or ErrorCode.ERR_PartialPropertyRequiredDifference 2476or ErrorCode.WRN_FieldIsAmbiguous 2477or ErrorCode.ERR_InlineArrayAttributeOnRecord 2478or ErrorCode.ERR_FeatureNotAvailableInVersion13 2479or ErrorCode.ERR_CannotApplyOverloadResolutionPriorityToOverride 2480or ErrorCode.ERR_CannotApplyOverloadResolutionPriorityToMember 2481or ErrorCode.ERR_PartialPropertyDuplicateInitializer 2482or ErrorCode.WRN_UninitializedNonNullableBackingField 2483or ErrorCode.WRN_UnassignedInternalRefField 2484or ErrorCode.WRN_AccessorDoesNotUseBackingField 2485or ErrorCode.ERR_IteratorRefLikeElementType 2486or ErrorCode.WRN_UnscopedRefAttributeOldRules 2487or ErrorCode.WRN_InterceptsLocationAttributeUnsupportedSignature 2488or ErrorCode.ERR_ImplicitlyTypedParamsParameter 2489or ErrorCode.ERR_VariableDeclarationNamedField 2490or ErrorCode.ERR_PartialMemberMissingImplementation 2491or ErrorCode.ERR_PartialMemberMissingDefinition 2492or ErrorCode.ERR_PartialMemberDuplicateDefinition 2493or ErrorCode.ERR_PartialMemberDuplicateImplementation 2494or ErrorCode.ERR_PartialEventInitializer 2495or ErrorCode.ERR_PartialConstructorInitializer 2496or ErrorCode.ERR_ExtensionDisallowsName 2497or ErrorCode.ERR_ExtensionDisallowsMember 2498or ErrorCode.ERR_BadExtensionContainingType 2499or ErrorCode.ERR_ExtensionParameterDisallowsDefaultValue 2500or ErrorCode.ERR_ReceiverParameterOnlyOne 2501or ErrorCode.ERR_ExtensionResolutionFailed 2502or ErrorCode.ERR_ReceiverParameterSameNameAsTypeParameter 2503or ErrorCode.ERR_LocalSameNameAsExtensionTypeParameter 2504or ErrorCode.ERR_TypeParameterSameNameAsExtensionTypeParameter 2505or ErrorCode.ERR_LocalSameNameAsExtensionParameter 2506or ErrorCode.ERR_ValueParameterSameNameAsExtensionParameter 2507or ErrorCode.ERR_TypeParameterSameNameAsExtensionParameter 2508or ErrorCode.ERR_InvalidExtensionParameterReference 2509or ErrorCode.ERR_ExtensionParameterInStaticContext 2510or ErrorCode.ERR_ValueParameterSameNameAsExtensionTypeParameter 2511or ErrorCode.ERR_UnderspecifiedExtension 2512or ErrorCode.ERR_ExpressionTreeContainsExtensionPropertyAccess 2513or ErrorCode.ERR_PPIgnoredFollowsToken 2514or ErrorCode.ERR_PPIgnoredNeedsFileBasedProgram 2515or ErrorCode.ERR_PPIgnoredFollowsIf 2516or ErrorCode.ERR_RefExtensionParameterMustBeValueTypeOrConstrainedToOne 2517or ErrorCode.ERR_InExtensionParameterMustBeValueType 2518or ErrorCode.ERR_ProtectedInExtension 2519or ErrorCode.ERR_InstanceMemberWithUnnamedExtensionsParameter 2520or ErrorCode.ERR_InitInExtension 2521or ErrorCode.ERR_ModifierOnUnnamedReceiverParameter 2522or ErrorCode.ERR_ExtensionTypeNameDisallowed 2523or ErrorCode.ERR_ExpressionTreeContainsNamedArgumentOutOfPosition 2524or ErrorCode.ERR_OperatorsMustBePublic 2525or ErrorCode.ERR_OperatorMustReturnVoid 2526or ErrorCode.ERR_CloseUnimplementedInterfaceMemberOperatorMismatch 2527or ErrorCode.ERR_OperatorMismatchOnOverride 2528or ErrorCode.ERR_BadCompoundAssignmentOpArgs 2529or ErrorCode.ERR_PPShebangInProjectBasedProgram 2530or ErrorCode.ERR_PPShebangNotOnFirstLine 2531or ErrorCode.ERR_NameofExtensionMember 2532or ErrorCode.ERR_BadExtensionUnaryOperatorSignature 2533or ErrorCode.ERR_BadExtensionIncDecSignature 2534or ErrorCode.ERR_BadExtensionBinaryOperatorSignature 2535or ErrorCode.ERR_BadExtensionShiftOperatorSignature 2536or ErrorCode.ERR_OperatorInExtensionOfStaticClass 2537or ErrorCode.ERR_InstanceOperatorStructExtensionWrongReceiverRefKind 2538or ErrorCode.ERR_InstanceOperatorExtensionWrongReceiverType 2539or ErrorCode.ERR_ExpressionTreeContainsExtensionBasedConditionalLogicalOperator 2540or ErrorCode.ERR_InterpolatedStringHandlerArgumentDisallowed 2541or ErrorCode.ERR_MemberNameSameAsExtendedType 2542or ErrorCode.ERR_FeatureNotAvailableInVersion14 2543or ErrorCode.ERR_FeatureNotAvailableInVersion15 2544or ErrorCode.ERR_UnsupportedFeatureInRuntimeAsync 2545or ErrorCode.ERR_ExtensionBlockCollision 2546or ErrorCode.ERR_MethodImplAttributeAsyncCannotBeUsed 2547or ErrorCode.ERR_AttributeCannotBeAppliedManually 2548or ErrorCode.ERR_BadSpreadInCatchFilter 2549or ErrorCode.ERR_ExplicitInterfaceMemberTypeMismatch 2550or ErrorCode.ERR_ExplicitInterfaceMemberReturnTypeMismatch 2551or ErrorCode.WRN_RedundantPattern 2552or ErrorCode.HDN_RedundantPatternStackGuard 2553or ErrorCode.ERR_BadVisBaseType 2554or ErrorCode.ERR_CollectionArgumentsMustBeFirst 2555or ErrorCode.ERR_CollectionArgumentsNotSupportedForType 2556or ErrorCode.ERR_CollectionArgumentsDynamicBinding 2557or ErrorCode.ERR_CollectionArgumentsMustBeEmpty 2558or ErrorCode.ERR_CollectionRefLikeElementType 2559or ErrorCode.ERR_BadCollectionArgumentsArgCount 2560or ErrorCode.ERR_AmbigExtension 2561or ErrorCode.ERR_SingleInapplicableBinaryOperator 2562or ErrorCode.ERR_SingleInapplicableUnaryOperator 2563or ErrorCode.ERR_AmbigOperator 2564or ErrorCode.ERR_UnexpectedArgumentListInBaseTypeWithoutParameterList 2565or ErrorCode.ERR_EqualityOperatorInPatternNotSupported 2566or ErrorCode.ERR_InequalityOperatorInPatternNotSupported 2567or ErrorCode.ERR_DesignatorBeforePropertyPattern 2568or ErrorCode.ERR_CompilationUnitUnexpected 2569or ErrorCode.ERR_ScopedAfterInOutRefReadonly 2570or ErrorCode.ERR_InvalidModifierAfterScoped 2571or ErrorCode.ERR_StructLayoutAndExtendedLayout 2572or ErrorCode.ERR_RuntimeDoesNotSupportExtendedLayoutTypes 2573or ErrorCode.ERR_NoAwaitOnAsyncEnumerable 2574or ErrorCode.ERR_UnsafeOperation 2575or ErrorCode.ERR_UnsafeUnassignedAddressOf 2576or ErrorCode.ERR_UnsafeUninitializedStackAlloc 2577or ErrorCode.ERR_UnsafeMemberOperation 2578or ErrorCode.ERR_UnsafeMemberOperationCompat 2579or ErrorCode.ERR_RequiresUnsafeOverridingSafe 2580or ErrorCode.ERR_RequiresUnsafeImplicitlyImplementingSafe 2581or ErrorCode.ERR_RequiresUnsafeExplicitlyImplementingSafe 2582or ErrorCode.ERR_ExpressionTreeContainsUnionConversion 2583or ErrorCode.ERR_UnionDeclarationNeedsCaseTypes 2584or ErrorCode.ERR_NoImplicitConversionToObject 2585or ErrorCode.ERR_UnionMatchingWrongPattern 2586or ErrorCode.ERR_InstanceFieldInUnion 2587or ErrorCode.ERR_InstanceCtorWithOneParameterInUnion 2588or ErrorCode.ERR_UnionConstructorCallsDefaultConstructor 2589or ErrorCode.ERR_UnsafeConstructorConstraint 2590or ErrorCode.ERR_UnsafeMeaningless 2591or ErrorCode.ERR_RequiresUnsafeAttributeInSource 2592or ErrorCode.ERR_ClosedTypeNameDisallowed 2593or ErrorCode.ERR_ClosedSealedStatic 2594or ErrorCode.ERR_ClosedBaseTypeBaseFromOtherAssembly 2595or ErrorCode.ERR_UnderspecifiedClosedSubtype 2596or ErrorCode.ERR_ClosedExplicitlyAbstract 2597or ErrorCode.ERR_MissingUnionCaseTypes 2598or ErrorCode.ERR_MissingUnionValueProperty 2599or ErrorCode.ERR_MemberProviderInUnionDeclaration 2600or ErrorCode.ERR_SafeModifierCannotBeUsedWithUnsafe 2601or ErrorCode.ERR_ExternMemberRequiresUnsafeOrSafe 2602or ErrorCode.ERR_PartialMemberSafeDifference 2603or ErrorCode.ERR_LayoutFieldRequiresUnsafeOrSafe 2604or ErrorCode.ERR_NoBreakId 2605or ErrorCode.ERR_NoContinueId 2606or ErrorCode.ERR_ClosedBadDerivedTypesProperty 2607or ErrorCode.ERR_BadCompilationOptionValueAccepted 2608or ErrorCode.ERR_IllegalUnsafeModifier 2609or ErrorCode.WRN_DeprecatedFeatureFlag 2624internal static bool PreventsSuccessfulDelegateConversion(ErrorCode code) 2626if (code == ErrorCode.Void || code == ErrorCode.Unknown) 2638case ErrorCode.ERR_DuplicateParamName: 2639case ErrorCode.ERR_LocalDuplicate: 2640case ErrorCode.ERR_LocalIllegallyOverrides: 2641case ErrorCode.ERR_LocalSameNameAsTypeParam: 2642case ErrorCode.ERR_QueryRangeVariableOverrides: 2643case ErrorCode.ERR_QueryRangeVariableSameAsTypeParam: 2644case ErrorCode.ERR_DeprecatedCollectionInitAddStr: 2645case ErrorCode.ERR_DeprecatedSymbolStr: 2646case ErrorCode.ERR_MissingPredefinedMember: 2647case ErrorCode.ERR_DefaultValueUsedWithAttributes: 2648case ErrorCode.ERR_ExplicitParamArrayOrCollection: 2663if (ErrorFacts.PreventsSuccessfulDelegateConversion((ErrorCode)diag.Code)) 2676if (ErrorFacts.PreventsSuccessfulDelegateConversion((ErrorCode)diag.Code)) 2685internal static ErrorCode GetStaticClassParameterCode(bool useWarning) 2686=> useWarning ? ErrorCode.WRN_ParameterIsStaticClass : ErrorCode.ERR_ParameterIsStaticClass; 2688internal static ErrorCode GetStaticClassReturnCode(bool useWarning) 2689=> useWarning ? ErrorCode.WRN_ReturnTypeIsStaticClass : ErrorCode.ERR_ReturnTypeIsStaticClass;
Errors\LazyArrayElementCantBeRefAnyDiagnosticInfo.cs (1)
36return new CSDiagnosticInfo(ErrorCode.ERR_ArrayElementCantBeRefAny, _possiblyRestrictedTypeSymbol.Type);
Errors\LazyDiagnosticInfo.cs (1)
14: base(CSharp.MessageProvider.Instance, (int)ErrorCode.Unknown)
Errors\LazyMissingNonNullTypesContextDiagnosticInfo.cs (3)
75var code = tree.IsGeneratedCode(binder.Compilation.Options.SyntaxTreeOptionsProvider, CancellationToken.None) 76? ErrorCode.WRN_MissingNonNullTypesContextForAnnotationInGeneratedCode 77: ErrorCode.WRN_MissingNonNullTypesContextForAnnotation;
Errors\LazyUnmanagedCallersOnlyMethodCalledDiagnosticInfo.cs (2)
42? ErrorCode.ERR_UnmanagedCallersOnlyMethodsCannotBeConvertedToDelegate 43: ErrorCode.ERR_UnmanagedCallersOnlyMethodsCannotBeCalledDirectly,
Errors\MessageID.cs (2)
479return new CSDiagnosticInfo(ErrorCode.ERR_FeatureIsExperimental, feature.Localize(), requiredFeature); 484? new CSDiagnosticInfo(ErrorCode.ERR_FeatureInPreview, feature.Localize())
Errors\MessageProvider.cs (100)
27return ErrorFacts.GetSeverity((ErrorCode)code); 32return ErrorFacts.GetMessage((ErrorCode)code, language); 37return ErrorFacts.GetMessageFormat((ErrorCode)code); 42return ErrorFacts.GetDescription((ErrorCode)code); 47return ErrorFacts.GetTitle((ErrorCode)code); 52return ErrorFacts.GetHelpLink((ErrorCode)code); 57return ErrorFacts.GetCategory((ErrorCode)code); 79return ErrorFacts.GetWarningLevel((ErrorCode)code); 84get { return typeof(ErrorCode); } 89var info = new CSDiagnosticInfo((ErrorCode)code, args, ImmutableArray<Symbol>.Empty, ImmutableArray<Location>.Empty); 110(ErrorCode)code is not ( 111ErrorCode.WRN_UseDefViolationPropertySupportedVersion 112or ErrorCode.WRN_UseDefViolationFieldSupportedVersion 113or ErrorCode.WRN_UseDefViolationThisSupportedVersion 114or ErrorCode.WRN_UnassignedThisAutoPropertySupportedVersion 115or ErrorCode.WRN_UnassignedThisSupportedVersion 116or ErrorCode.WRN_CollectionExpressionRefStructMayAllocate 117or ErrorCode.WRN_CollectionExpressionRefStructSpreadMayAllocate 154public override int ERR_FailedToCreateTempFile => (int)ErrorCode.ERR_CantMakeTempFile; 155public override int ERR_MultipleAnalyzerConfigsInSameDir => (int)ErrorCode.ERR_MultipleAnalyzerConfigsInSameDir; 158public override int ERR_ExpectedSingleScript => (int)ErrorCode.ERR_ExpectedSingleScript; 159public override int ERR_OpenResponseFile => (int)ErrorCode.ERR_OpenResponseFile; 160public override int ERR_InvalidPathMap => (int)ErrorCode.ERR_InvalidPathMap; 161public override int FTL_InvalidInputFileName => (int)ErrorCode.FTL_InvalidInputFileName; 162public override int ERR_FileNotFound => (int)ErrorCode.ERR_FileNotFound; 163public override int ERR_NoSourceFile => (int)ErrorCode.ERR_NoSourceFile; 164public override int ERR_CantOpenFileWrite => (int)ErrorCode.ERR_CantOpenFileWrite; 165public override int ERR_OutputWriteFailed => (int)ErrorCode.ERR_OutputWriteFailed; 166public override int WRN_NoConfigNotOnCommandLine => (int)ErrorCode.WRN_NoConfigNotOnCommandLine; 167public override int ERR_BinaryFile => (int)ErrorCode.ERR_BinaryFile; 168public override int WRN_AnalyzerCannotBeCreated => (int)ErrorCode.WRN_AnalyzerCannotBeCreated; 169public override int WRN_NoAnalyzerInAssembly => (int)ErrorCode.WRN_NoAnalyzerInAssembly; 170public override int WRN_UnableToLoadAnalyzer => (int)ErrorCode.WRN_UnableToLoadAnalyzer; 171public override int WRN_AnalyzerReferencesFramework => (int)ErrorCode.WRN_AnalyzerReferencesFramework; 172public override int WRN_AnalyzerReferencesNewerCompiler => (int)ErrorCode.WRN_AnalyzerReferencesNewerCompiler; 173public override int WRN_DuplicateAnalyzerReference => (int)ErrorCode.WRN_DuplicateAnalyzerReference; 174public override int INF_UnableToLoadSomeTypesInAnalyzer => (int)ErrorCode.INF_UnableToLoadSomeTypesInAnalyzer; 175public override int ERR_CantReadRulesetFile => (int)ErrorCode.ERR_CantReadRulesetFile; 176public override int ERR_CompileCancelled => (int)ErrorCode.ERR_CompileCancelled; 179public override int ERR_BadSourceCodeKind => (int)ErrorCode.ERR_BadSourceCodeKind; 180public override int ERR_BadDocumentationMode => (int)ErrorCode.ERR_BadDocumentationMode; 183public override int ERR_BadCompilationOptionValue => (int)ErrorCode.ERR_BadCompilationOptionValue; 184public override int ERR_MutuallyExclusiveOptions => (int)ErrorCode.ERR_MutuallyExclusiveOptions; 187public override int ERR_InvalidDebugInformationFormat => (int)ErrorCode.ERR_InvalidDebugInformationFormat; 188public override int ERR_InvalidOutputName => (int)ErrorCode.ERR_InvalidOutputName; 189public override int ERR_InvalidFileAlignment => (int)ErrorCode.ERR_InvalidFileAlignment; 190public override int ERR_InvalidSubsystemVersion => (int)ErrorCode.ERR_InvalidSubsystemVersion; 191public override int ERR_InvalidInstrumentationKind => (int)ErrorCode.ERR_InvalidInstrumentationKind; 192public override int ERR_InvalidHashAlgorithmName => (int)ErrorCode.ERR_InvalidHashAlgorithmName; 195public override int ERR_MetadataFileNotAssembly => (int)ErrorCode.ERR_ImportNonAssembly; 196public override int ERR_MetadataFileNotModule => (int)ErrorCode.ERR_AddModuleAssembly; 197public override int ERR_InvalidAssemblyMetadata => (int)ErrorCode.FTL_MetadataCantOpenFile; 198public override int ERR_InvalidModuleMetadata => (int)ErrorCode.FTL_MetadataCantOpenFile; 199public override int ERR_ErrorOpeningAssemblyFile => (int)ErrorCode.FTL_MetadataCantOpenFile; 200public override int ERR_ErrorOpeningModuleFile => (int)ErrorCode.FTL_MetadataCantOpenFile; 201public override int ERR_MetadataFileNotFound => (int)ErrorCode.ERR_NoMetadataFile; 202public override int ERR_MetadataReferencesNotSupported => (int)ErrorCode.ERR_MetadataReferencesNotSupported; 203public override int ERR_LinkedNetmoduleMetadataMustProvideFullPEImage => (int)ErrorCode.ERR_LinkedNetmoduleMetadataMustProvideFullPEImage; 207diagnostics.Add(ErrorCode.ERR_DuplicateImport, location, 214diagnostics.Add(ErrorCode.ERR_DuplicateImportSimple, location, 220public override int ERR_PublicKeyFileFailure => (int)ErrorCode.ERR_PublicKeyFileFailure; 221public override int ERR_PublicKeyContainerFailure => (int)ErrorCode.ERR_PublicKeyContainerFailure; 222public override int ERR_OptionMustBeAbsolutePath => (int)ErrorCode.ERR_OptionMustBeAbsolutePath; 225public override int ERR_CantReadResource => (int)ErrorCode.ERR_CantReadResource; 226public override int ERR_CantOpenWin32Resource => (int)ErrorCode.ERR_CantOpenWin32Res; 227public override int ERR_CantOpenWin32Manifest => (int)ErrorCode.ERR_CantOpenWin32Manifest; 228public override int ERR_CantOpenWin32Icon => (int)ErrorCode.ERR_CantOpenIcon; 229public override int ERR_ErrorBuildingWin32Resource => (int)ErrorCode.ERR_ErrorBuildingWin32Resources; 230public override int ERR_BadWin32Resource => (int)ErrorCode.ERR_BadWin32Res; 231public override int ERR_ResourceFileNameNotUnique => (int)ErrorCode.ERR_ResourceFileNameNotUnique; 232public override int ERR_ResourceNotUnique => (int)ErrorCode.ERR_ResourceNotUnique; 233public override int ERR_ResourceInModule => (int)ErrorCode.ERR_CantRefResource; 236public override int ERR_PermissionSetAttributeFileReadError => (int)ErrorCode.ERR_PermissionSetAttributeFileReadError; 237public override int ERR_MethodImplAttributeAsyncCannotBeUsed => (int)ErrorCode.ERR_MethodImplAttributeAsyncCannotBeUsed; 240public override int ERR_EncodinglessSyntaxTree => (int)ErrorCode.ERR_EncodinglessSyntaxTree; 241public override int WRN_PdbUsingNameTooLong => (int)ErrorCode.WRN_DebugFullNameTooLong; 242public override int WRN_PdbLocalNameTooLong => (int)ErrorCode.WRN_PdbLocalNameTooLong; 243public override int ERR_PdbWritingFailed => (int)ErrorCode.FTL_DebugEmitFailure; 246public override int ERR_MetadataNameTooLong => (int)ErrorCode.ERR_MetadataNameTooLong; 247public override int ERR_EncReferenceToAddedMember => (int)ErrorCode.ERR_EncReferenceToAddedMember; 248public override int ERR_TooManyUserStrings => (int)ErrorCode.ERR_TooManyUserStrings; 249public override int ERR_TooManyUserStrings_RestartRequired => (int)ErrorCode.ERR_TooManyUserStrings_RestartRequired; 250public override int ERR_PeWritingFailure => (int)ErrorCode.ERR_PeWritingFailure; 251public override int ERR_ModuleEmitFailure => (int)ErrorCode.ERR_ModuleEmitFailure; 252public override int ERR_EncUpdateFailedMissingSymbol => (int)ErrorCode.ERR_EncUpdateFailedMissingSymbol; 253public override int ERR_InvalidDebugInfo => (int)ErrorCode.ERR_InvalidDebugInfo; 254public override int ERR_FunctionPointerTypesInAttributeNotSupported => (int)ErrorCode.ERR_FunctionPointerTypesInAttributeNotSupported; 255public override int ERR_DataSectionStringLiteralHashCollision => (int)ErrorCode.ERR_DataSectionStringLiteralHashCollision; 256public override int ERR_EncUpdateRequiresEmittingExplicitInterfaceImplementationNotSupportedByTheRuntime => (int)ErrorCode.ERR_EncUpdateRequiresEmittingExplicitInterfaceImplementationNotSupportedByTheRuntime; 259public override int WRN_GeneratorFailedDuringInitialization => (int)ErrorCode.WRN_GeneratorFailedDuringInitialization; 260public override int WRN_GeneratorFailedDuringGeneration => (int)ErrorCode.WRN_GeneratorFailedDuringGeneration; 265diagnostics.Add(ErrorCode.ERR_InvalidAttributeArgument, ((CSharpAttributeData)attribute).GetAttributeArgumentLocation(parameterIndex), node.GetErrorDisplayName()); 271diagnostics.Add(ErrorCode.ERR_InvalidNamedArgument, node.ArgumentList.Arguments[namedArgumentIndex].Location, parameterName); 277diagnostics.Add(ErrorCode.ERR_ParameterNotValidForType, node.ArgumentList.Arguments[namedArgumentIndex].Location); 282diagnostics.Add(ErrorCode.ERR_MarshalUnmanagedTypeNotValidForFields, ((CSharpAttributeData)attribute).GetAttributeArgumentLocation(parameterIndex), unmanagedTypeName); 287diagnostics.Add(ErrorCode.ERR_MarshalUnmanagedTypeOnlyValidForFields, ((CSharpAttributeData)attribute).GetAttributeArgumentLocation(parameterIndex), unmanagedTypeName); 293diagnostics.Add(ErrorCode.ERR_AttributeParameterRequired1, node.Name.Location, parameterName); 299diagnostics.Add(ErrorCode.ERR_AttributeParameterRequired2, node.Name.Location, parameterName1, parameterName2); 302public override int ERR_BadAssemblyName => (int)ErrorCode.ERR_BadAssemblyName; 304public override int? WRN_ByValArraySizeConstRequired => (int)ErrorCode.WRN_ByValArraySizeConstRequired;
Errors\SyntaxDiagnosticInfo.cs (5)
31internal SyntaxDiagnosticInfo(int offset, int width, ErrorCode code, params object[] args) 39internal SyntaxDiagnosticInfo(int offset, int width, ErrorCode code) 44internal SyntaxDiagnosticInfo(ErrorCode code, params object[] args) 49internal SyntaxDiagnosticInfo(ErrorCode code) 56return new SyntaxDiagnosticInfo(offset, this.Width, (ErrorCode)this.Code, this.Arguments);
Errors\XmlSyntaxDiagnosticInfo.cs (1)
21: base(offset, width, ErrorCode.WRN_XMLParseError, args)
FlowAnalysis\AbstractFlowPass.cs (1)
898Diagnostics.Add(ErrorCode.ERR_InternalError, node.Syntax.Location);
FlowAnalysis\ControlFlowPass.cs (9)
142Diagnostics.Add(ErrorCode.WRN_UnreferencedLabel, label.GetFirstLocation()); 219Diagnostics.Add(ErrorCode.ERR_LabelNotFound, loc, ((BoundGotoStatement)pending.Branch).Label.Name); 232Diagnostics.Add(ErrorCode.ERR_BadDelegateLeave, loc); 273Diagnostics.Add(ErrorCode.WRN_UnreachableCode, new SourceLocation(firstToken)); 316Diagnostics.Add(ErrorCode.ERR_BadFinallyLeave, location); 356Diagnostics.Add(ErrorCode.ERR_GoToForwardJumpOverUsingVar, sourceLocation); 368Diagnostics.Add(ErrorCode.ERR_GoToBackwardJumpOverUsingVar, sourceLocation); 399Diagnostics.Add(isLastSection ? ErrorCode.ERR_SwitchFallOut : ErrorCode.ERR_SwitchFallThrough,
FlowAnalysis\DefiniteAssignment.cs (54)
456hasAssociatedProperty ? ErrorCode.WRN_UnassignedThisAutoPropertySupportedVersion : ErrorCode.WRN_UnassignedThisSupportedVersion, 463hasAssociatedProperty ? ErrorCode.ERR_UnassignedThisAutoPropertyUnsupportedVersion : ErrorCode.ERR_UnassignedThisUnsupportedVersion, 480Diagnostics.Add(ErrorCode.ERR_ParamUnassigned, location, parameter.Name); 499Diagnostics.Add(ErrorCode.ERR_ParamUnassigned, location, parameter.Name); 533if (compatDiagnostics.AsEnumerable().Any(d => (ErrorCode)d.Code == ErrorCode.ERR_InsufficientStack)) 562ErrorCode oldCode = (ErrorCode)diagnostic.Code; 563ErrorCode newCode = oldCode switch 566ErrorCode.ERR_UnassignedThisAutoPropertyUnsupportedVersion => ErrorCode.WRN_UnassignedThisAutoPropertyUnsupportedVersion, 567ErrorCode.ERR_UnassignedThisUnsupportedVersion => ErrorCode.WRN_UnassignedThisUnsupportedVersion, 568ErrorCode.ERR_ParamUnassigned => ErrorCode.WRN_ParamUnassigned, 569ErrorCode.ERR_UseDefViolationProperty => ErrorCode.WRN_UseDefViolationProperty, 570ErrorCode.ERR_UseDefViolationField => ErrorCode.WRN_UseDefViolationField, 571ErrorCode.ERR_UseDefViolationThisUnsupportedVersion => ErrorCode.WRN_UseDefViolationThisUnsupportedVersion, 572ErrorCode.ERR_UseDefViolationPropertyUnsupportedVersion => ErrorCode.WRN_UseDefViolationPropertyUnsupportedVersion, 573ErrorCode.ERR_UseDefViolationFieldUnsupportedVersion => ErrorCode.WRN_UseDefViolationFieldUnsupportedVersion, 574ErrorCode.ERR_UseDefViolationOut => ErrorCode.WRN_UseDefViolationOut, 575ErrorCode.ERR_UseDefViolation => ErrorCode.WRN_UseDefViolation, 584oldCode is ErrorCode.ERR_InsufficientStack or ErrorCode.ERR_UnsafeUnassignedAddressOf, 654diagnostics.Add(ErrorCode.ERR_LocalCantBeFixedAndHoisted, location, captured.Name); 1204Diagnostics.Add(ErrorCode.ERR_UseDefViolationOut, node.Location, symbolName); 1209Diagnostics.Add(ErrorCode.ERR_UseDefViolation, node.Location, symbolName); 1257Diagnostics.Add(ErrorCode.WRN_UseDefViolationThisSupportedVersion, node.Location); 1262ErrorCode.ERR_UseDefViolationThisUnsupportedVersion, 1275Diagnostics.Add(hasAssociatedProperty ? ErrorCode.ERR_UseDefViolationProperty : ErrorCode.ERR_UseDefViolationField, node.Location, symbolName); 1285Diagnostics.Add(hasAssociatedProperty ? ErrorCode.ERR_UseDefViolationProperty : ErrorCode.ERR_UseDefViolationField, node.Location, symbolName); 1302ErrorCode.WRN_UseDefViolationRefField, 1310hasAssociatedProperty ? ErrorCode.WRN_UseDefViolationPropertySupportedVersion : ErrorCode.WRN_UseDefViolationFieldSupportedVersion, 1317hasAssociatedProperty ? ErrorCode.ERR_UseDefViolationPropertyUnsupportedVersion : ErrorCode.ERR_UseDefViolationFieldUnsupportedVersion, 1927ErrorCode.WRN_UnreadRecordParameter : 1928ErrorCode.WRN_UnreadPrimaryConstructorParameter, 2295Diagnostics.Add(assigned && _writtenVariables.Contains(symbol) ? ErrorCode.WRN_UnreferencedVarAssg : ErrorCode.WRN_UnreferencedVar, symbol.GetFirstLocationOrNone(), symbol.Name); 2314Diagnostics.Add(ErrorCode.WRN_UnreferencedLocalFunction, symbol.GetFirstLocationOrNone(), symbol.Name); 2343Diagnostics.Add(ErrorCode.ERR_FixedLocalInLambda, new SourceLocation(node.Syntax), localSymbol); 2587Diagnostics.Add(ErrorCode.ERR_UnsafeUnassignedAddressOf, addressOfOpt.Syntax.Location);
FlowAnalysis\FlowAnalysisPass.cs (1)
106diagnostics.Add(ErrorCode.ERR_ReturnExpected, location, method);
FlowAnalysis\NullableWalker_Patterns.cs (3)
1096ErrorCode warningCode = requiresFalseWhenClause ? ErrorCode.WRN_SwitchExpressionNotExhaustiveForNullWithWhen : ErrorCode.WRN_SwitchExpressionNotExhaustiveForNull;
FlowAnalysis\NullableWalker.cs (37)
852var errorCode = usesFieldKeyword ? ErrorCode.WRN_UninitializedNonNullableBackingField : ErrorCode.WRN_UninitializedNonNullableField; 1149Diagnostics.Add(ErrorCode.WRN_MemberNotNull, syntax.GetLocation(), member.Name); 1218Diagnostics.Add(ErrorCode.WRN_MemberNotNullWhen, syntaxOpt?.GetLocation() ?? methodMainNode.Syntax.GetLastToken().GetLocation(), member.Name, sense ? "true" : "false"); 1390Diagnostics.Add(ErrorCode.WRN_ParameterDisallowsNull, location, parameter.Name); 1417Diagnostics.Add(ErrorCode.WRN_ParameterConditionallyDisallowsNull, syntax.Location, parameter.Name, sense ? "true" : "false"); 1476Diagnostics.Add(ErrorCode.WRN_ParameterNotNullIfNotNull, location, outputParam.Name, inputParam.Name); 1481Diagnostics.Add(ErrorCode.WRN_ReturnNotNullIfNotNull, location, inputParam.Name); 1495ReportDiagnostic(ErrorCode.WRN_ShouldNotReturn, syntaxOpt?.GetLocation() ?? methodMainNode.Syntax.GetLastToken().GetLocation()); 2527ReportDiagnostic(assignmentKind == AssignmentKind.Return ? ErrorCode.WRN_NullReferenceReturn : ErrorCode.WRN_NullAsNonNullable, location); 2531ReportDiagnostic(ErrorCode.WRN_NullReferenceArgument, location, 2549ReportDiagnostic(assignmentKind == AssignmentKind.Return ? ErrorCode.WRN_NullReferenceReturn : ErrorCode.WRN_NullReferenceAssignment, location); 2705ReportDiagnostic(ErrorCode.WRN_NullabilityMismatchInAssignment, syntaxNode, sourceType, destinationType); 2710ReportDiagnostic(ErrorCode.WRN_NullabilityMismatchInAssignment, location, sourceType, destinationType); 2767ReportDiagnostic(ErrorCode.WRN_ConvertingNullableToNonNullable, location); 2770private void ReportDiagnostic(ErrorCode errorCode, SyntaxNode syntaxNode, params object[] arguments) 2775private void ReportDiagnostic(ErrorCode errorCode, Location location, params object[] arguments) 4775ReportDiagnostic(ErrorCode.WRN_NullReferenceInitializer, initializer.Syntax, symbol); 8395ReportDiagnostic(ErrorCode.WRN_DisallowNullAttributeForbidsMaybeNullAssignment, node.Location); 9801ReportDiagnostic(ErrorCode.WRN_NullabilityMismatchInReturnTypeOfTargetDelegate, arg.location, 9808ReportDiagnostic(ErrorCode.WRN_NullabilityMismatchInParameterTypeOfTargetDelegate, arg.location, 9872ReportDiagnostic(ErrorCode.WRN_NullabilityMismatchInReturnTypeOfTargetDelegate, location, 9882ReportDiagnostic(ErrorCode.WRN_NullabilityMismatchInParameterTypeOfTargetDelegate, location, 9919/// If <see langword="true"/>, indicates that the "non-safety" diagnostic <see cref="ErrorCode.WRN_ConvertingNullableToNonNullable"/> 10095ReportDiagnostic(ErrorCode.WRN_UnboxPossibleNull, getDiagnosticLocation()); 10204ReportDiagnostic(ErrorCode.WRN_NullableValueTypeMayBeNull, getDiagnosticLocation()); 12212ReportDiagnostic(ErrorCode.WRN_NullabilityMismatchInArgument, 12229ReportDiagnostic(forOutput ? ErrorCode.WRN_NullabilityMismatchInArgumentForOutput : ErrorCode.WRN_NullabilityMismatchInArgument, 12735ReportDiagnostic(ErrorCode.WRN_NullReferenceReceiver, expr.Syntax.GetLocation()); 13644ReportDiagnostic(isValueType ? ErrorCode.WRN_NullableValueTypeMayBeNull : ErrorCode.WRN_NullReferenceReceiver, syntax); 13798ReportDiagnostic(ErrorCode.WRN_ThrowPossibleNull, expr.Syntax); 13853ReportDiagnostic(ErrorCode.WRN_NullReferenceReceiver, argument.Syntax);
Generated\BoundNodes.xml.Generated.cs (3)
2000public BoundUnconvertedConditionalOperator(SyntaxNode syntax, BoundExpression condition, BoundExpression consequence, BoundExpression alternative, ConstantValue? constantValueOpt, ErrorCode noCommonTypeError, bool hasErrors = false) 2020public ErrorCode NoCommonTypeError { get; } 2025public BoundUnconvertedConditionalOperator Update(BoundExpression condition, BoundExpression consequence, BoundExpression alternative, ConstantValue? constantValueOpt, ErrorCode noCommonTypeError)
Generated\ErrorFacts.Generated.cs (358)
5public static bool IsWarning(ErrorCode code) 9case ErrorCode.WRN_InvalidMainSig: 10case ErrorCode.WRN_UnreferencedEvent: 11case ErrorCode.WRN_LowercaseEllSuffix: 12case ErrorCode.WRN_DuplicateUsing: 13case ErrorCode.WRN_NewRequired: 14case ErrorCode.WRN_NewNotRequired: 15case ErrorCode.WRN_NewOrOverrideExpected: 16case ErrorCode.WRN_UnreachableCode: 17case ErrorCode.WRN_UnreferencedLabel: 18case ErrorCode.WRN_UnreferencedVar: 19case ErrorCode.WRN_UnreferencedField: 20case ErrorCode.WRN_IsAlwaysTrue: 21case ErrorCode.WRN_IsAlwaysFalse: 22case ErrorCode.WRN_ByRefNonAgileField: 23case ErrorCode.WRN_UnreferencedVarAssg: 24case ErrorCode.WRN_NegativeArrayIndex: 25case ErrorCode.WRN_BadRefCompareLeft: 26case ErrorCode.WRN_BadRefCompareRight: 27case ErrorCode.WRN_PatternIsAmbiguous: 28case ErrorCode.WRN_PatternNotPublicOrNotInstance: 29case ErrorCode.WRN_PatternBadSignature: 30case ErrorCode.WRN_SequentialOnPartialClass: 31case ErrorCode.WRN_MainCantBeGeneric: 32case ErrorCode.WRN_UnreferencedFieldAssg: 33case ErrorCode.WRN_AmbiguousXMLReference: 34case ErrorCode.WRN_VolatileByRef: 35case ErrorCode.WRN_SameFullNameThisNsAgg: 36case ErrorCode.WRN_SameFullNameThisAggAgg: 37case ErrorCode.WRN_SameFullNameThisAggNs: 38case ErrorCode.WRN_GlobalAliasDefn: 39case ErrorCode.WRN_AlwaysNull: 40case ErrorCode.WRN_CmpAlwaysFalse: 41case ErrorCode.WRN_FinalizeMethod: 42case ErrorCode.WRN_GotoCaseShouldConvert: 43case ErrorCode.WRN_NubExprIsConstBool: 44case ErrorCode.WRN_ExplicitImplCollision: 45case ErrorCode.WRN_DeprecatedSymbol: 46case ErrorCode.WRN_DeprecatedSymbolStr: 47case ErrorCode.WRN_ExternMethodNoImplementation: 48case ErrorCode.WRN_ProtectedInSealed: 49case ErrorCode.WRN_PossibleMistakenNullStatement: 50case ErrorCode.WRN_UnassignedInternalField: 51case ErrorCode.WRN_VacuousIntegralComp: 52case ErrorCode.WRN_AttributeLocationOnBadDeclaration: 53case ErrorCode.WRN_InvalidAttributeLocation: 54case ErrorCode.WRN_EqualsWithoutGetHashCode: 55case ErrorCode.WRN_EqualityOpWithoutEquals: 56case ErrorCode.WRN_EqualityOpWithoutGetHashCode: 57case ErrorCode.WRN_IncorrectBooleanAssg: 58case ErrorCode.WRN_NonObsoleteOverridingObsolete: 59case ErrorCode.WRN_BitwiseOrSignExtend: 60case ErrorCode.WRN_CoClassWithoutComImport: 61case ErrorCode.WRN_TypeParameterSameAsOuterTypeParameter: 62case ErrorCode.WRN_AssignmentToLockOrDispose: 63case ErrorCode.WRN_ObsoleteOverridingNonObsolete: 64case ErrorCode.WRN_DebugFullNameTooLong: 65case ErrorCode.WRN_ExternCtorNoImplementation: 66case ErrorCode.WRN_WarningDirective: 67case ErrorCode.WRN_UnreachableGeneralCatch: 68case ErrorCode.WRN_DeprecatedCollectionInitAddStr: 69case ErrorCode.WRN_DeprecatedCollectionInitAdd: 70case ErrorCode.WRN_DefaultValueForUnconsumedLocation: 71case ErrorCode.WRN_IdentifierOrNumericLiteralExpected: 72case ErrorCode.WRN_EmptySwitch: 73case ErrorCode.WRN_XMLParseError: 74case ErrorCode.WRN_DuplicateParamTag: 75case ErrorCode.WRN_UnmatchedParamTag: 76case ErrorCode.WRN_MissingParamTag: 77case ErrorCode.WRN_BadXMLRef: 78case ErrorCode.WRN_BadXMLRefParamType: 79case ErrorCode.WRN_BadXMLRefReturnType: 80case ErrorCode.WRN_BadXMLRefSyntax: 81case ErrorCode.WRN_UnprocessedXMLComment: 82case ErrorCode.WRN_FailedInclude: 83case ErrorCode.WRN_InvalidInclude: 84case ErrorCode.WRN_MissingXMLComment: 85case ErrorCode.WRN_XMLParseIncludeError: 86case ErrorCode.WRN_ALinkWarn: 87case ErrorCode.WRN_CmdOptionConflictsSource: 88case ErrorCode.WRN_IllegalPragma: 89case ErrorCode.WRN_IllegalPPWarning: 90case ErrorCode.WRN_BadRestoreNumber: 91case ErrorCode.WRN_NonECMAFeature: 92case ErrorCode.WRN_ErrorOverride: 93case ErrorCode.WRN_InvalidSearchPathDir: 94case ErrorCode.WRN_MultiplePredefTypes: 95case ErrorCode.WRN_TooManyLinesForDebugger: 96case ErrorCode.WRN_CallOnNonAgileField: 97case ErrorCode.WRN_InvalidNumber: 98case ErrorCode.WRN_IllegalPPChecksum: 99case ErrorCode.WRN_EndOfPPLineExpected: 100case ErrorCode.WRN_ConflictingChecksum: 101case ErrorCode.WRN_InvalidAssemblyName: 102case ErrorCode.WRN_UnifyReferenceMajMin: 103case ErrorCode.WRN_UnifyReferenceBldRev: 104case ErrorCode.WRN_DuplicateTypeParamTag: 105case ErrorCode.WRN_UnmatchedTypeParamTag: 106case ErrorCode.WRN_MissingTypeParamTag: 107case ErrorCode.WRN_AssignmentToSelf: 108case ErrorCode.WRN_ComparisonToSelf: 109case ErrorCode.WRN_DotOnDefault: 110case ErrorCode.WRN_BadXMLRefTypeVar: 111case ErrorCode.WRN_UnmatchedParamRefTag: 112case ErrorCode.WRN_UnmatchedTypeParamRefTag: 113case ErrorCode.WRN_ReferencedAssemblyReferencesLinkedPIA: 114case ErrorCode.WRN_CantHaveManifestForModule: 115case ErrorCode.WRN_MultipleRuntimeImplementationMatches: 116case ErrorCode.WRN_MultipleRuntimeOverrideMatches: 117case ErrorCode.WRN_DynamicDispatchToConditionalMethod: 118case ErrorCode.WRN_IsDynamicIsConfusing: 119case ErrorCode.WRN_FileAlreadyIncluded: 120case ErrorCode.WRN_NoSources: 121case ErrorCode.WRN_NoConfigNotOnCommandLine: 122case ErrorCode.WRN_DefineIdentifierRequired: 123case ErrorCode.WRN_BadUILang: 124case ErrorCode.WRN_CLS_NoVarArgs: 125case ErrorCode.WRN_CLS_BadArgType: 126case ErrorCode.WRN_CLS_BadReturnType: 127case ErrorCode.WRN_CLS_BadFieldPropType: 128case ErrorCode.WRN_CLS_BadIdentifierCase: 129case ErrorCode.WRN_CLS_OverloadRefOut: 130case ErrorCode.WRN_CLS_OverloadUnnamed: 131case ErrorCode.WRN_CLS_BadIdentifier: 132case ErrorCode.WRN_CLS_BadBase: 133case ErrorCode.WRN_CLS_BadInterfaceMember: 134case ErrorCode.WRN_CLS_NoAbstractMembers: 135case ErrorCode.WRN_CLS_NotOnModules: 136case ErrorCode.WRN_CLS_ModuleMissingCLS: 137case ErrorCode.WRN_CLS_AssemblyNotCLS: 138case ErrorCode.WRN_CLS_BadAttributeType: 139case ErrorCode.WRN_CLS_ArrayArgumentToAttribute: 140case ErrorCode.WRN_CLS_NotOnModules2: 141case ErrorCode.WRN_CLS_IllegalTrueInFalse: 142case ErrorCode.WRN_CLS_MeaninglessOnPrivateType: 143case ErrorCode.WRN_CLS_AssemblyNotCLS2: 144case ErrorCode.WRN_CLS_MeaninglessOnParam: 145case ErrorCode.WRN_CLS_MeaninglessOnReturn: 146case ErrorCode.WRN_CLS_BadTypeVar: 147case ErrorCode.WRN_CLS_VolatileField: 148case ErrorCode.WRN_CLS_BadInterface: 149case ErrorCode.WRN_UnobservedAwaitableExpression: 150case ErrorCode.WRN_CallerLineNumberParamForUnconsumedLocation: 151case ErrorCode.WRN_CallerFilePathParamForUnconsumedLocation: 152case ErrorCode.WRN_CallerMemberNameParamForUnconsumedLocation: 153case ErrorCode.WRN_MainIgnored: 154case ErrorCode.WRN_StaticInAsOrIs: 155case ErrorCode.WRN_DelaySignButNoKey: 156case ErrorCode.WRN_InvalidVersionFormat: 157case ErrorCode.WRN_CallerFilePathPreferredOverCallerMemberName: 158case ErrorCode.WRN_CallerLineNumberPreferredOverCallerMemberName: 159case ErrorCode.WRN_CallerLineNumberPreferredOverCallerFilePath: 160case ErrorCode.WRN_AssemblyAttributeFromModuleIsOverridden: 161case ErrorCode.WRN_FilterIsConstantTrue: 162case ErrorCode.WRN_UnimplementedCommandLineSwitch: 163case ErrorCode.WRN_ReferencedAssemblyDoesNotHaveStrongName: 164case ErrorCode.WRN_RefCultureMismatch: 165case ErrorCode.WRN_ConflictingMachineAssembly: 166case ErrorCode.WRN_UnqualifiedNestedTypeInCref: 167case ErrorCode.WRN_NoRuntimeMetadataVersion: 168case ErrorCode.WRN_PdbLocalNameTooLong: 169case ErrorCode.WRN_AnalyzerCannotBeCreated: 170case ErrorCode.WRN_NoAnalyzerInAssembly: 171case ErrorCode.WRN_UnableToLoadAnalyzer: 172case ErrorCode.WRN_NubExprIsConstBool2: 173case ErrorCode.WRN_AlignmentMagnitude: 174case ErrorCode.WRN_AttributeIgnoredWhenPublicSigning: 175case ErrorCode.WRN_TupleLiteralNameMismatch: 176case ErrorCode.WRN_WindowsExperimental: 177case ErrorCode.WRN_UnreferencedLocalFunction: 178case ErrorCode.WRN_FilterIsConstantFalse: 179case ErrorCode.WRN_FilterIsConstantFalseRedundantTryCatch: 180case ErrorCode.WRN_AttributesOnBackingFieldsNotAvailable: 181case ErrorCode.WRN_TupleBinopLiteralNameMismatch: 182case ErrorCode.WRN_TypeParameterSameAsOuterMethodTypeParameter: 183case ErrorCode.WRN_UnconsumedEnumeratorCancellationAttributeUsage: 184case ErrorCode.WRN_UndecoratedCancellationTokenParameter: 185case ErrorCode.WRN_ManagedAddr: 186case ErrorCode.WRN_SwitchExpressionNotExhaustive: 187case ErrorCode.WRN_CaseConstantNamedUnderscore: 188case ErrorCode.WRN_IsTypeNamedUnderscore: 189case ErrorCode.WRN_GivenExpressionNeverMatchesPattern: 190case ErrorCode.WRN_GivenExpressionAlwaysMatchesConstant: 191case ErrorCode.WRN_SwitchExpressionNotExhaustiveWithUnnamedEnumValue: 192case ErrorCode.WRN_ThrowPossibleNull: 193case ErrorCode.WRN_ConvertingNullableToNonNullable: 194case ErrorCode.WRN_NullReferenceAssignment: 195case ErrorCode.WRN_NullReferenceReceiver: 196case ErrorCode.WRN_NullReferenceReturn: 197case ErrorCode.WRN_NullReferenceArgument: 198case ErrorCode.WRN_UnboxPossibleNull: 199case ErrorCode.WRN_DisallowNullAttributeForbidsMaybeNullAssignment: 200case ErrorCode.WRN_NullabilityMismatchInTypeOnOverride: 201case ErrorCode.WRN_NullabilityMismatchInReturnTypeOnOverride: 202case ErrorCode.WRN_NullabilityMismatchInParameterTypeOnOverride: 203case ErrorCode.WRN_NullabilityMismatchInParameterTypeOnPartial: 204case ErrorCode.WRN_NullabilityMismatchInTypeOnImplicitImplementation: 205case ErrorCode.WRN_NullabilityMismatchInReturnTypeOnImplicitImplementation: 206case ErrorCode.WRN_NullabilityMismatchInParameterTypeOnImplicitImplementation: 207case ErrorCode.WRN_NullabilityMismatchInTypeOnExplicitImplementation: 208case ErrorCode.WRN_NullabilityMismatchInReturnTypeOnExplicitImplementation: 209case ErrorCode.WRN_NullabilityMismatchInParameterTypeOnExplicitImplementation: 210case ErrorCode.WRN_UninitializedNonNullableField: 211case ErrorCode.WRN_NullabilityMismatchInAssignment: 212case ErrorCode.WRN_NullabilityMismatchInArgument: 213case ErrorCode.WRN_NullabilityMismatchInReturnTypeOfTargetDelegate: 214case ErrorCode.WRN_NullabilityMismatchInParameterTypeOfTargetDelegate: 215case ErrorCode.WRN_NullabilityMismatchInArgumentForOutput: 216case ErrorCode.WRN_NullAsNonNullable: 217case ErrorCode.WRN_NullableValueTypeMayBeNull: 218case ErrorCode.WRN_NullabilityMismatchInTypeParameterConstraint: 219case ErrorCode.WRN_MissingNonNullTypesContextForAnnotation: 220case ErrorCode.WRN_NullabilityMismatchInConstraintsOnImplicitImplementation: 221case ErrorCode.WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint: 222case ErrorCode.WRN_NullabilityMismatchInExplicitlyImplementedInterface: 223case ErrorCode.WRN_NullabilityMismatchInInterfaceImplementedByBase: 224case ErrorCode.WRN_DuplicateInterfaceWithNullabilityMismatchInBaseList: 225case ErrorCode.WRN_SwitchExpressionNotExhaustiveForNull: 226case ErrorCode.WRN_ImplicitCopyInReadOnlyMember: 227case ErrorCode.WRN_NullabilityMismatchInConstraintsOnPartialImplementation: 228case ErrorCode.WRN_MissingNonNullTypesContextForAnnotationInGeneratedCode: 229case ErrorCode.WRN_NullReferenceInitializer: 230case ErrorCode.WRN_NullabilityMismatchInTypeParameterNotNullConstraint: 231case ErrorCode.WRN_ParameterConditionallyDisallowsNull: 232case ErrorCode.WRN_ShouldNotReturn: 233case ErrorCode.WRN_TopLevelNullabilityMismatchInReturnTypeOnOverride: 234case ErrorCode.WRN_TopLevelNullabilityMismatchInParameterTypeOnOverride: 235case ErrorCode.WRN_TopLevelNullabilityMismatchInReturnTypeOnImplicitImplementation: 236case ErrorCode.WRN_TopLevelNullabilityMismatchInParameterTypeOnImplicitImplementation: 237case ErrorCode.WRN_TopLevelNullabilityMismatchInReturnTypeOnExplicitImplementation: 238case ErrorCode.WRN_TopLevelNullabilityMismatchInParameterTypeOnExplicitImplementation: 239case ErrorCode.WRN_DoesNotReturnMismatch: 240case ErrorCode.WRN_MemberNotNull: 241case ErrorCode.WRN_MemberNotNullWhen: 242case ErrorCode.WRN_MemberNotNullBadMember: 243case ErrorCode.WRN_ParameterDisallowsNull: 244case ErrorCode.WRN_ConstOutOfRangeChecked: 245case ErrorCode.WRN_GeneratorFailedDuringInitialization: 246case ErrorCode.WRN_GeneratorFailedDuringGeneration: 247case ErrorCode.WRN_GivenExpressionAlwaysMatchesPattern: 248case ErrorCode.WRN_IsPatternAlways: 249case ErrorCode.WRN_NullabilityMismatchInReturnTypeOnPartial: 250case ErrorCode.WRN_ParameterNotNullIfNotNull: 251case ErrorCode.WRN_ReturnNotNullIfNotNull: 252case ErrorCode.WRN_PartialMethodTypeDifference: 253case ErrorCode.WRN_SwitchExpressionNotExhaustiveWithWhen: 254case ErrorCode.WRN_SwitchExpressionNotExhaustiveForNullWithWhen: 255case ErrorCode.WRN_PrecedenceInversion: 256case ErrorCode.WRN_AnalyzerReferencesFramework: 257case ErrorCode.WRN_RecordEqualsWithoutGetHashCode: 258case ErrorCode.WRN_RecordNamedDisallowed: 259case ErrorCode.WRN_UnassignedThisAutoPropertyUnsupportedVersion: 260case ErrorCode.WRN_UnassignedThisUnsupportedVersion: 261case ErrorCode.WRN_ParamUnassigned: 262case ErrorCode.WRN_UseDefViolationProperty: 263case ErrorCode.WRN_UseDefViolationField: 264case ErrorCode.WRN_UseDefViolationThisUnsupportedVersion: 265case ErrorCode.WRN_UseDefViolationOut: 266case ErrorCode.WRN_UseDefViolation: 267case ErrorCode.WRN_SyncAndAsyncEntryPoints: 268case ErrorCode.WRN_ParameterIsStaticClass: 269case ErrorCode.WRN_ReturnTypeIsStaticClass: 270case ErrorCode.WRN_UnreadRecordParameter: 271case ErrorCode.WRN_DoNotCompareFunctionPointers: 272case ErrorCode.WRN_ParameterOccursAfterInterpolatedStringHandlerParameter: 273case ErrorCode.WRN_CallerLineNumberPreferredOverCallerArgumentExpression: 274case ErrorCode.WRN_CallerFilePathPreferredOverCallerArgumentExpression: 275case ErrorCode.WRN_CallerMemberNamePreferredOverCallerArgumentExpression: 276case ErrorCode.WRN_CallerArgumentExpressionAttributeHasInvalidParameterName: 277case ErrorCode.WRN_CallerArgumentExpressionAttributeSelfReferential: 278case ErrorCode.WRN_CallerArgumentExpressionParamForUnconsumedLocation: 279case ErrorCode.WRN_InterpolatedStringHandlerArgumentAttributeIgnoredOnLambdaParameters: 280case ErrorCode.WRN_CompileTimeCheckedOverflow: 281case ErrorCode.WRN_MethGrpToNonDel: 282case ErrorCode.WRN_LowerCaseTypeName: 283case ErrorCode.WRN_UseDefViolationPropertyUnsupportedVersion: 284case ErrorCode.WRN_UseDefViolationFieldUnsupportedVersion: 285case ErrorCode.WRN_UseDefViolationPropertySupportedVersion: 286case ErrorCode.WRN_UseDefViolationFieldSupportedVersion: 287case ErrorCode.WRN_UseDefViolationThisSupportedVersion: 288case ErrorCode.WRN_UnassignedThisAutoPropertySupportedVersion: 289case ErrorCode.WRN_UnassignedThisSupportedVersion: 290case ErrorCode.WRN_ObsoleteMembersShouldNotBeRequired: 291case ErrorCode.WRN_AnalyzerReferencesNewerCompiler: 292case ErrorCode.WRN_DuplicateAnalyzerReference: 293case ErrorCode.WRN_ScopedMismatchInParameterOfTarget: 294case ErrorCode.WRN_ScopedMismatchInParameterOfOverrideOrImplementation: 295case ErrorCode.WRN_EscapeVariable: 296case ErrorCode.WRN_EscapeStackAlloc: 297case ErrorCode.WRN_RefReturnNonreturnableLocal: 298case ErrorCode.WRN_RefReturnNonreturnableLocal2: 299case ErrorCode.WRN_RefReturnStructThis: 300case ErrorCode.WRN_RefAssignNarrower: 301case ErrorCode.WRN_MismatchedRefEscapeInTernary: 302case ErrorCode.WRN_RefReturnParameter: 303case ErrorCode.WRN_RefReturnScopedParameter: 304case ErrorCode.WRN_RefReturnParameter2: 305case ErrorCode.WRN_RefReturnScopedParameter2: 306case ErrorCode.WRN_RefReturnLocal: 307case ErrorCode.WRN_RefReturnLocal2: 308case ErrorCode.WRN_RefAssignReturnOnly: 309case ErrorCode.WRN_RefReturnOnlyParameter: 310case ErrorCode.WRN_RefReturnOnlyParameter2: 311case ErrorCode.WRN_RefAssignValEscapeWider: 312case ErrorCode.WRN_OptionalParamValueMismatch: 313case ErrorCode.WRN_ParamsArrayInLambdaOnly: 314case ErrorCode.WRN_CapturedPrimaryConstructorParameterPassedToBase: 315case ErrorCode.WRN_UnreadPrimaryConstructorParameter: 316case ErrorCode.WRN_AddressOfInAsync: 317case ErrorCode.WRN_CapturedPrimaryConstructorParameterInFieldInitializer: 318case ErrorCode.WRN_ByValArraySizeConstRequired: 319case ErrorCode.WRN_InterceptorSignatureMismatch: 320case ErrorCode.WRN_NullabilityMismatchInReturnTypeOnInterceptor: 321case ErrorCode.WRN_NullabilityMismatchInParameterTypeOnInterceptor: 322case ErrorCode.WRN_PrimaryConstructorParameterIsShadowedAndNotPassedToBase: 323case ErrorCode.WRN_InlineArrayIndexerNotUsed: 324case ErrorCode.WRN_InlineArraySliceNotUsed: 325case ErrorCode.WRN_InlineArrayConversionOperatorNotUsed: 326case ErrorCode.WRN_InlineArrayNotSupportedByLanguage: 327case ErrorCode.WRN_BadArgRef: 328case ErrorCode.WRN_ArgExpectedRefOrIn: 329case ErrorCode.WRN_RefReadonlyNotVariable: 330case ErrorCode.WRN_ArgExpectedIn: 331case ErrorCode.WRN_OverridingDifferentRefness: 332case ErrorCode.WRN_HidingDifferentRefness: 333case ErrorCode.WRN_TargetDifferentRefness: 334case ErrorCode.WRN_RefReadonlyParameterDefaultValue: 335case ErrorCode.WRN_UseDefViolationRefField: 336case ErrorCode.WRN_Experimental: 337case ErrorCode.WRN_CollectionExpressionRefStructMayAllocate: 338case ErrorCode.WRN_CollectionExpressionRefStructSpreadMayAllocate: 339case ErrorCode.WRN_ConvertingLock: 340case ErrorCode.WRN_PartialMemberSignatureDifference: 341case ErrorCode.WRN_FieldIsAmbiguous: 342case ErrorCode.WRN_UninitializedNonNullableBackingField: 343case ErrorCode.WRN_UnassignedInternalRefField: 344case ErrorCode.WRN_AccessorDoesNotUseBackingField: 345case ErrorCode.WRN_ExperimentalWithMessage: 346case ErrorCode.WRN_UnscopedRefAttributeOldRules: 347case ErrorCode.WRN_InterceptsLocationAttributeUnsupportedSignature: 348case ErrorCode.WRN_RedundantPattern: 349case ErrorCode.WRN_DeprecatedFeatureFlag: 356public static bool IsFatal(ErrorCode code) 360case ErrorCode.FTL_MetadataCantOpenFile: 361case ErrorCode.FTL_DebugEmitFailure: 362case ErrorCode.FTL_BadCodepage: 363case ErrorCode.FTL_InvalidTarget: 364case ErrorCode.FTL_InvalidInputFileName: 365case ErrorCode.FTL_OutputFileExists: 366case ErrorCode.FTL_BadChecksumAlgorithm: 373public static bool IsInfo(ErrorCode code) 377case ErrorCode.INF_UnableToLoadSomeTypesInAnalyzer: 378case ErrorCode.INF_TooManyBoundLambdas: 385public static bool IsHidden(ErrorCode code) 389case ErrorCode.HDN_UnusedUsingDirective: 390case ErrorCode.HDN_UnusedExternAlias: 391case ErrorCode.HDN_DuplicateWithGlobalUsing: 392case ErrorCode.HDN_RedundantPatternStackGuard:
LanguageVersion.cs (19)
337internal static ErrorCode GetErrorCode(this LanguageVersion version) 342return ErrorCode.ERR_FeatureNotAvailableInVersion1; 344return ErrorCode.ERR_FeatureNotAvailableInVersion2; 346return ErrorCode.ERR_FeatureNotAvailableInVersion3; 348return ErrorCode.ERR_FeatureNotAvailableInVersion4; 350return ErrorCode.ERR_FeatureNotAvailableInVersion5; 352return ErrorCode.ERR_FeatureNotAvailableInVersion6; 354return ErrorCode.ERR_FeatureNotAvailableInVersion7; 356return ErrorCode.ERR_FeatureNotAvailableInVersion7_1; 358return ErrorCode.ERR_FeatureNotAvailableInVersion7_2; 360return ErrorCode.ERR_FeatureNotAvailableInVersion7_3; 362return ErrorCode.ERR_FeatureNotAvailableInVersion8; 364return ErrorCode.ERR_FeatureNotAvailableInVersion9; 366return ErrorCode.ERR_FeatureNotAvailableInVersion10; 368return ErrorCode.ERR_FeatureNotAvailableInVersion11; 370return ErrorCode.ERR_FeatureNotAvailableInVersion12; 372return ErrorCode.ERR_FeatureNotAvailableInVersion13; 374return ErrorCode.ERR_FeatureNotAvailableInVersion14; 376return ErrorCode.ERR_FeatureNotAvailableInVersion15;
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (6)
356F.Diagnostics.Add(ErrorCode.ERR_WrongArityAsyncReturn, F.Syntax.Location, builderType); 367F.Diagnostics.Add(ErrorCode.ERR_BadAsyncReturn, F.Syntax.Location); 461new CSDiagnosticInfo(ErrorCode.ERR_MissingPredefinedMember, (customBuilder ? (object)builderType : descriptor.DeclaringTypeMetadataName), descriptor.Name), 494F.Diagnostics.Add(ErrorCode.ERR_MissingPredefinedMember, F.Syntax.Location, builderType, methodName); 519new CSDiagnosticInfo(ErrorCode.ERR_BadAsyncMethodBuilderTaskProperty, builderType, returnType, property.Type), 529new CSDiagnosticInfo(ErrorCode.ERR_MissingPredefinedMember, builderType, propertyName),
Lowering\AsyncRewriter\AsyncRewriter.cs (2)
65diagnostics.Add(containsAwait ? ErrorCode.ERR_PossibleAsyncIteratorWithoutYield : ErrorCode.ERR_PossibleAsyncIteratorWithoutYieldOrAwait,
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (1)
701_diagnostics.Add(ErrorCode.ERR_SpecialByRefInLambda, syntax.Location, type);
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
121diagnostics.Add(ErrorCode.ERR_MissingPredefinedMember, node.Syntax.Location, r.ExpressionType, "Lambda");
Lowering\DiagnosticsPass_ExpressionTrees.cs (86)
59private void Error(ErrorCode code, BoundNode node, params object[] args) 73Error(ErrorCode.ERR_ExpressionTreeContainsPointerOp, node); 83Error(ErrorCode.ERR_ExpressionTreeContainsMultiDimensionalArrayInitializer, node); 95Error(ErrorCode.ERR_ExpressionTreeContainsPatternImplicitIndexer, node); 105Error(ErrorCode.ERR_ExpressionTreeContainsPatternImplicitIndexer, node); 115Error(ErrorCode.ERR_ExpressionTreeContainsInlineArrayOperation, node); 125Error(ErrorCode.ERR_ExpressionTreeContainsFromEndIndexExpression, node); 135Error(ErrorCode.ERR_ExpressionTreeContainsRangeExpression, node); 145Error(ErrorCode.ERR_ExpressionTreeContainsPointerOp, node); 175Error(ErrorCode.ERR_ExpressionTreeContainsBaseAccess, node); 197var diagnostic = _staticLocalOrAnonymousFunction.MethodKind == MethodKind.LocalFunction 198? ErrorCode.ERR_StaticLocalFunctionCannotCaptureThis 199: ErrorCode.ERR_StaticAnonymousFunctionCannotCaptureThis; 212var diagnostic = _staticLocalOrAnonymousFunction.MethodKind == MethodKind.LocalFunction 213? ErrorCode.ERR_StaticLocalFunctionCannotCaptureVariable 214: ErrorCode.ERR_StaticAnonymousFunctionCannotCaptureVariable; 233Error(ErrorCode.ERR_ExpressionTreeContainsSwitchExpression, node); 255Error(ErrorCode.ERR_ExpressionTreeContainsAssignment, node); 265Error(ErrorCode.ERR_ExpressionTreeContainsDynamicOperation, node); 289Error(ErrorCode.ERR_ExpressionTreeContainsAssignment, node); 328Error(ErrorCode.ERR_PartialMethodInExpressionTree, node); 332Error(ErrorCode.ERR_ExpressionTreeContainsIndexedProperty, node); 337Error(ErrorCode.ERR_ExpressionTreeContainsOptionalArgument, node); 342Error(ErrorCode.ERR_ExpressionTreeContainsNamedArgument, node); 348Error(ErrorCode.ERR_ExpressionTreeContainsNamedArgumentOutOfPosition, node); 352Error(ErrorCode.ERR_ComRefCallInExpressionTree, node); 356Error(ErrorCode.ERR_ExpressionTreeContainsLocalFunction, node); 360Error(ErrorCode.ERR_RefReturningCallInExpressionTree, node); 364Error(ErrorCode.ERR_ExpressionTreeContainsAbstractStaticMemberAccess, node); 407Error(ErrorCode.ERR_ExpressionTreeCantContainRefStruct, node, type.Name); 416Error(ErrorCode.ERR_FeatureNotValidInExpressionTree, node, "__reftype"); 426Error(ErrorCode.ERR_FeatureNotValidInExpressionTree, node, "__refvalue"); 436Error(ErrorCode.ERR_FeatureNotValidInExpressionTree, node, "__makeref"); 446Error(ErrorCode.ERR_VarArgsInExpressionTree, node); 456Error(ErrorCode.ERR_NullPropagatingOpInExpressionTree, node); 466Error(ErrorCode.ERR_DictionaryInitializerInExpressionTree, node); 473Error(ErrorCode.ERR_ExpressionTreeContainsExtensionPropertyAccess, node); 536Error(ErrorCode.ERR_ExpressionTreeContainsOutVariable, local); 544Error(ErrorCode.ERR_ExpressionTreeContainsDiscard, argument); 552Error(ErrorCode.ERR_ExtensionCollectionElementInitializerInExpressionTree, node); 571Error(ErrorCode.ERR_ExpressionTreeContainsExtensionPropertyAccess, node); 587Error(ErrorCode.ERR_RefReturningCallInExpressionTree, node); 601Error(ErrorCode.ERR_ExpressionTreeContainsAbstractStaticMemberAccess, node); 605Error(ErrorCode.ERR_ExpressionTreeContainsExtensionPropertyAccess, node); 621Error(ErrorCode.ERR_LambdaWithAttributesToExpressionTree, node); 629_diagnostics.Add(ErrorCode.ERR_ByRefParameterInExpressionTree, location); 633_diagnostics.Add(ErrorCode.ERR_ExpressionTreeCantContainRefStruct, p.GetFirstLocation(), p.Type.Name); 638_diagnostics.Add(ErrorCode.ERR_LambdaWithAttributesToExpressionTree, p.GetFirstLocation()); 650Error(ErrorCode.ERR_BadAsyncExpressionTree, node); 654Error(ErrorCode.ERR_StatementLambdaToExpressionTree, node); 658Error(ErrorCode.ERR_BadRefReturnExpressionTree, node); 668Error(ErrorCode.ERR_BadAsyncExpressionTree, node); 672Error(ErrorCode.ERR_StatementLambdaToExpressionTree, node); 676Error(ErrorCode.ERR_BadRefReturnExpressionTree, node); 682Error(ErrorCode.ERR_ExpressionTreeContainsAnonymousMethod, node); 764Error(ErrorCode.ERR_ExpressionTreeContainsAbstractStaticMemberAccess, node); 775Error(ErrorCode.ERR_ExpressionTreeContainsExtensionBasedConditionalLogicalOperator, node); 791Error(ErrorCode.ERR_ExpressionTreeContainsDynamicOperation, node); 799Error(ErrorCode.ERR_ExpressionTreeContainsDynamicOperation, node); 811Error(ErrorCode.ERR_ExpressionTreeContainsAbstractStaticMemberAccess, node); 832Error(ErrorCode.ERR_ExpressionTreeContainsAssignment, node); 876Error(ErrorCode.ERR_ExpressionTreeContainsDynamicOperation, node); 886Error(ErrorCode.ERR_ExpressionTreeContainsTupleConversion, node); 893Error(ErrorCode.ERR_ExpressionTreeContainsInlineArrayOperation, node); 900Error(ErrorCode.ERR_ExpressionTreeContainsInterpolatedStringHandlerConversion, node); 907Error(ErrorCode.ERR_ExpressionTreeContainsUnionConversion, node); 915Error(ErrorCode.ERR_ExpressionTreeContainsAbstractStaticMemberAccess, node); 957Error(ErrorCode.ERR_ExpressionTreeContainsLocalFunction, node); 961Error(ErrorCode.ERR_AddressOfMethodGroupInExpressionTree, node); 965Error(ErrorCode.ERR_ExpressionTreeContainsAbstractStaticMemberAccess, node); 989Error(ErrorCode.ERR_ExpressionTreeContainsBadCoalesce, node.LeftOperand); 999Error(ErrorCode.ERR_ExpressionTreeCantContainNullCoalescingAssignment, node); 1009Error(ErrorCode.ERR_ExpressionTreeContainsDynamicOperation, node); 1025Error(ErrorCode.ERR_ExpressionTreeContainsDynamicOperation, node); 1036Error(ErrorCode.ERR_ExpressionTreeContainsDynamicOperation, node); 1046Error(ErrorCode.ERR_ExpressionTreeContainsDynamicOperation, node); 1056Error(ErrorCode.ERR_ExpressionTreeContainsDynamicOperation, node); 1066Error(ErrorCode.ERR_ExpressionTreeContainsIsMatch, node); 1076Error(ErrorCode.ERR_ExpressionTreeContainsTupleLiteral, node); 1086Error(ErrorCode.ERR_ExpressionTreeContainsTupleLiteral, node); 1096Error(ErrorCode.ERR_ExpressionTreeContainsTupleBinOp, node); 1106Error(ErrorCode.ERR_ExpressionTreeContainsThrowExpression, node); 1116Error(ErrorCode.ERR_ExpressionTreeContainsWithExpression, node); 1126Error(ErrorCode.ERR_ExpressionTreeContainsPointerOp, node); 1138ErrorCode.ERR_ParamsCollectionExpressionTree : 1139ErrorCode.ERR_ExpressionTreeContainsCollectionExpression,
Lowering\DiagnosticsPass_Warnings.cs (27)
63Error(ErrorCode.WRN_VolatileByRef, fieldAccess, fieldSymbol); 68Error(ErrorCode.WRN_ByRefNonAgileField, fieldAccess, fieldSymbol); 91Error(ErrorCode.WRN_CallOnNonAgileField, fieldAccess, fieldSymbol); 258Error(ErrorCode.ERR_FeatureNotValidInExpressionTree, node, method); 262Error(ErrorCode.ERR_ExpressionTreeContainsAbstractStaticMemberAccess, node); 280Error(ErrorCode.ERR_FeatureNotValidInExpressionTree, node, ">>>"); 299Error(ErrorCode.ERR_ExpressionTreeContainsAssignment, node); 332_diagnostics.Add(ErrorCode.WRN_BadRefCompareLeft, node.Syntax.Location, t); 337_diagnostics.Add(ErrorCode.WRN_BadRefCompareRight, node.Syntax.Location, t); 387Error(ErrorCode.WRN_ComparisonToSelf, node); 453Error(ErrorCode.WRN_VacuousIntegralComp, tree, conversion.Operand.Type); 568Error(ErrorCode.WRN_BitwiseOrSignExtend, node); 728Error(ErrorCode.WRN_AlwaysNull, node, node.Type); 744Error(ErrorCode.WRN_AlwaysNull, node, node.Type); 769Error(ErrorCode.WRN_NubExprIsConstBool, node, always, node.Left.Type.GetNullableUnderlyingType(), node.Left.Type); 773Error(ErrorCode.WRN_NubExprIsConstBool, node, always, node.Right.Type.GetNullableUnderlyingType(), node.Right.Type); 799Error(ErrorCode.WRN_CmpAlwaysFalse, node, GetTypeForLiftedComparisonWarning(node.Right)); 803Error(ErrorCode.WRN_CmpAlwaysFalse, node, GetTypeForLiftedComparisonWarning(node.Left)); 817Error(node.OperatorKind.IsUserDefined() ? ErrorCode.WRN_NubExprIsConstBool2 : ErrorCode.WRN_NubExprIsConstBool, node, always, node.Left.Type.GetNullableUnderlyingType(), GetTypeForLiftedComparisonWarning(node.Right)); 821Error(node.OperatorKind.IsUserDefined() ? ErrorCode.WRN_NubExprIsConstBool2 : ErrorCode.WRN_NubExprIsConstBool, node, always, node.Right.Type.GetNullableUnderlyingType(), GetTypeForLiftedComparisonWarning(node.Left)); 829Error(ErrorCode.WRN_AlwaysNull, node, node.Type); 835Error(ErrorCode.WRN_AlwaysNull, node, node.Type); 846Error(ErrorCode.WRN_AlwaysNull, node, node.Type); 880Error(ErrorCode.WRN_AssignmentToSelf, node); 924Error(ErrorCode.WRN_AssignmentToSelf, leftArgument);
Lowering\IteratorRewriter\IteratorRewriter.cs (1)
162Binder.Error(bag, ErrorCode.ERR_PropertyLacksGet, body.Syntax, symbol);
Lowering\LocalRewriter\LocalRewriter_Call.cs (12)
176this._diagnostics.Add(ErrorCode.ERR_InterceptorCannotBeGeneric, attributeLocation, interceptor, method); 182this._diagnostics.Add(ErrorCode.ERR_InterceptorArityNotCompatible, attributeLocation, interceptor, netArity, method); 196this._diagnostics.Add(ErrorCode.ERR_InterceptableMethodMustBeOrdinary, attributeLocation, nameSyntax.Identifier.ValueText); 208this._diagnostics.Add(ErrorCode.ERR_InterceptorNotAccessible, attributeLocation, interceptor, containingMethod); 220this._diagnostics.Add(ErrorCode.ERR_InterceptorSignatureMismatch, attributeLocation, method, interceptor); 231diagnostics.Add(ErrorCode.WRN_NullabilityMismatchInReturnTypeOnInterceptor, attributeLocation, method); 235diagnostics.Add(ErrorCode.WRN_NullabilityMismatchInParameterTypeOnInterceptor, attributeLocation, new FormattedSymbol(implementingParameter, SymbolDisplayFormat.ShortFormat), method); 241this._diagnostics.Add(ErrorCode.WRN_InterceptorSignatureMismatch, attributeLocation, method, interceptor); 255this._diagnostics.Add(ErrorCode.ERR_InterceptorMustHaveMatchingThisParameter, attributeLocation, methodThisParameter, method); 258this._diagnostics.Add(ErrorCode.ERR_InterceptorMustNotHaveThisParameter, attributeLocation, method); 267this._diagnostics.Add(ErrorCode.ERR_InterceptorMustHaveMatchingThisParameter, attributeLocation, method.Parameters[0], method); 277diagnostics.Add(ErrorCode.ERR_InterceptorScopedMismatch, attributeLocation, method, symbolForCompare);
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (2)
132ErrorCode.ERR_CannotBeConvertedToUtf8, 845ErrorCode.ERR_NoImplicitConv,
Lowering\LocalRewriter\LocalRewriter_Event.cs (1)
278_diagnostics.Add(new CSDiagnosticInfo(ErrorCode.ERR_MissingPredefinedMember, invocationListProperty.ContainingType, accessorName), syntax.Location);
Lowering\LocalRewriter\LocalRewriter_FunctionPointerInvocation.cs (1)
40this._diagnostics.Add(ErrorCode.ERR_InterceptableMethodMustBeOrdinary, attributeLocation, nameSyntax.Identifier.ValueText);
Lowering\LocalRewriter\LocalRewriter.cs (1)
257this._diagnostics.Add(ErrorCode.ERR_InterceptorCannotInterceptNameof, nameofIdentiferSyntax.Location);
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (1)
628_factory.Diagnostics.Add(ErrorCode.ERR_DynamicRequiredTypesMissing, NoLocation.Singleton);
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (3)
94diagnostics.Add(ErrorCode.ERR_ByRefTypeAndAwait, syntax.Location, local.TypeWithAnnotations); 100diagnostics.Add(ErrorCode.ERR_RefLocalAcrossAwait, syntax.Location); 112diagnostics.Add(ErrorCode.ERR_ByRefTypeAndAwait, syntax.Location, parameter.TypeWithAnnotations);
Lowering\StateMachineRewriter\RefInitializationHoister.cs (2)
244_factory.Diagnostics.Add(ErrorCode.ERR_RefReturningCallAndAwait, _factory.Syntax.Location, call.Method); 264_factory.Diagnostics.Add(ErrorCode.ERR_RefConditionalAndAwait, _factory.Syntax.Location);
Lowering\SyntheticBoundNodeFactory.cs (2)
334var diagnostic = new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_MissingPredefinedMember, memberDescriptor.DeclaringTypeMetadataName, memberDescriptor.Name), Syntax.Location); 381var diagnostic = new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_MissingPredefinedMember, memberDescriptor.DeclaringTypeMetadataName, memberDescriptor.Name), Syntax.Location);
Parser\AbstractLexer.cs (8)
48protected void AddError(int position, int width, ErrorCode code) 53protected void AddError(int position, int width, ErrorCode code, params object[] args) 58protected void AddError(ErrorCode code) 63protected void AddError(ErrorCode code, params object[] args) 91protected SyntaxDiagnosticInfo MakeError(int position, int width, ErrorCode code) 97protected SyntaxDiagnosticInfo MakeError(int position, int width, ErrorCode code, params object[] args) 117protected static SyntaxDiagnosticInfo MakeError(ErrorCode code) 122protected static SyntaxDiagnosticInfo MakeError(ErrorCode code, params object[] args)
Parser\DirectiveParser.cs (55)
116hash = this.AddError(hash, ErrorCode.ERR_PPShebangNotOnFirstLine); 131id = this.AddError(id, ErrorCode.ERR_PPDirectiveExpected); 135hash = this.AddError(hash, ErrorCode.ERR_PPDirectiveExpected); 171return this.AddError(SyntaxFactory.BadDirectiveTrivia(hash, keyword, eod, isActive), ErrorCode.ERR_EndRegionDirectiveExpected); 175return this.AddError(SyntaxFactory.BadDirectiveTrivia(hash, keyword, eod, isActive), ErrorCode.ERR_EndifDirectiveExpected); 179return this.AddError(SyntaxFactory.BadDirectiveTrivia(hash, keyword, eod, isActive), ErrorCode.ERR_UnexpectedDirective); 194return this.AddError(SyntaxFactory.BadDirectiveTrivia(hash, keyword, eod, isActive), ErrorCode.ERR_EndRegionDirectiveExpected); 198return this.AddError(SyntaxFactory.BadDirectiveTrivia(hash, keyword, eod, isActive), ErrorCode.ERR_EndifDirectiveExpected); 202return this.AddError(SyntaxFactory.BadDirectiveTrivia(hash, keyword, eod, isActive), ErrorCode.ERR_UnexpectedDirective); 217return this.AddError(SyntaxFactory.BadDirectiveTrivia(hash, keyword, eod, isActive), ErrorCode.ERR_EndRegionDirectiveExpected); 221return this.AddError(SyntaxFactory.BadDirectiveTrivia(hash, keyword, eod, isActive), ErrorCode.ERR_UnexpectedDirective); 239return this.AddError(SyntaxFactory.BadDirectiveTrivia(hash, keyword, eod, isActive), ErrorCode.ERR_EndifDirectiveExpected); 243return this.AddError(SyntaxFactory.BadDirectiveTrivia(hash, keyword, eod, isActive), ErrorCode.ERR_UnexpectedDirective); 251keyword = this.AddError(keyword, ErrorCode.ERR_PPDefFollowsToken); 254var name = this.EatToken(SyntaxKind.IdentifierToken, ErrorCode.ERR_IdentifierExpected); 329eod = this.AddError(eod, offset: triviaOffset, triviaWidth, isError ? ErrorCode.ERR_ErrorDirective : ErrorCode.WRN_WarningDirective, errorText); 342eod = this.AddError(eod, triviaOffset, triviaWidth, ErrorCode.ERR_CompilerAndLanguageVersion, version, 352ErrorCode error = this.Options.LanguageVersion.GetErrorCode(); 384line = this.EatToken(SyntaxKind.NumericLiteralToken, ErrorCode.ERR_InvalidLineNumber, reportError: isActive); 390line = this.AddError(line, ErrorCode.ERR_InvalidLineNumber); 394line = this.AddError(line, ErrorCode.WRN_TooManyLinesForDebugger); 420start = this.AddError(start, ErrorCode.ERR_LineSpanDirectiveRequiresSpace); 430end = this.AddError(end, ErrorCode.ERR_LineSpanDirectiveEndLessThanStart); 439characterOffset = this.AddError(characterOffset, ErrorCode.ERR_LineSpanDirectiveRequiresSpace); 442var file = EatToken(SyntaxKind.StringLiteralToken, ErrorCode.ERR_MissingPPFile, reportError: reportError); 447file = this.AddError(file, ErrorCode.ERR_LineSpanDirectiveRequiresSpace); 481var token = this.EatToken(SyntaxKind.NumericLiteralToken, ErrorCode.ERR_LineSpanDirectiveInvalidValue, reportError: reportError); 492token = this.AddError(token, ErrorCode.ERR_LineSpanDirectiveInvalidValue); 505keyword = this.AddError(keyword, ErrorCode.ERR_ReferenceDirectiveOnlyAllowedInScripts); 509keyword = this.AddError(keyword, ErrorCode.ERR_PPReferenceFollowsToken); 513SyntaxToken file = this.EatToken(SyntaxKind.StringLiteralToken, ErrorCode.ERR_ExpectedPPFile, reportError: isActive); 525keyword = this.AddError(keyword, ErrorCode.ERR_LoadDirectiveOnlyAllowedInScripts); 529keyword = this.AddError(keyword, ErrorCode.ERR_PPLoadFollowsToken); 533SyntaxToken file = this.EatToken(SyntaxKind.StringLiteralToken, ErrorCode.ERR_ExpectedPPFile, reportError: isActive); 551_ => EatToken(SyntaxKind.DisableKeyword, ErrorCode.ERR_NullableDirectiveQualifierExpected, reportError: isActive) 560_ => EatToken(SyntaxKind.WarningsKeyword, ErrorCode.ERR_NullableDirectiveTargetExpected, reportError: !setting.IsMissing && isActive) 615id = this.EatToken(SyntaxKind.NumericLiteralToken, ErrorCode.WRN_IdentifierOrNumericLiteralExpected, reportError: isActive); 635style = this.EatToken(SyntaxKind.DisableKeyword, ErrorCode.WRN_IllegalPPWarning, reportError: isActive); 643var file = this.EatToken(SyntaxKind.StringLiteralToken, ErrorCode.WRN_IllegalPPChecksum, reportError: isActive); 644var guid = this.EatToken(SyntaxKind.StringLiteralToken, ErrorCode.WRN_IllegalPPChecksum, reportError: isActive && !file.IsMissing); 650guid = this.AddError(guid, ErrorCode.WRN_IllegalPPChecksum); 654var bytes = this.EatToken(SyntaxKind.StringLiteralToken, ErrorCode.WRN_IllegalPPChecksum, reportError: isActive && !guid.IsMissing); 659bytes = this.AddError(bytes, ErrorCode.WRN_IllegalPPChecksum); 667bytes = this.AddError(bytes, ErrorCode.WRN_IllegalPPChecksum); 680var warning = this.EatToken(SyntaxKind.WarningKeyword, ErrorCode.WRN_IllegalPragma, reportError: isActive); 691exclamation = this.AddError(exclamation, ErrorCode.ERR_PPShebangInProjectBasedProgram); 703colon = this.AddError(colon, ErrorCode.ERR_PPIgnoredNeedsFileBasedProgram); 708colon = this.AddError(colon, ErrorCode.ERR_PPIgnoredFollowsToken); 713colon = this.AddError(colon, ErrorCode.ERR_PPIgnoredFollowsIf); 736var errorCode = ErrorCode.ERR_EndOfPPLineExpected; 739errorCode = ErrorCode.WRN_EndOfPPLineExpected; 743errorCode = ErrorCode.ERR_MissingPPFile; 842return SyntaxFactory.IdentifierName(this.EatToken(SyntaxKind.IdentifierToken, ErrorCode.ERR_InvalidPreprocExpr));
Parser\DocumentationCommentParser.cs (10)
796SyntaxDiagnosticInfo crefInfo = new SyntaxDiagnosticInfo(rawInfo.Offset, rawInfo.Width, ErrorCode.WRN_ErrorOverride, rawInfo, rawInfo.Code); 928result = this.AddError(result, ErrorCode.WRN_BadXMLRefSyntax, result.ToFullString()); 1006member = AddErrorAsWarning(member, ErrorCode.ERR_MisplacedExtension); 1040SyntaxDiagnosticInfo rawInfo = new SyntaxDiagnosticInfo(offset, width, ErrorCode.ERR_OvlOperatorExpected); 1041SyntaxDiagnosticInfo crefInfo = new SyntaxDiagnosticInfo(offset, width, ErrorCode.WRN_ErrorOverride, rawInfo, rawInfo.Code); 1193var misplacedToken = AddErrorAsWarning(EatToken(), ErrorCode.ERR_MisplacedUnchecked); 1332var misplacedToken = AddErrorAsWarning(EatToken(), ErrorCode.ERR_RefReadOnlyWrongOrdering); 1376typeSyntax = this.AddError(typeSyntax, ErrorCode.WRN_ErrorOverride, 1377new SyntaxDiagnosticInfo(ErrorCode.ERR_TypeParamMustBeIdentifier), $"{(int)ErrorCode.ERR_TypeParamMustBeIdentifier:d4}");
Parser\LanguageParser_InterpolatedString.cs (3)
313ErrorCode.ERR_LineContainsDifferentWhitespace, 321ErrorCode.ERR_LineDoesNotStartWithSameWhitespace); 394return MakeError(offset: 0, width: 1, ErrorCode.ERR_LineDoesNotStartWithSameWhitespace);
Parser\LanguageParser_Patterns.cs (5)
169skippedSyntax: AddError(this.EatToken(), ErrorCode.ERR_EqualityOperatorInPatternNotSupported), 178this.AddError(this.EatToken(), ErrorCode.ERR_InequalityOperatorInPatternNotSupported)), 199return _syntaxFactory.ConstantPattern(this.ParseIdentifierName(ErrorCode.ERR_MissingPattern)); 380? AddError(this.EatToken(), ErrorCode.ERR_DesignatorBeforePropertyPattern) 616? AddError(this.EatToken(), ErrorCode.ERR_BadCaseInSwitchArm)
Parser\LanguageParser.cs (147)
233return AddError(node, position, 0, ErrorCode.ERR_InsufficientStack); 256namespaceToken = this.AddError(namespaceToken, ErrorCode.ERR_NamespaceNotAllowedInScript); 514AddError(typeDeclaration.CloseBraceToken, ErrorCode.ERR_InvalidMemberDecl, "}")); 528SyntaxFactory.MissingToken(SyntaxKind.CloseBraceToken), ErrorCode.ERR_RbraceExpected); 617IsScript ? ErrorCode.ERR_GlobalDefinitionOrStatementExpected : ErrorCode.ERR_EOFExpected); 647@extern = this.AddErrorToFirstToken(@extern, ErrorCode.ERR_ExternAfterElements); 706this.AddError(attribute.Target.Identifier, ErrorCode.ERR_GlobalAttributesNotFirst), 742IsScript ? ErrorCode.ERR_GlobalDefinitionOrStatementExpected : ErrorCode.ERR_EOFExpected); 791memberOrStatement = this.AddError(memberOrStatement, ErrorCode.ERR_TopLevelStatementAfterNamespaceOrType); 837@using = this.AddError(@using, ErrorCode.ERR_UsingAfterElements); 964unsafeToken = AddTrailingSkippedSyntax(unsafeToken, AddError(this.EatToken(), ErrorCode.ERR_BadStaticAfterUnsafe)); 1236literalToken.GetDiagnostics().Contains(d => d.Code == (int)ErrorCode.ERR_NewlineInConst)) 1816keyword = AddTrailingSkippedSyntax(keyword, this.AddError(this.EatToken(), ErrorCode.ERR_ExtensionDisallowsName)); 1952this.AddError(ConvertToKeyword(this.EatToken()), ErrorCode.ERR_MisplacedRecord), 2108token = this.AddError(token, ErrorCode.ERR_InvalidMemberDecl, token.Text); 2254? this.AddError(this.CreateMissingIdentifierName(), ErrorCode.ERR_IdentifierExpected) 2264bounds.Add(_syntaxFactory.TypeConstraint(this.AddError(this.CreateMissingIdentifierName(), ErrorCode.ERR_TypeExpected))); 2289AddTrailingSkippedSyntax(bounds, this.AddError(separatorToken, ErrorCode.ERR_UnexpectedToken, SyntaxFacts.GetText(SyntaxKind.CommaToken))); 2296bounds.Add(_syntaxFactory.TypeConstraint(this.AddError(this.CreateMissingIdentifierName(), ErrorCode.ERR_TypeExpected))); 2361? this.AddError(this.EatToken(), ErrorCode.ERR_UnexpectedToken, SyntaxFacts.GetText(SyntaxKind.QuestionToken)) 2375this.AddError(this.CreateMissingIdentifierName(), ErrorCode.ERR_NoEnumConstraint), 2384this.AddError(this.CreateMissingIdentifierName(), ErrorCode.ERR_NoDelegateConstraint), 2690this.AddError(SyntaxFactory.MissingToken(SyntaxKind.VoidKeyword), ErrorCode.ERR_MemberNeedsType)); 3037ErrorCode.ERR_BadModifierLocation, 3081result = this.AddErrorToLastToken(incompleteMember, ErrorCode.ERR_NamespaceUnexpected); 3094ErrorCode.ERR_InvalidMemberDecl, 3193identifierOrThisOpt ??= this.AddError(CreateMissingIdentifierToken(), ErrorCode.ERR_IdentifierExpected); 3554: this.EatToken(SyntaxKind.ThisKeyword, ErrorCode.ERR_ThisOrBaseExpected); 3625semicolon = this.EatTokenWithPrejudice(ErrorCode.ERR_UnexpectedSemicolon); 3705initializer = this.AddErrorToFirstToken(initializer, ErrorCode.ERR_UnexpectedToken, colonToken.Text); 3854type = this.AddError(this.CreateMissingIdentifierName(), ErrorCode.ERR_IdentifierExpected); 3951separator = this.AddError(separator, ErrorCode.ERR_AliasQualAsExpression); 3984var misplacedToken = this.AddError(this.EatToken(), ErrorCode.ERR_MisplacedUnchecked); 4014AddError(type, ErrorCode.ERR_BadOperatorSyntax, firstToken.Text)); 4056SyntaxDiagnosticInfo diagInfo = MakeError(opTokenErrorOffset, opTokenErrorWidth, ErrorCode.ERR_BadOperatorSyntax, SyntaxFacts.GetText(SyntaxKind.PlusToken)); 4062type = this.AddError(type, ErrorCode.ERR_BadOperatorSyntax, SyntaxFacts.GetText(SyntaxKind.PlusToken)); 4127SyntaxDiagnosticInfo diagInfo = MakeError(opTokenErrorOffset, opTokenErrorWidth, ErrorCode.ERR_OvlUnaryOperatorExpected); 4135SyntaxDiagnosticInfo diagInfo = MakeError(opTokenErrorOffset, opTokenErrorWidth, ErrorCode.ERR_OvlBinaryOperatorExpected); 4143SyntaxDiagnosticInfo diagInfo = MakeError(opTokenErrorOffset, opTokenErrorWidth, ErrorCode.ERR_OvlOperatorExpected); 4148opToken = this.AddError(opToken, ErrorCode.ERR_BadBinOpArgs, SyntaxFacts.GetText(opKind)); 4154opToken = this.AddError(opToken, ErrorCode.ERR_BadUnOpArgs, SyntaxFacts.GetText(opKind)); 4159opToken = this.AddError(opToken, ErrorCode.ERR_BadCompoundAssignmentOpArgs, SyntaxFacts.GetText(opKind)); 4163opToken = this.AddError(opToken, ErrorCode.ERR_OvlOperatorExpected); 4209thisKeyword = this.AddError(thisKeyword, ErrorCode.ERR_UnexpectedGenericName); 4229semicolon = this.EatTokenWithPrejudice(ErrorCode.ERR_UnexpectedSemicolon); 4267identifier = this.AddError(identifier, ErrorCode.ERR_UnexpectedGenericName); 4307semicolon = this.EatTokenWithPrejudice(ErrorCode.ERR_UnexpectedSemicolon); 4396declaringKind == AccessorDeclaringKind.Event ? ErrorCode.ERR_AddOrRemoveExpected : ErrorCode.ERR_GetOrSetExpected) == PostSkipAction.Abort) 4429private PostSkipAction SkipBadAccessorListTokens(ref SyntaxToken openBrace, SyntaxListBuilder<AccessorDeclarationSyntax> list, ErrorCode error) 4516ErrorCode error) 4562ErrorCode error, 4612ErrorCode errorCode, 4650declaringKind == AccessorDeclaringKind.Event ? ErrorCode.ERR_AddOrRemoveExpected : ErrorCode.ERR_GetOrSetExpected); 4666declaringKind == AccessorDeclaringKind.Event ? ErrorCode.ERR_AddOrRemoveExpected : ErrorCode.ERR_GetOrSetExpected); 4737? ErrorCode.ERR_SemiOrLBraceOrArrowExpected 4738: ErrorCode.ERR_SemiOrLBraceExpected); 4966identifier = identifierIsOptional ? null : this.AddError(CreateMissingIdentifierToken(), ErrorCode.ERR_IdentifierExpected); 4980this.AddError(this.EatToken(), ErrorCode.ERR_BadArraySyntax), 5154identifier = this.AddError(identifier, ErrorCode.ERR_IdentifierExpected); 5160identifier = this.AddError(identifier, ErrorCode.ERR_UnexpectedGenericName); 5196semi = this.AddError(semi, ErrorCode.ERR_UnexpectedSemicolon); 5249eventToken = this.AddError(eventToken, ErrorCode.ERR_ExplicitEventFieldImpl); 5562missingIdentifier = this.AddError(missingIdentifier, offset, width, ErrorCode.ERR_IdentifierExpected); 5595name = this.AddError(name, ErrorCode.ERR_MultiTypeInDeclaration); 5645argumentList = this.AddError(argumentList, ErrorCode.ERR_BadVarDecl); 5658close = this.AddError(close, ErrorCode.ERR_ValueExpected); 5670expression = this.AddError(expression, ErrorCode.ERR_ArraySizeInDeclaration); 5684argumentList = this.AddError(argumentList, ErrorCode.ERR_CStyleArray); 5717name = this.AddError(name, ErrorCode.ERR_ConstValueRequired); // Error here for missing constant initializers 5724name = this.AddError(name, ErrorCode.ERR_FixedDimsRequired); 5884name = this.AddError(name, ErrorCode.ERR_UnexpectedGenericName); 5971? this.ParseIdentifierName(ErrorCode.ERR_ConstantExpected) 6048private IdentifierNameSyntax ParseIdentifierName(ErrorCode code = ErrorCode.ERR_IdentifierExpected) 6062private SyntaxToken ParseIdentifierToken(ErrorCode code = ErrorCode.ERR_IdentifierExpected) 6076result = this.AddError(result, ErrorCode.ERR_InvalidExprTerm, this.CurrentToken.Text); 6084identifierToken = this.AddError(identifierToken, ErrorCode.ERR_BadAwaitAsIdentifier); 6175this.AddError(CreateMissingIdentifierToken(), ErrorCode.ERR_IdentifierExpected)); 6699? this.AddError(this.EatToken(), ErrorCode.ERR_IllegalVarianceSyntax) 6740result = this.AddError(result, ErrorCode.ERR_TypeExpected); 6817separator = this.AddError(separator, ErrorCode.ERR_AliasQualAsExpression); 6871AddError(separator, ErrorCode.ERR_ExplicitEventFieldImpl)); 6927separator = this.AddError(separator, ErrorCode.ERR_UnexpectedAliasedName); 6991separator = this.AddError(separator, ErrorCode.ERR_AliasQualAsExpression); 7069separator = this.AddError(separator, ErrorCode.ERR_UnexpectedAliasedName); 7913list[i] = this.AddError(this.CreateMissingIdentifierName(), offset: 0, list[i].Width, ErrorCode.ERR_ValueExpected); 7947var missing = this.AddError(this.CreateMissingIdentifierName(), ErrorCode.ERR_TupleTooFewElements); 7980token = this.AddError(token, mode == ParseTypeMode.Parameter ? ErrorCode.ERR_NoVoidParameter : ErrorCode.ERR_NoVoidHere); 8003mode == ParseTypeMode.NewExpression ? ErrorCode.ERR_BadNewExpr : ErrorCode.ERR_TypeExpected); 8157unmanagedCallingConventions = AddError(unmanagedCallingConventions, ErrorCode.ERR_CannotSpecifyManagedWithUnmanagedSpecifiers); 9077? ErrorCode.ERR_SemiOrLBraceOrArrowExpected 9078: ErrorCode.ERR_SemiOrLBraceExpected) 9322!semicolonToken.GetDiagnostics().Contains(diagnosticInfo => (ErrorCode)diagnosticInfo.Code == ErrorCode.ERR_SemicolonExpected)) 9324semicolonToken = this.AddError(semicolonToken, ErrorCode.ERR_SemicolonExpected); 9399tryBlock = this.AddErrorToLastToken(tryBlock, ErrorCode.ERR_ExpectedEndTry); 9749skippedForToken = this.AddError(skippedForToken, ErrorCode.ERR_SyntaxError, SyntaxFacts.GetText(SyntaxKind.ForEachKeyword)); 9760var @in = this.EatToken(SyntaxKind.InKeyword, ErrorCode.ERR_InExpected); 9763@in = this.AddError(@in, ErrorCode.ERR_BadForeachDecl); 10005AddErrorToFirstToken(nextExpression, ErrorCode.ERR_UnexpectedToken, nextExpression.GetFirstToken().Text)); 10087this.EatToken(SyntaxKind.IfKeyword, ErrorCode.ERR_ElseCannotStartStatement), 10146returnOrBreak = this.AddError(returnOrBreak, ErrorCode.ERR_EmptyYield); 10224expression = this.AddError(expression, ErrorCode.ERR_SwitchGoverningExpressionRequiresParens); 10258ParseIdentifierName(ErrorCode.ERR_ConstantExpected), 10270node = this.AddError(node, ErrorCode.ERR_DiscardPatternInSwitchStatement); 10566mods[i] = this.AddError(mod, ErrorCode.ERR_BadMemberFlag, mod.Text); 10785type = this.AddError(type, ErrorCode.ERR_NoVoidHere); 10826mod = this.AddError(mod, ErrorCode.ERR_NoModifiersOnUsing); 10830mod = this.AddError(mod, ErrorCode.ERR_BadMemberFlag, mod.Text); 10971modifier = this.AddError(modifier, ErrorCode.ERR_BadMemberFlag, modifier.Text); 11461return this.AddError(this.CreateMissingIdentifierName(), ErrorCode.ERR_InvalidExprTerm, SyntaxFacts.GetText(tk)); 11508this.AddError(this.EatToken(), ErrorCode.ERR_InvalidExprTerm, this.CurrentToken.Text)); 11517: this.AddError(result, ErrorCode.ERR_InvalidExprTerm, SyntaxFacts.GetText(tk)); 11601leftOperand.Kind == SyntaxKind.IsPatternExpression ? ErrorCode.ERR_UnexpectedToken : ErrorCode.WRN_PrecedenceInversion, 11695return this.AddError(conditionalExpression, ErrorCode.ERR_ConditionalInInterpolation); 11895ErrorCode.ERR_TripleDotNotAllowed); 11994return this.AddError(this.CreateMissingIdentifierName(), ErrorCode.ERR_InvalidExprTerm, this.CurrentToken.Text); 12023return this.AddError(this.CreateMissingIdentifierName(), ErrorCode.ERR_InvalidExprTerm, this.CurrentToken.Text); 12079return this.AddError(_syntaxFactory.RefExpression(refKeyword, this.ParseExpressionCore()), ErrorCode.ERR_InvalidExprTerm, SyntaxFacts.GetText(tk)); 12093expr = this.AddError(expr, ErrorCode.ERR_InvalidExprTerm, SyntaxFacts.GetText(tk)); 12104expr = this.AddError(expr, ErrorCode.ERR_ExpressionExpected); 12118ErrorCode.ERR_InvalidExprTerm, 12123expr = this.AddError(expr, ErrorCode.ERR_InvalidExprTerm, SyntaxFacts.GetText(tk)); 12163this.ConvertToMissingWithTrailingTrivia(this.AddError(this.EatToken(), ErrorCode.ERR_UnexpectedAliasedName), SyntaxKind.DotToken), 12194this.AddError(this.CreateMissingIdentifierName(), ErrorCode.ERR_IdentifierExpected)); 12605expression = this.ParseIdentifierName(ErrorCode.ERR_ValueExpected); 12609expression = this.ParseIdentifierName(ErrorCode.ERR_MissingArgument); 12910this.AddError(this.CreateMissingIdentifierName(), ErrorCode.ERR_TupleTooFewElements))); 13423this.EatToken(SyntaxKind.OpenParenToken, ErrorCode.ERR_BadNewExpr, reportError: type?.ContainsDiagnostics == false), 13634var size = this.AddError(this.ParseExpressionCore(), ErrorCode.ERR_InvalidArray); 13708var size = this.AddError(this.ParseExpressionCore(), ErrorCode.ERR_InvalidStackAllocArray); 13714var comma = this.AddError(this.EatToken(), ErrorCode.ERR_InvalidStackAllocArray); 14193: this.AddError(fromClause, ErrorCode.WRN_PrecedenceInversion, SyntaxFacts.GetText(SyntaxKind.FromKeyword)), 14232this.EatToken(SyntaxKind.SelectKeyword, ErrorCode.ERR_ExpectedSelectOrGroup), 14288onKeyword: this.EatContextualToken(SyntaxKind.OnKeyword, ErrorCode.ERR_ExpectedContextualKeywordOn), 14290equalsKeyword: this.EatContextualToken(SyntaxKind.EqualsKeyword, ErrorCode.ERR_ExpectedContextualKeywordEquals), 14395this.EatContextualToken(SyntaxKind.ByKeyword, ErrorCode.ERR_ExpectedContextualKeywordBy), 14706node = this.AddError(node, ErrorCode.ERR_UnexpectedToken, trailingTrash[0].ToString());
Parser\Lexer_StringLiteral.cs (28)
30this.AddError(ErrorCode.ERR_RawStringNotInDirectives); 64this.AddError(ErrorCode.ERR_NewlineInConst); 80this.AddError((_builder.Length != 0) ? ErrorCode.ERR_TooManyCharsInConst : ErrorCode.ERR_EmptyCharConst); 185this.AddError(start, TextWindow.Position - start, ErrorCode.ERR_IllegalEscape); 205this.AddError(start, width: TextWindow.Position - start, ErrorCode.ERR_IllegalAtSequence); 233this.AddError(ErrorCode.ERR_UnterminatedStringLit); 480TrySetError(_lexer.MakeError(start, window.Position - start, ErrorCode.ERR_StringMustStartWithQuoteCharacter)); 491TrySetError(_lexer.MakeError(start, window.Position - start, ErrorCode.ERR_IllegalAtSequence)); 497TrySetError(_lexer.MakeError(window.Position - startingQuoteCount, startingQuoteCount, ErrorCode.ERR_NotEnoughQuotesForRawString)); 558width: 1, ErrorCode.ERR_UnterminatedStringLit)); 581width: SyntaxFacts.IsNewLine(_lexer.TextWindow.PeekChar()) ? 1 : 0, ErrorCode.ERR_UnterminatedRawString)); 600ErrorCode.ERR_TooManyQuotesForRawString)); 615_lexer.TextWindow.Position, width: 0, ErrorCode.ERR_UnterminatedRawString)); 628ErrorCode.ERR_RawStringDelimiterOnOwnLine)); 647ErrorCode.ERR_TooManyQuotesForRawString)); 701TrySetError(_lexer.MakeError(escapeStart, _lexer.TextWindow.Position - escapeStart, ErrorCode.ERR_EscapedCurly, ch)); 732_lexer.TextWindow.Position - closeQuoteCount, closeQuoteCount, ErrorCode.ERR_RawStringMustContainContent)); 832TrySetError(_lexer.MakeError(pos, 1, ErrorCode.ERR_UnescapedCurly, "}")); 850ErrorCode.ERR_TooManyCloseBracesForRawString)); 886TrySetError(_lexer.MakeError(openBracePosition - 1, 2, ErrorCode.ERR_UnclosedExpressionHole)); 921ErrorCode.ERR_TooManyOpenBracesForRawString)); 936ErrorCode.ERR_UnclosedExpressionHole)); 944ErrorCode.ERR_NotEnoughCloseBracesForRawString)); 984TrySetError(_lexer.MakeError(pos, 1, ErrorCode.ERR_EscapedCurly, ch)); 1001_lexer.TextWindow.Position, 1, ErrorCode.ERR_UnexpectedCharacter, ch)); 1041TrySetError(_lexer.MakeError(_lexer.TextWindow.Position, 1, ErrorCode.ERR_SyntaxError, endingChar.ToString())); 1073TrySetError(_lexer.MakeError(_lexer.TextWindow.Position, 1, ErrorCode.ERR_SyntaxError, endingChar.ToString()));
Parser\Lexer.cs (28)
621this.AddError(TextWindow.Position + 1, width: 1, ErrorCode.ERR_ExpectedVerbatimLiteral); 630this.AddError(ErrorCode.ERR_ExpectedVerbatimLiteral); 677this.AddError(ErrorCode.ERR_EndifDirectiveExpected); 682this.AddError(ErrorCode.ERR_EndRegionDirectiveExpected); 731this.AddError(ErrorCode.ERR_UnexpectedCharacter, messageText); 915this.AddError(MakeError(ErrorCode.ERR_LegacyObjectIdSyntax)); 952this.AddError(MakeError(ErrorCode.ERR_InvalidReal)); 1024this.AddError(MakeError(start, TextWindow.Position - start, ErrorCode.ERR_InvalidNumber)); 1056this.AddError(MakeError(ErrorCode.ERR_InvalidNumber)); 1184this.AddError(MakeError(ErrorCode.ERR_IntOverflow)); 1198this.AddError(MakeError(ErrorCode.ERR_IntOverflow)); 1204this.AddError(MakeError(ErrorCode.ERR_IntOverflow)); 1216this.AddError(MakeError(ErrorCode.ERR_FloatOverflow, "double")); 1228this.AddError(MakeError(ErrorCode.ERR_FloatOverflow, "float")); 1263this.AddError(this.MakeError(start, end - start, ErrorCode.ERR_FloatOverflow, "decimal")); 1613this.AddError(start, atCount, ErrorCode.ERR_IllegalAtSequence); 1954this.AddError(TextWindow.Position, width: 1, ErrorCode.ERR_UnexpectedCharacter, '@'); 1993var error = new SyntaxDiagnosticInfo(offset: 0, width: 1, code: ErrorCode.ERR_BadDirectivePlacement); 2051this.AddError(ErrorCode.ERR_OpenEndedComment); 2100ErrorCode.ERR_Merge_conflict_marker_encountered); 2816this.AddError(this.LexemeStartPosition, this.CurrentLexemeWidth, ErrorCode.ERR_OpenEndedComment); 3719this.AddCrefError(ErrorCode.ERR_UnexpectedCharacter, "."); 3858this.AddError(ErrorCode.ERR_ExpectedVerbatimLiteral); 3865this.AddCrefError(ErrorCode.ERR_UnexpectedCharacter, info.Text); 3876this.AddCrefError(ErrorCode.ERR_UnexpectedCharacter, info.Text); 3969private void AddCrefError(ErrorCode code, params object[] args) 3982this.AddError(ErrorCode.WRN_ErrorOverride, info, info.Code); 4843ErrorCode.ERR_IllegalEscape);
Parser\SyntaxParser.cs (29)
558private SyntaxToken CreateMissingToken(SyntaxKind expected, ErrorCode code, bool reportError) 589protected SyntaxToken EatToken(SyntaxKind kind, ErrorCode code, bool reportError = true) 638protected SyntaxToken EatTokenWithPrejudice(ErrorCode errorCode, params object[] args) 645protected SyntaxToken EatContextualToken(SyntaxKind kind, ErrorCode code) 676var code = GetExpectedTokenErrorCode(expected, actual); 677if (code == ErrorCode.ERR_SyntaxError) 681else if (code == ErrorCode.ERR_IdentifierExpectedKW) 700private static ErrorCode GetExpectedTokenErrorCode(SyntaxKind expected, SyntaxKind actual) 707return ErrorCode.ERR_IdentifierExpectedKW; // A keyword -- use special message. 711return ErrorCode.ERR_IdentifierExpected; 715return ErrorCode.ERR_SemicolonExpected; 720return ErrorCode.ERR_CloseParenExpected; 722return ErrorCode.ERR_LbraceExpected; 724return ErrorCode.ERR_RbraceExpected; 728return ErrorCode.ERR_SyntaxError; 749protected TNode AddError<TNode>(TNode node, ErrorCode code) where TNode : GreenNode 754protected TNode AddErrorAsWarning<TNode>(TNode node, ErrorCode code, params object[] args) where TNode : GreenNode 757return AddError(node, ErrorCode.WRN_ErrorOverride, MakeError(node, code, args), (int)code); 760protected TNode AddError<TNode>(TNode nodeOrToken, ErrorCode code, params object[] args) where TNode : GreenNode 898protected TNode AddError<TNode>(TNode node, int offset, int length, ErrorCode code, params object[] args) where TNode : CSharpSyntaxNode 903protected TNode AddErrorToFirstToken<TNode>(TNode node, ErrorCode code) where TNode : CSharpSyntaxNode 909protected TNode AddErrorToFirstToken<TNode>(TNode node, ErrorCode code, params object[] args) where TNode : CSharpSyntaxNode 915protected TNode AddErrorToLastToken<TNode>(TNode node, ErrorCode code) where TNode : CSharpSyntaxNode 936protected static SyntaxDiagnosticInfo MakeError(int offset, int width, ErrorCode code) 941protected static SyntaxDiagnosticInfo MakeError(int offset, int width, ErrorCode code, params object[] args) 946protected static SyntaxDiagnosticInfo MakeError(GreenNode node, ErrorCode code, params object[] args) 951protected static SyntaxDiagnosticInfo MakeError(ErrorCode code, params object[] args) 1094new SyntaxDiagnosticInfo(finalDiagnosticOffset, diagnostic.Width, (ErrorCode)diagnostic.Code, diagnostic.Arguments)); 1155return AddError(node, ErrorCode.WRN_ErrorOverride, info, (int)info.Code);
Symbols\AliasSymbol.cs (3)
361diagnostics.Add(ErrorCode.ERR_BadExternAlias, GetFirstLocation(), Name); 390diagnostics.Add(ErrorCode.ERR_IllegalUnsafe, usingDirective.UnsafeKeyword.GetLocation()); 416diagnostics.Add(ErrorCode.ERR_BadNullableReferenceTypeInUsingAlias, nullableType.QuestionToken.GetLocation());
Symbols\AnonymousTypes\AnonymousTypeManager.SymbolCollection.cs (2)
82diagnostics.Add(ErrorCode.ERR_MissingPredefinedMember, NoLocation.Singleton, 97diagnostics.Add(ErrorCode.ERR_MissingPredefinedMember, NoLocation.Singleton,
Symbols\AssemblySymbol.cs (3)
369DiagnosticInfo diagnosticInfo = new CSDiagnosticInfo(ErrorCode.ERR_CycleInTypeForwarder, emittedName.FullName, this.Name); 375var diagnosticInfo = new CSDiagnosticInfo(ErrorCode.ERR_TypeForwardedToMultipleAssemblies, forwardingModule, this, emittedName.FullName, destination1, destination2); 1027warnings.Add(ErrorCode.WRN_MultiplePredefTypes, NoLocation.Singleton, result, result.ContainingAssembly);
Symbols\Attributes\AttributeData.cs (11)
246((BindingDiagnosticBag)arguments.Diagnostics).Add(ErrorCode.ERR_IllegalUnsafe, arguments.AttributeSyntaxOpt.Location); 297((BindingDiagnosticBag)arguments.Diagnostics).Add(ErrorCode.WRN_MemberNotNullBadMember, arguments.AttributeSyntaxOpt.Location, memberName); 375diagnostics.Add(ErrorCode.ERR_SecurityAttributeMissingAction, nodeOpt != null ? nodeOpt.Name.Location : NoLocation.Singleton); 398diagnostics.Add(ErrorCode.ERR_PrincipalPermissionInvalidAction, syntaxLocation, displayString); 428diagnostics.Add(ErrorCode.ERR_SecurityAttributeInvalidAction, syntaxLocation, nodeOpt != null ? nodeOpt.GetErrorDisplayName() : "", displayString); 444diagnostics.Add(ErrorCode.ERR_SecurityAttributeInvalidActionTypeOrMethod, syntaxLocation, displayString); 458diagnostics.Add(ErrorCode.ERR_SecurityAttributeInvalidActionAssembly, syntaxLocation, displayString); 534diagnostics.Add(ErrorCode.ERR_PermissionSetAttributeInvalidFile, argSyntaxLocation, fileName ?? "<null>", filePropName); 590diagnostics.Add(ErrorCode.ERR_InvalidAttributeArgument, this.GetAttributeArgumentLocation(0), nodeOpt != null ? nodeOpt.GetErrorDisplayName() : ""); 616diagnostics.Add(ErrorCode.ERR_InvalidAttributeArgument, this.GetAttributeArgumentLocation(0), node.GetErrorDisplayName()); 633diagnostics.Add(ErrorCode.ERR_InvalidAttributeArgument, attributeArgumentSyntaxLocation, nodeOpt != null ? nodeOpt.GetErrorDisplayName() : "");
Symbols\Attributes\PEAttributeData.cs (3)
189return new CSDiagnosticInfo(ErrorCode.ERR_BogusType, string.Empty); 198return new CSDiagnosticInfo(ErrorCode.ERR_MissingPredefinedMember, attributeClass, WellKnownMemberNames.InstanceConstructorName); 201return new CSDiagnosticInfo(ErrorCode.ERR_BogusType, string.Empty);
Symbols\Attributes\RetargetingAttributeData.cs (1)
69return new CSDiagnosticInfo(ErrorCode.ERR_MissingPredefinedMember, AttributeClass, WellKnownMemberNames.InstanceConstructorName);
Symbols\Compilation_WellKnownMembers.cs (2)
165errorInfo = new CSDiagnosticInfo(ErrorCode.ERR_PredefinedTypeAmbiguous, emittedName.FullName, conflict1, conflict2); 173errorInfo = new CSDiagnosticInfo(ErrorCode.ERR_PredefinedValueTupleTypeNotFound, emittedName.FullName);
Symbols\ConstantValueUtils.cs (3)
91diagnostics.Add(ErrorCode.ERR_InvalidConstantDeclarationType, initValueNode.Location, thisSymbol, typeSymbol); 123diagnostics.Add(ErrorCode.ERR_NotNullConstRefField, initValueNode.Location, thisSymbol, typeSymbol); 139diagnostics.Add(ErrorCode.ERR_NotConstantExpression, initValueNode.Location, thisSymbol);
Symbols\ConstraintsHelper.cs (30)
106diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportByRefLikeGenerics, location); 118diagnostics.Add(ErrorCode.ERR_ClassIsCombinedWithRefStruct, typeParameter.GetFirstLocation()); 179diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(constraintTypeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_CircularConstraint, constraintTypeParameter, typeParameter)))); 198ErrorCode errorCode; 201errorCode = ErrorCode.ERR_ConWithUnmanagedCon; 205errorCode = ErrorCode.ERR_ConWithValCon; 251diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(underlyingTypeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_CircularConstraint, underlyingTypeParameter, typeParameter)))); 303diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_BaseConstraintConflict, typeParameter, constraintDeducedBase, deducedBaseType)))); 712args.Diagnostics.Add(ErrorCode.ERR_BogusType, args.Location, type); 749args.Diagnostics.Add(ErrorCode.ERR_BogusType, args.Location, type); 959diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_BadTypeArgument, typeArgument.Type)))); 977diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_RuntimeDoesNotSupportByRefLikeGenerics)))); 984diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_NotRefStructConstraintNotSatisfied, containingSymbol.ConstructedFrom(), typeParameter, typeArgument.Type)))); 992diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_GenericArgIsStaticClass, typeArgument.Type)))); 1001diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_RefConstraintNotSatisfied, containingSymbol.ConstructedFrom(), typeParameter, typeArgument.Type)))); 1017diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_UnmanagedConstraintNotSatisfied, containingSymbol.ConstructedFrom(), typeParameter, typeArgument.Type)))); 1043diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_ValConstraintNotSatisfied, containingSymbol.ConstructedFrom(), typeParameter, typeArgument.Type)))); 1094new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_GenericConstraintNotSatisfiedInterfaceWithStaticAbstractMembers, iface, member)))); 1128diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_NewConstraintNotSatisfied, containingSymbol.ConstructedFrom(), typeParameter, typeArgument.Type)))); 1132diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_NewConstraintCannotHaveRequiredMembers, containingSymbol.ConstructedFrom(), typeParameter, typeArgument.Type)))); 1151nullabilityDiagnosticsBuilderOpt.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.WRN_NullabilityMismatchInTypeParameterNotNullConstraint, containingSymbol.ConstructedFrom(), typeParameter, typeArgument)))); 1158nullabilityDiagnosticsBuilderOpt.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint, containingSymbol.ConstructedFrom(), typeParameter, typeArgument)))); 1182nullabilityDiagnosticsBuilderOpt.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.WRN_NullabilityMismatchInTypeParameterConstraint, containingSymbol.ConstructedFrom(), constraintType, typeParameter, typeArgument)))); 1188ErrorCode errorCode; 1191errorCode = ErrorCode.ERR_GenericConstraintNotSatisfiedRefType; 1195errorCode = constraintType.Type.IsInterfaceType() ? ErrorCode.ERR_GenericConstraintNotSatisfiedNullableInterface : ErrorCode.ERR_GenericConstraintNotSatisfiedNullableEnum; 1199errorCode = ErrorCode.ERR_GenericConstraintNotSatisfiedTyVar; 1203errorCode = ErrorCode.ERR_GenericConstraintNotSatisfiedValType; 1452return new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_BaseConstraintConflict, typeParameter, deducedBase, classConflict ? "class" : "struct")));
Symbols\EventSymbol.cs (4)
315protected sealed override bool IsHighestPriorityUseSiteErrorCode(int code) => code is (int)ErrorCode.ERR_UnsupportedCompilerFeature or (int)ErrorCode.ERR_BindToBogus; 322return (object?)info != null && info.Code is (int)ErrorCode.ERR_BindToBogus or (int)ErrorCode.ERR_UnsupportedCompilerFeature;
Symbols\Extensions\SynthesizedExtensionMarker.cs (6)
83diagnostics.Add(ErrorCode.ERR_ReceiverParameterOnlyOne, parameterList.Parameters[parameterIndex].GetLocation()); 98diagnostics.Add(ErrorCode.ERR_BadTypeforThis, parameterTypeSyntax, parameterType); 102diagnostics.Add(ErrorCode.ERR_RefExtensionParameterMustBeValueTypeOrConstrainedToOne, parameterTypeSyntax); 107diagnostics.Add(ErrorCode.ERR_InExtensionParameterMustBeValueType, parameterTypeSyntax); 112diagnostics.Add(ErrorCode.ERR_ModifierOnUnnamedReceiverParameter, parameterTypeSyntax); 119diagnostics.Add(ErrorCode.ERR_ReceiverParameterSameNameAsTypeParameter, parameter.GetFirstLocation(), name);
Symbols\FieldSymbol.cs (4)
383protected sealed override bool IsHighestPriorityUseSiteErrorCode(int code) => code is (int)ErrorCode.ERR_UnsupportedCompilerFeature or (int)ErrorCode.ERR_BindToBogus; 390return (object)info != null && info.Code is (int)ErrorCode.ERR_BindToBogus or (int)ErrorCode.ERR_UnsupportedCompilerFeature;
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (11)
61diagnostics.Add(ErrorCode.ERR_DupReturnTypeMod, modifier.GetLocation(), modifier.Text); 66diagnostics.Add(ErrorCode.ERR_InvalidFuncPointerReturnTypeModifier, modifier.GetLocation(), modifier.Text); 75diagnostics.Add(ErrorCode.ERR_NoVoidHere, returnTypeParameter.Location); 83diagnostics.Add(ErrorCode.ERR_MethodReturnCantBeRefAny, returnTypeParameter.Location, returnType); 119diagnostics.Add(ErrorCode.ERR_CannotSpecifyManagedWithUnmanagedSpecifiers, callingConventionSyntax.UnmanagedCallingConventionList.GetLocation()); 166diagnostics.Add(ErrorCode.ERR_InvalidFunctionPointerCallingConvention, unmanagedList.OpenBracketToken.GetLocation(), ""); 217specifierType = new MissingMetadataTypeSymbol.TopLevel(compilation.Assembly.CorLibrary.Modules[0], ref metadataName, new CSDiagnosticInfo(ErrorCode.ERR_TypeNotFound, typeName)); 221diagnostics.Add(ErrorCode.ERR_TypeMustBePublic, specifier.GetLocation(), specifierType); 233diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportUnmanagedDefaultCallConv, errorLocation); 781MergeUseSiteInfo(ref info, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_UnsupportedCallingConvention, this))); 792MergeUseSiteInfo(ref info, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, this)));
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (2)
148if (fromSignature.DiagnosticInfo?.Code == (int)ErrorCode.ERR_BindToBogus && fromSignature.DiagnosticInfo.Arguments.AsSingleton() == (object)Signature) 150return new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_BogusType, this));
Symbols\Metadata\PE\PEAssemblySymbol.cs (1)
334=> GetCompilerFeatureRequiredDiagnostic()?.Code == (int)ErrorCode.ERR_UnsupportedCompilerFeature || base.HasUnsupportedMetadata;
Symbols\Metadata\PE\PEEventSymbol.cs (1)
85_lazyCachedUseSiteInfo.Initialize(new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, this));
Symbols\Metadata\PE\PEFieldSymbol.cs (2)
180_lazyCachedUseSiteInfo.Initialize(new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, this)); 692MergeUseSiteInfo(ref result, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, this)));
Symbols\Metadata\PE\PEMethodSymbol.cs (7)
446InitializeUseSiteDiagnostic(new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, this))); 914InitializeUseSiteDiagnostic(new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, this))); 987diagnosticInfo = new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, this); 1535diagnosticInfo = new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, this); 1541diagnosticInfo = new CSDiagnosticInfo(ErrorCode.ERR_UnrecognizedAttributeVersion, 1555diagnosticInfo = new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, this); 1561diagnosticInfo = new CSDiagnosticInfo(ErrorCode.ERR_RequiredMembersInvalid, ContainingType);
Symbols\Metadata\PE\PEModuleSymbol.cs (1)
722=> GetCompilerFeatureRequiredDiagnostic()?.Code == (int)ErrorCode.ERR_UnsupportedCompilerFeature || base.HasUnsupportedMetadata;
Symbols\Metadata\PE\PENamedTypeSymbol.cs (8)
238result._lazyCachedUseSiteInfo.Initialize(result.DeriveCompilerFeatureRequiredDiagnostic() ?? new CSDiagnosticInfo(ErrorCode.ERR_BogusType, result)); 302result._lazyCachedUseSiteInfo.Initialize(result.DeriveCompilerFeatureRequiredDiagnostic() ?? new CSDiagnosticInfo(ErrorCode.ERR_BogusType, result)); 402_lazyCachedUseSiteInfo.Initialize(DeriveCompilerFeatureRequiredDiagnostic() ?? new CSDiagnosticInfo(ErrorCode.ERR_BogusType, this)); 2341var info = new CSDiagnosticInfo(ErrorCode.ERR_ImportedCircularBase, declaredBase); 2737diagnostic = new CSDiagnosticInfo(ErrorCode.ERR_BogusType, this); 2769if (useSiteInfo.DiagnosticInfo is { Code: (int)ErrorCode.ERR_UnsupportedCompilerFeature } diag) 3359diagnostic = new CSDiagnosticInfo(ErrorCode.ERR_BogusType, this); 3363diagnostic = new CSDiagnosticInfo(ErrorCode.ERR_BogusType, this);
Symbols\Metadata\PE\PEParameterSymbol.cs (1)
1271return DeriveCompilerFeatureRequiredDiagnostic(decoder) is { Code: (int)ErrorCode.ERR_UnsupportedCompilerFeature } || base.HasUnsupportedMetadata;
Symbols\Metadata\PE\PEPropertySymbol.cs (2)
237result.AccessUncommonFields()._lazyCachedUseSiteInfo.Initialize(new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, result)); 293AccessUncommonFields()._lazyCachedUseSiteInfo.Initialize(new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, this));
Symbols\Metadata\PE\PETypeParameterSymbol.cs (4)
91_lazyCachedConstraintsUseSiteInfo.Initialize(new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, this)); 240_lazyCachedConstraintsUseSiteInfo.InterlockedInitializeFromSentinel(primaryDependency: null, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, this))); 420_lazyCachedConstraintsUseSiteInfo.InterlockedInitializeFromSentinel(primaryDependency: null, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, this))); 740return DeriveCompilerFeatureRequiredDiagnostic(GetDecoder(containingModule)) is { Code: (int)ErrorCode.ERR_UnsupportedCompilerFeature } || base.HasUnsupportedMetadata;
Symbols\Metadata\PE\PEUtilities.cs (2)
17new CSDiagnosticInfo(ErrorCode.ERR_UnsupportedCompilerFeature, symbol, disallowedFeature) 26ErrorCode.ERR_UnrecognizedAttributeVersion,
Symbols\MethodSymbol.cs (7)
1057diagnostics?.Add(ErrorCode.ERR_InvalidUnmanagedCallersOnlyCallConv, location!, callConvTypedConstant.ValueInternal ?? "null"); 1083diagnostics?.Add(ErrorCode.ERR_UnmanagedCallersOnlyRequiresStatic, node!.Location); 1089diagnostics?.Add(ErrorCode.ERR_UnmanagedCallersOnlyMethodOrTypeCannotBeGeneric, node!.Location); 1115protected sealed override bool IsHighestPriorityUseSiteErrorCode(int code) => code is (int)ErrorCode.ERR_UnsupportedCompilerFeature or (int)ErrorCode.ERR_BindToBogus; 1122return (object)info != null && info.Code is (int)ErrorCode.ERR_BindToBogus or (int)ErrorCode.ERR_UnsupportedCompilerFeature;
Symbols\MissingMetadataTypeSymbol.cs (6)
80return new CSDiagnosticInfo(ErrorCode.ERR_NoTypeDef, this, containingAssembly.Identity); 89return new CSDiagnosticInfo(ErrorCode.ERR_NoTypeDefFromModule, this, containingModule.Name); 112return new CSDiagnosticInfo(ErrorCode.ERR_MissingTypeInSource, this); 121return new CSDiagnosticInfo(ErrorCode.ERR_MissingTypeInAssembly, this, containingAssembly.Name); 131return new CSDiagnosticInfo(ErrorCode.ERR_BogusType, string.Empty); 324new CSDiagnosticInfo(ErrorCode.ERR_PredefinedTypeNotFound, MetadataHelpers.BuildQualifiedName(_namespaceName, MetadataName)) :
Symbols\NamedTypeSymbol.cs (1)
2455new CSDiagnosticInfo(ErrorCode.ERR_MissingPredefinedMember,
Symbols\NonMissingModuleSymbol.cs (4)
106ErrorCode warning = (definitionId.Version.Major == referenceId.Version.Major && definitionId.Version.Minor == referenceId.Version.Minor) ? 107ErrorCode.WRN_UnifyReferenceBldRev : ErrorCode.WRN_UnifyReferenceMajMin; 128ErrorCode.ERR_AssemblyMatchBadVersion,
Symbols\NoPiaAmbiguousCanonicalTypeSymbol.cs (1)
83return new CSDiagnosticInfo(ErrorCode.ERR_NoCanonicalView, _firstCandidate);
Symbols\NoPiaIllegalGenericInstantiationSymbol.cs (1)
69return new CSDiagnosticInfo(ErrorCode.ERR_GenericsUsedAcrossAssemblies, _underlyingSymbol, _exposingModule.ContainingAssembly);
Symbols\NoPiaMissingCanonicalTypeSymbol.cs (1)
107return new CSDiagnosticInfo(ErrorCode.ERR_NoCanonicalView, _fullTypeName);
Symbols\ObsoleteAttributeHelpers.cs (20)
183return new CSDiagnosticInfo(ErrorCode.WRN_WindowsExperimental, 194return new CustomObsoleteDiagnosticInfo(MessageProvider.Instance, (int)ErrorCode.WRN_Experimental, data, 199return new CustomObsoleteDiagnosticInfo(MessageProvider.Instance, (int)ErrorCode.WRN_ExperimentalWithMessage, data, 207var errorCode = (message: data.Message, isError: data.IsError, isColInit) switch 210(message: null, isError: _, isColInit: true) => ErrorCode.WRN_DeprecatedCollectionInitAdd, 211(message: null, isError: _, isColInit: false) => ErrorCode.WRN_DeprecatedSymbol, 212(message: { }, isError: true, isColInit: true) => ErrorCode.ERR_DeprecatedCollectionInitAddStr, 213(message: { }, isError: true, isColInit: false) => ErrorCode.ERR_DeprecatedSymbolStr, 214(message: { }, isError: false, isColInit: true) => ErrorCode.WRN_DeprecatedCollectionInitAddStr, 215(message: { }, isError: false, isColInit: false) => ErrorCode.WRN_DeprecatedSymbolStr 228return (ErrorCode)diagnosticInfo.Code is 229(ErrorCode.WRN_Experimental or ErrorCode.WRN_ExperimentalWithMessage or ErrorCode.WRN_WindowsExperimental or ErrorCode.WRN_DeprecatedCollectionInitAdd or 230ErrorCode.WRN_DeprecatedSymbol or ErrorCode.ERR_DeprecatedCollectionInitAddStr or 231ErrorCode.ERR_DeprecatedSymbolStr or ErrorCode.WRN_DeprecatedCollectionInitAddStr or 232ErrorCode.WRN_DeprecatedSymbolStr);
Symbols\ParameterSymbol.cs (4)
456protected sealed override bool IsHighestPriorityUseSiteErrorCode(int code) => code is (int)ErrorCode.ERR_UnsupportedCompilerFeature or (int)ErrorCode.ERR_BogusType; 464return info.DiagnosticInfo?.Code is (int)ErrorCode.ERR_BogusType or (int)ErrorCode.ERR_UnsupportedCompilerFeature;
Symbols\PropertySymbol.cs (4)
432protected sealed override bool IsHighestPriorityUseSiteErrorCode(int code) => code is (int)ErrorCode.ERR_UnsupportedCompilerFeature or (int)ErrorCode.ERR_BindToBogus; 439return (object)info != null && info.Code is (int)ErrorCode.ERR_BindToBogus or (int)ErrorCode.ERR_UnsupportedCompilerFeature;
Symbols\ReferenceManager.cs (1)
106diagnostics.Add(ErrorCode.ERR_AssemblySpecifiedForLinkAndRef, NoLocation.Singleton, duplicateReference.Display, primaryReference.Display);
Symbols\Retargeting\RetargetingNamedTypeSymbol.cs (1)
312var info = new CSDiagnosticInfo(ErrorCode.ERR_ImportedCircularBase, declaredBase);
Symbols\Retargeting\RetargetingSymbolTranslator.cs (1)
824type.ErrorInfo ?? new CSDiagnosticInfo(ErrorCode.ERR_ErrorInReferencedAssembly, type.ContainingAssembly?.Identity.GetDisplayName() ?? string.Empty), true);
Symbols\Source\ExplicitInterfaceHelpers.cs (18)
203diagnostics.Add(ErrorCode.ERR_ExplicitInterfaceImplementationInNonClassOrStruct, memberLocation, implementingMember); 213diagnostics.Add(ErrorCode.ERR_ExplicitInterfaceImplementationNotInterface, location, explicitInterfaceType); 231diagnostics.Add(ErrorCode.WRN_NullabilityMismatchInExplicitlyImplementedInterface, location); 235diagnostics.Add(ErrorCode.ERR_ClassDoesntImplementInterface, location, implementingMember, explicitInterfaceNamedType); 294diagnostics.Add(ErrorCode.ERR_ExplicitMethodImplAccessor, memberLocation, implementingMember, interfaceMember); 300diagnostics.Add(ErrorCode.ERR_BogusExplicitImpl, memberLocation, implementingMember, interfaceMember); 306diagnostics.Add(ErrorCode.ERR_ExplicitImplParams, memberLocation, implementingMember, interfaceMember); 327var errorType = implementingMember.Kind is SymbolKind.Method 328? ErrorCode.ERR_ExplicitInterfaceMemberReturnTypeMismatch 329: ErrorCode.ERR_ExplicitInterfaceMemberTypeMismatch; 335diagnostics.Add(ErrorCode.ERR_InterfaceMemberNotFound, memberLocation, implementingMember); 346diagnostics.Add(ErrorCode.ERR_BadAccess, memberLocation, implementedMember); 370diagnostics.Add(ErrorCode.ERR_BadAccess, memberLocation, accessor); 395diagnostics.Add(ErrorCode.ERR_ImplBadTupleNames, memberLocation, implementingMember, implementedMember); 406diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportStaticAbstractMembersInInterfaces, implementingMember.GetFirstLocation()); 447diagnostics.Add(ErrorCode.ERR_ExplicitImplCollisionOnRefOut, explicitInterfaceType.GetFirstLocation(), explicitInterfaceType, implementedMember); 452diagnostics.Add(ErrorCode.WRN_ExplicitImplCollision, implementingMember.GetFirstLocation(), implementingMember); 464diagnostics.Add(ErrorCode.WRN_ExplicitImplCollision, implementingMember.GetFirstLocation(), implementingMember);
Symbols\Source\ExtensionGroupingInfo.cs (1)
477diagnostics.Add(ErrorCode.ERR_ExtensionBlockCollision, extension.GetFirstLocation());
Symbols\Source\FieldSymbolWithAttributesAndModifiers.cs (8)
191diagnostics.Add(ErrorCode.ERR_StructOffsetOnBadField, arguments.AttributeSyntaxOpt.Name.Location); 199diagnostics.Add(ErrorCode.ERR_InvalidAttributeArgument, attribute.GetAttributeArgumentLocation(0), arguments.AttributeSyntaxOpt.GetErrorDisplayName()); 214diagnostics.Add(ErrorCode.ERR_RequiresUnsafeAttributeInSource, arguments.AttributeSyntaxOpt.Location); 287diagnostics.Add(ErrorCode.ERR_FieldHasMultipleDistinctConstantValues, arguments.AttributeSyntaxOpt.Location); 292diagnostics.Add(ErrorCode.ERR_FieldHasMultipleDistinctConstantValues, arguments.AttributeSyntaxOpt.Location); 308diagnostics.Add(ErrorCode.ERR_FieldHasMultipleDistinctConstantValues, arguments.AttributeSyntaxOpt.Location); 339diagnostics.Add(ErrorCode.ERR_StructOffsetOnBadStruct, allAttributeSyntaxNodes[i].Name.Location); 347diagnostics.Add(ErrorCode.ERR_MissingStructOffset, this.ErrorLocation, this.AttributeOwner);
Symbols\Source\GlobalExpressionVariable.cs (1)
113diagnostics.Add(ErrorCode.ERR_RecursivelyTypedVariable, this.ErrorLocation, this);
Symbols\Source\LambdaSymbol.cs (1)
313addTo.Add(ErrorCode.ERR_BuilderAttributeDisallowed, DiagnosticLocation);
Symbols\Source\LocalFunctionSymbol.cs (11)
84_declarationDiagnostics.Add(ErrorCode.ERR_BadExtensionAgg, GetFirstLocation()); 138addTo.Add(ErrorCode.ERR_ExternMemberRequiresUnsafeOrSafe, 151addTo.Add(ErrorCode.ERR_SafeModifierCannotBeUsedWithUnsafe, 171addTo.Add(ErrorCode.WRN_MainIgnored, Syntax.Identifier.GetLocation(), this); 242diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, arglistToken.GetLocation()); 317diagnostics.Add(ErrorCode.ERR_MethodReturnCantBeRefAny, returnTypeSyntax.Location, returnType.Type); 469diagnostics.Add(ErrorCode.ERR_IllegalVarianceSyntax, parameter.VarianceKeyword.GetLocation()); 482diagnostics.Add(ErrorCode.ERR_DuplicateTypeParameter, location, name); 492ErrorCode typeError; 496typeError = ErrorCode.WRN_TypeParameterSameAsOuterMethodTypeParameter; 502typeError = ErrorCode.WRN_TypeParameterSameAsOuterTypeParameter;
Symbols\Source\ModifierUtils.cs (12)
100diagnostics.Add(ErrorCode.ERR_StaticNotVirtual, errorLocation, ModifierUtils.ConvertSingleModifierToSyntaxText(oneError)); 104diagnostics.Add(ErrorCode.ERR_BadMemberFlag, errorLocation, ConvertSingleModifierToSyntaxText(oneError)); 127diagnostics.Add(ErrorCode.ERR_SafeModifierCannotBeUsedWithUnsafe, safeToken == default ? errorLocation : safeToken.GetLocation()); 168diagnostics.Add(ErrorCode.ERR_BadMemberFlag, errorLocation, ConvertSingleModifierToSyntaxText(DeclarationModifiers.Sealed)); 209diagnostics.Add(ErrorCode.ERR_InvalidModifierForLanguageVersion, errorLocation, 497diagnostics.Add(ErrorCode.ERR_PartialMisplaced, partialToken.GetLocation()); 517diagnostics.Add(ErrorCode.ERR_BadModifierLocation, refToken.GetLocation(), refToken.Text); 538ErrorCode.ERR_DuplicateModifier, 551diagnostics.Add(ErrorCode.ERR_BadMemberProtection, errorLocation); 567diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportProtectedAccessForInterfaceMember, errorLocation); 584diagnostics.Add(ErrorCode.ERR_RequiredMemberCannotBeLessVisibleThanContainingType, errorLocation, symbol, symbol.ContainingType); 590diagnostics.Add(ErrorCode.ERR_RequiredMemberMustBeSettable, errorLocation, symbol);
Symbols\Source\ParameterHelpers.cs (33)
152diagnostics.Add(ErrorCode.ERR_NoVoidParameter, syntax.Type.Location); 273diagnostics.Add(ErrorCode.ERR_ThisInBadContext, thisKeyword.GetLocation()); 289diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, arglistToken.GetLocation()); 295diagnostics.Add(ErrorCode.ERR_VarargsLast, concreteParam.GetLocation()); 315diagnostics.Add(ErrorCode.ERR_IllegalRefParam, refnessKeyword.GetLocation()); 617diagnostics.Add(ErrorCode.ERR_UnderspecifiedExtension, extensionMember.GetFirstLocation(), typeParameter); 655diagnostics.Add(ErrorCode.ERR_ThisInBadContext, modifier.GetLocation()); 667diagnostics.Add(ErrorCode.ERR_BadParamModThis, modifier.GetLocation()); 737diagnostics.Add(ErrorCode.ERR_IllegalParams, modifier.GetLocation()); 745diagnostics.Add(ErrorCode.ERR_BadParamModThis, modifier.GetLocation()); 770diagnostics.Add(ErrorCode.ERR_ImplicitlyTypedParamsParameter, modifier, parameterIdentifier); 815diagnostics.Add(ErrorCode.ERR_ScopedAfterInOutRefReadonly, modifier.GetLocation()); 826diagnostics.Add(ErrorCode.ERR_InvalidModifierAfterScoped, nextModifier.GetLocation(), nextModifier.Text); 839diagnostics.Add(ErrorCode.ERR_RefReadOnlyWrongOrdering, modifier); 850diagnostics.Add(ErrorCode.ERR_BadFuncPointerParamModifier, modifier.GetLocation(), SyntaxFacts.GetText(modifier.Kind())); 862diagnostics.Add(ErrorCode.ERR_DupParamMod, modifier.GetLocation(), SyntaxFacts.GetText(modifier.Kind())); 867diagnostics.Add(ErrorCode.ERR_BadParameterModifiers, modifier.GetLocation(), SyntaxFacts.GetText(modifier.Kind()), SyntaxFacts.GetText(otherModifierKind)); 872diagnostics.Add(ErrorCode.ERR_ParamsCantBeWithModifier, modifier.GetLocation(), SyntaxFacts.GetText(otherModifierKind)); 901diagnostics.Add(ErrorCode.ERR_BadThisParam, thisKeyword.GetLocation(), owner?.Name ?? ""); 906diagnostics.Add(ErrorCode.ERR_IllegalParams, paramsKeyword.GetLocation()); 930diagnostics.Add(ErrorCode.ERR_DefaultValueBeforeRequiredValue, loc); 937diagnostics.Add(ErrorCode.ERR_MethodArgCantBeRefAny, syntax.Location, typeWithAnnotations.Type); 943diagnostics.Add(ErrorCode.ERR_ParamsLast, syntax.GetLocation()); 980diagnostics.Add(ErrorCode.ERR_ExtensionParameterDisallowsDefaultValue, parameterSyntax.GetLocation()); 998diagnostics.Add(ErrorCode.ERR_RefOutDefaultValue, refnessKeyword.GetLocation()); 1004diagnostics.Add(ErrorCode.ERR_DefaultValueForParamsParameter, paramsKeyword.GetLocation()); 1014diagnostics.Add(ErrorCode.ERR_DefaultValueForExtensionParameter, thisKeyword.GetLocation()); 1023diagnostics.Add(ErrorCode.ERR_DefaultValueMustBeConstant, parameterSyntax.Default.Value.Location, parameterSyntax.Identifier.ValueText); 1037diagnostics.Add(ErrorCode.ERR_NoConversionForDefaultParam, parameterSyntax.Identifier.GetLocation(), 1049diagnostics.Add(ErrorCode.ERR_NotNullRefDefaultParameter, parameterSyntax.Identifier.GetLocation(), 1071diagnostics.Add(ErrorCode.ERR_NoConversionForNubDefaultParam, parameterSyntax.Identifier.GetLocation(), 1100diagnostics.Add(ErrorCode.WRN_DefaultValueForUnconsumedLocation, 1108diagnostics.Add(ErrorCode.WRN_RefReadonlyParameterDefaultValue, parameterSyntax.Default.Value, parameterSyntax.Identifier.ValueText);
Symbols\Source\SourceAssemblySymbol.cs (47)
599diagnostics.Add(ErrorCode.WRN_DelaySignButNoKey, NoLocation.Singleton); 606diagnostics.Add(ErrorCode.ERR_PublicSignNetModule, NoLocation.Singleton); 610diagnostics.Add(ErrorCode.ERR_PublicSignButNoKey, NoLocation.Singleton); 628diagnostics.Add(ErrorCode.ERR_SignButNoPrivateKey, NoLocation.Singleton, StrongNameKeys.KeyFilePath); 744diagnostics.Add(ErrorCode.ERR_FriendAssemblySNReq, oneKey.Value.Item1, oneKey.Value.Item2); 775diagnostics.Add(ErrorCode.WRN_CmdOptionConflictsSource, NoLocation.Singleton, "DelaySign", AttributeDescription.AssemblyDelaySignAttribute.FullName); 780diagnostics.Add(ErrorCode.WRN_CmdOptionConflictsSource, NoLocation.Singleton, 816diagnostics.Add(ErrorCode.ERR_CmdOptionConflictsSource, NoLocation.Singleton, AttributeDescription.AssemblyKeyNameAttribute.FullName, "CryptoKeyContainer"); 820diagnostics.Add(ErrorCode.WRN_CmdOptionConflictsSource, NoLocation.Singleton, "CryptoKeyContainer", AttributeDescription.AssemblyKeyNameAttribute.FullName); 829diagnostics.Add(ErrorCode.WRN_AttributeIgnoredWhenPublicSigning, NoLocation.Singleton, AttributeDescription.AssemblyKeyNameAttribute.FullName); 853diagnostics.Add(ErrorCode.ERR_CmdOptionConflictsSource, NoLocation.Singleton, AttributeDescription.AssemblyKeyFileAttribute.FullName, "CryptoKeyFile"); 857diagnostics.Add(ErrorCode.WRN_CmdOptionConflictsSource, NoLocation.Singleton, "CryptoKeyFile", AttributeDescription.AssemblyKeyFileAttribute.FullName); 866diagnostics.Add(ErrorCode.WRN_AttributeIgnoredWhenPublicSigning, NoLocation.Singleton, AttributeDescription.AssemblyKeyFileAttribute.FullName); 983diagnostics.Add(ErrorCode.ERR_NetModuleNameMismatch, NoLocation.Singleton, moduleName, fileName); 1000diagnostics.Add(ErrorCode.ERR_NetModuleNameMustBeUnique, NoLocation.Singleton, m.Name); 1014diagnostics.Add(ErrorCode.ERR_AgnosticToMachineModule, NoLocation.Singleton, m); 1020diagnostics.Add(ErrorCode.ERR_ConflictingMachineModule, NoLocation.Singleton, m); 1038diagnostics.Add(ErrorCode.ERR_MissingNetModuleReference, NoLocation.Singleton, referencedModuleName); 1044diagnostics.Add(new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, m), NoLocation.Singleton); 1095diagnostics.Add(ErrorCode.ERR_DuplicateNameInNS, y.GetFirstLocationOrNone(), 1259diagnostics.Add(ErrorCode.WRN_AssemblyAttributeFromModuleIsOverridden, NoLocation.Singleton, attribute.AttributeClass, netModuleName); 1265diagnostics.Add(ErrorCode.ERR_DuplicateAttributeInNetModule, NoLocation.Singleton, attribute.AttributeClass.Name, netModuleName); 2113bag.Add(ErrorCode.ERR_FriendRefNotEqualToThis, NoLocation.Singleton, 2116bag.Add(ErrorCode.ERR_FriendRefSigningMismatch, NoLocation.Singleton, 2215diagnostics.Add(ErrorCode.ERR_InvalidFwdType, GetAssemblyAttributeLocationForDiagnostic(arguments.AttributeSyntaxOpt)); 2220if (useSiteInfo.DiagnosticInfo?.Code != (int)ErrorCode.ERR_UnexpectedUnboundGenericName && 2230diagnostics.Add(ErrorCode.ERR_ForwardedTypeInThisAssembly, GetAssemblyAttributeLocationForDiagnostic(arguments.AttributeSyntaxOpt), forwardedType); 2236diagnostics.Add(ErrorCode.ERR_ForwardedTypeIsNested, GetAssemblyAttributeLocationForDiagnostic(arguments.AttributeSyntaxOpt), forwardedType, forwardedType.ContainingType); 2246diagnostics.Add(ErrorCode.ERR_InvalidFwdType, GetAssemblyAttributeLocationForDiagnostic(arguments.AttributeSyntaxOpt)); 2266diagnostics.Add(ErrorCode.ERR_DuplicateTypeForwarder, GetAssemblyAttributeLocationForDiagnostic(arguments.AttributeSyntaxOpt), forwardedType); 2284diagnostics.Add(ErrorCode.ERR_CannotPassNullForFriendAssembly, GetAssemblyAttributeLocationForDiagnostic(nodeOpt)); 2292diagnostics.Add(ErrorCode.WRN_InvalidAssemblyName, GetAssemblyAttributeLocationForDiagnostic(nodeOpt), displayName); 2302diagnostics.Add(ErrorCode.ERR_FriendAssemblyBadArgs, GetAssemblyAttributeLocationForDiagnostic(nodeOpt), displayName); 2403diagnostics.Add(ErrorCode.ERR_InvalidSignaturePublicKey, attribute.GetAttributeArgumentLocation(0)); 2426diagnostics.Add(foundBadWildcard ? ErrorCode.ERR_InvalidVersionFormatDeterministic : ErrorCode.ERR_InvalidVersionFormat, attributeArgumentSyntaxLocation, verString ?? "<null>"); 2438diagnostics.Add(ErrorCode.WRN_InvalidVersionFormat, attributeArgumentSyntaxLocation, verString ?? "<null>"); 2458diagnostics.Add(ErrorCode.ERR_InvalidAssemblyCultureForExe, attribute.GetAttributeArgumentLocation(0)); 2462diagnostics.Add(ErrorCode.ERR_InvalidAssemblyCulture, attribute.GetAttributeArgumentLocation(0)); 2489diagnostics.Add(ErrorCode.ERR_InvalidVersionFormat2, attribute.GetAttributeArgumentLocation(0), verString ?? "<null>"); 2588diagnostics.Add(ErrorCode.ERR_ExplicitExtension, arguments.AttributeSyntaxOpt.Location); 2626diagnostics.Add(ErrorCode.ERR_InvalidAttributeArgument, attribute.GetAttributeArgumentLocation(i), (object)nodeOpt != null ? nodeOpt.GetErrorDisplayName() : ""); 2758diagnostics.Add(ErrorCode.WRN_UnreferencedEvent, associatedPropertyOrEvent.GetFirstLocationOrNone(), associatedPropertyOrEvent); 2763diagnostics.Add(ErrorCode.WRN_UnreferencedField, field.GetFirstLocationOrNone(), field); 2767diagnostics.Add(ErrorCode.WRN_UnassignedInternalRefField, field.GetFirstLocationOrNone(), field); 2771diagnostics.Add(ErrorCode.WRN_UnassignedInternalField, field.GetFirstLocationOrNone(), field, DefaultValue(field.Type)); 2791diagnostics.Add(ErrorCode.WRN_UnreferencedFieldAssg, field.GetFirstLocationOrNone(), field);
Symbols\Source\SourceComplexParameterSymbol.cs (51)
792diagnostics.Add(ErrorCode.ERR_DefaultValueUsedWithAttributes, arguments.AttributeSyntaxOpt.Name.Location); 798diagnostics.Add(ErrorCode.ERR_ExplicitParamArrayOrCollection, arguments.AttributeSyntaxOpt.Name.Location); 889diagnostics.Add(ErrorCode.WRN_UnscopedRefAttributeOldRules, arguments.AttributeSyntaxOpt.Location); 894diagnostics.Add(ErrorCode.ERR_UnscopedRefAttributeUnsupportedTarget, arguments.AttributeSyntaxOpt.Location); 898diagnostics.Add(ErrorCode.ERR_UnscopedScoped, arguments.AttributeSyntaxOpt.Location); 933diagnostics.Add(ErrorCode.WRN_RefReadonlyParameterDefaultValue, syntax, this.Name); 953diagnostics.Add(ErrorCode.ERR_ParamDefaultValueDiffersFromAttribute, syntax.Location); 986diagnosticsOpt.Add(ErrorCode.ERR_DefaultValueUsedWithAttributes, node.Name.Location); 1024diagnosticsOpt.Add(ErrorCode.ERR_DefaultValueTypeMustMatch, node.Name.Location); 1034diagnosticsOpt.Add(ErrorCode.ERR_DefaultValueBadValueType, node.Name.Location, arg.TypeInternal); 1044diagnosticsOpt.Add(ErrorCode.ERR_DefaultValueTypeMustMatch, node.Name.Location); 1092diagnostics.Add(ErrorCode.WRN_CallerLineNumberParamForUnconsumedLocation, node.Name.Location, ParameterSyntax.Identifier.ValueText); 1098diagnostics.Add(ErrorCode.ERR_NoConversionForCallerLineNumberParam, node.Name.Location, intType, TypeWithAnnotations.Type); 1105diagnostics.Add(ErrorCode.ERR_BadCallerLineNumberParamWithoutDefaultValue, node.Name.Location); 1120diagnostics.Add(ErrorCode.WRN_CallerFilePathParamForUnconsumedLocation, node.Name.Location, ParameterSyntax.Identifier.ValueText); 1126diagnostics.Add(ErrorCode.ERR_NoConversionForCallerFilePathParam, node.Name.Location, stringType, TypeWithAnnotations.Type); 1133diagnostics.Add(ErrorCode.ERR_BadCallerFilePathParamWithoutDefaultValue, node.Name.Location); 1138diagnostics.Add(ErrorCode.WRN_CallerLineNumberPreferredOverCallerFilePath, node.Name.Location, ParameterSyntax.Identifier.ValueText); 1153diagnostics.Add(ErrorCode.WRN_CallerMemberNameParamForUnconsumedLocation, node.Name.Location, ParameterSyntax.Identifier.ValueText); 1159diagnostics.Add(ErrorCode.ERR_NoConversionForCallerMemberNameParam, node.Name.Location, stringType, TypeWithAnnotations.Type); 1166diagnostics.Add(ErrorCode.ERR_BadCallerMemberNameParamWithoutDefaultValue, node.Name.Location); 1171diagnostics.Add(ErrorCode.WRN_CallerLineNumberPreferredOverCallerMemberName, node.Name.Location, ParameterSyntax.Identifier.ValueText); 1176diagnostics.Add(ErrorCode.WRN_CallerFilePathPreferredOverCallerMemberName, node.Name.Location, ParameterSyntax.Identifier.ValueText); 1194diagnostics.Add(ErrorCode.WRN_CallerArgumentExpressionParamForUnconsumedLocation, node.Name.Location, ParameterSyntax.Identifier.ValueText); 1200diagnostics.Add(ErrorCode.ERR_NoConversionForCallerArgumentExpressionParam, node.Name.Location, stringType, TypeWithAnnotations.Type); 1207diagnostics.Add(ErrorCode.ERR_BadCallerArgumentExpressionParamWithoutDefaultValue, node.Name.Location); 1212diagnostics.Add(ErrorCode.WRN_CallerLineNumberPreferredOverCallerArgumentExpression, node.Name.Location, ParameterSyntax.Identifier.ValueText); 1217diagnostics.Add(ErrorCode.WRN_CallerFilePathPreferredOverCallerArgumentExpression, node.Name.Location, ParameterSyntax.Identifier.ValueText); 1222diagnostics.Add(ErrorCode.WRN_CallerMemberNamePreferredOverCallerArgumentExpression, node.Name.Location, ParameterSyntax.Identifier.ValueText); 1228diagnostics.Add(ErrorCode.WRN_CallerArgumentExpressionAttributeHasInvalidParameterName, node.Name.Location, ParameterSyntax.Identifier.ValueText); 1233diagnostics.Add(ErrorCode.WRN_CallerArgumentExpressionAttributeSelfReferential, node.Name.Location, ParameterSyntax.Identifier.ValueText); 1259diagnostics.Add(ErrorCode.WRN_UnconsumedEnumeratorCancellationAttributeUsage, node.Name.Location, ParameterSyntax.Identifier.ValueText); 1290diagnostics.Add(ErrorCode.ERR_TypeIsNotAnInterpolatedStringHandlerType, arguments.AttributeSyntaxOpt.Location, Type); 1298diagnostics.Add(ErrorCode.WRN_InterpolatedStringHandlerArgumentAttributeIgnoredOnLambdaParameters, arguments.AttributeSyntaxOpt.Location); 1304diagnostics.Add(ErrorCode.ERR_InterpolatedStringHandlerArgumentDisallowed, arguments.AttributeSyntaxOpt.Location); 1332diagnostics.Add(ErrorCode.ERR_NullInvalidInterpolatedStringHandlerArgumentName, arguments.AttributeSyntaxOpt!.Location); 1373diagnostics.Add(ErrorCode.ERR_NullInvalidInterpolatedStringHandlerArgumentName, arguments.AttributeSyntaxOpt.Location); 1393diagnostics.Add(ErrorCode.ERR_NotInstanceInvalidInterpolatedStringHandlerArgumentName, arguments.AttributeSyntaxOpt.Location, ContainingSymbol); 1405diagnostics.Add(ErrorCode.ERR_NotInstanceInvalidInterpolatedStringHandlerArgumentName, arguments.AttributeSyntaxOpt.Location, ContainingSymbol); 1416diagnostics.Add(ErrorCode.ERR_InvalidInterpolatedStringHandlerArgumentName, arguments.AttributeSyntaxOpt.Location, name, ContainingSymbol); 1423diagnostics.Add(ErrorCode.ERR_CannotUseSelfAsInterpolatedStringHandlerArgument, arguments.AttributeSyntaxOpt.Location); 1432diagnostics.Add(ErrorCode.WRN_ParameterOccursAfterInterpolatedStringHandlerParameter, arguments.AttributeSyntaxOpt.Location, parameter.Name, this.Name); 1463diagnostics.Add(ErrorCode.ERR_OutAttrOnRefParam, this.GetFirstLocation()); 1470diagnostics.Add(ErrorCode.ERR_InAttrOnOutParam, this.GetFirstLocation()); 1477diagnostics.Add(ErrorCode.ERR_OutAttrOnInParam, this.GetFirstLocation()); 1484diagnostics.Add(ErrorCode.ERR_OutAttrOnRefReadonlyParam, this.GetFirstLocation()); 1599diagnostics.Add(ErrorCode.ERR_ScopedRefAndRefStructOnly, ParameterSyntax); 1657diagnostics.Add(ErrorCode.ERR_ParamsCollectionExtensionAddMethod, syntax, Type); 1678diagnostics.Add(ErrorCode.ERR_ParamsMemberCannotBeLessVisibleThanDeclaringMember, syntax, reportAsLessVisible, ContainingSymbol); 1741diagnostics.Add(ErrorCode.ERR_ParamsMemberCannotBeLessVisibleThanDeclaringMember, syntax, method, ContainingSymbol); 1747diagnostics.Add(ErrorCode.ERR_ParamsMustBeCollection, ParameterSyntax.Modifiers.First(static m => m.IsKind(SyntaxKind.ParamsKeyword)).GetLocation());
Symbols\Source\SourceConstructorSymbol.cs (16)
45diagnostics.Add(ErrorCode.ERR_StaticConstructorWithAccessModifiers, location, this); 58diagnostics.Add(ErrorCode.ERR_MemberNeedsType, location); 68diagnostics.Add(ErrorCode.ERR_ExternHasConstructorInitializer, location, this); 73diagnostics.Add(ErrorCode.ERR_ExternHasBody, location, this); 79diagnostics.Add(ErrorCode.ERR_PartialConstructorInitializer, initializer, this); 189diagnostics.Add(ErrorCode.ERR_UnsafeMeaningless, 201diagnostics.Add(ErrorCode.ERR_ConcreteMissingBody, location, this); 209diagnostics.Add(ErrorCode.ERR_ConstructorInStaticClass, location); 213diagnostics.Add(ErrorCode.ERR_PartialMemberOnlyInPartialClass, location); 319diagnostics.Add(ErrorCode.ERR_PartialMemberInconsistentTupleNames, implementation.GetFirstLocation(), this, implementation); 324diagnostics.Add(ErrorCode.WRN_PartialMemberSignatureDifference, implementation.GetFirstLocation(), 331diagnostics.Add(ErrorCode.ERR_PartialMemberUnsafeDifference, implementation.GetFirstLocation()); 336diagnostics.Add(ErrorCode.ERR_PartialMemberSafeDifference, implementation.GetFirstLocation()); 341diagnostics.Add(ErrorCode.ERR_PartialMemberParamsDifference, implementation.GetFirstLocation()); 347diagnostics.Add(ErrorCode.ERR_PartialMemberAccessibilityDifference, implementation.GetFirstLocation()); 359diagnostics.Add(ErrorCode.ERR_ScopedMismatchInParameterOfPartial, implementation.GetFirstLocation(), new FormattedSymbol(implementation.Parameters[i], SymbolDisplayFormat.ShortFormat));
Symbols\Source\SourceConstructorSymbolBase.cs (2)
68diagnostics.Add(ErrorCode.ERR_StaticConstParam, location, this); 76diagnostics.Add(ErrorCode.ERR_BadVarargs, location);
Symbols\Source\SourceCustomEventAccessorSymbol.cs (2)
47diagnostics.Add(ErrorCode.ERR_ExternHasBody, this.Location, this); 55diagnostics.Add(ErrorCode.ERR_NoModifiersOnAccessor, syntax.Modifiers[0].GetLocation());
Symbols\Source\SourceCustomEventSymbol.cs (8)
95diagnostics.Add(ErrorCode.ERR_DuplicateAccessor, accessor.Keyword.GetLocation()); 106diagnostics.Add(ErrorCode.ERR_DuplicateAccessor, accessor.Keyword.GetLocation()); 112diagnostics.Add(ErrorCode.ERR_AddOrRemoveExpected, accessor.Keyword.GetLocation()); 126diagnostics.Add(ErrorCode.ERR_AddRemoveMustHaveBody, accessor.SemicolonToken.GetLocation()); 134diagnostics.Add(ErrorCode.ERR_AbstractEventHasAccessors, syntax.AccessorList.OpenBraceToken.GetLocation(), this); 139diagnostics.Add(ErrorCode.ERR_EventNeedsBothAccessors, this.GetFirstLocation(), this); 144diagnostics.Add(ErrorCode.ERR_ExplicitEventFieldImpl, this.GetFirstLocation()); 155diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportDefaultInterfaceImplementation, this.GetFirstLocation());
Symbols\Source\SourceDelegateMethodSymbol.cs (6)
69diagnostics.Add(ErrorCode.ERR_MethodReturnCantBeRefAny, returnTypeSyntax.Location, returnType.Type); 106diagnostics.Add(ErrorCode.ERR_BadVisDelegateReturn, delegateType.GetFirstLocation(), delegateType, invoke.ReturnType); 112diagnostics.Add(ErrorCode.ERR_FileTypeDisallowedInSignature, delegateType.GetFirstLocation(), invoke.ReturnType, delegateType); 121diagnostics.Add(ErrorCode.ERR_BadVisDelegateParam, delegateType.GetFirstLocation(), delegateType, parameterSymbol.Type); 125diagnostics.Add(ErrorCode.ERR_FileTypeDisallowedInSignature, delegateType.GetFirstLocation(), parameterSymbol.Type, delegateType); 285diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, new SourceLocation(arglistToken));
Symbols\Source\SourceDestructorSymbol.cs (6)
34diagnostics.Add(ErrorCode.ERR_BadDestructorName, syntax.Identifier.GetLocation()); 41diagnostics.Add(ErrorCode.ERR_ExternHasBody, location, this); 47diagnostics.Add(ErrorCode.ERR_ConcreteMissingBody, location, this); 54diagnostics.Add(ErrorCode.ERR_DestructorInStaticClass, location); 58diagnostics.Add(ErrorCode.ERR_OnlyClassesCanContainDestructors, location); 147diagnostics.Add(ErrorCode.ERR_UnsafeMeaningless,
Symbols\Source\SourceEnumConstantSymbol.cs (2)
55diagnostics.Add(ErrorCode.ERR_ReservedEnumerator, this.ErrorLocation, WellKnownMemberNames.EnumBackingFieldName); 223diagnostics.Add(ErrorCode.ERR_EnumeratorOverflow, this.GetFirstLocation(), this);
Symbols\Source\SourceEventSymbol.cs (30)
386diagnostics.Add(ErrorCode.ERR_RequiresUnsafeAttributeInSource, arguments.AttributeSyntaxOpt!.Location); 413diagnostics.Add(ErrorCode.ERR_UnscopedRefAttributeUnsupportedMemberTarget, arguments.AttributeSyntaxOpt!.Location); 658diagnostics.Add(ErrorCode.ERR_VirtualPrivate, location, this); 663diagnostics.Add(ErrorCode.ERR_StaticMemberCantBeReadOnly, location, this); 668diagnostics.Add(ErrorCode.ERR_FieldLikeEventCantBeReadOnly, location, this); 673diagnostics.Add(ErrorCode.ERR_OverrideNotNew, location, this); 678diagnostics.Add(ErrorCode.ERR_SealedNonOverride, location, this); 682diagnostics.Add(ErrorCode.ERR_PartialMemberOnlyInPartialClass, location); 686diagnostics.Add(ErrorCode.ERR_PartialMemberNotExplicit, location); 690diagnostics.Add(ErrorCode.ERR_PartialMemberCannotBeAbstract, location); 695diagnostics.Add(ErrorCode.ERR_BadMemberFlag, location, SyntaxFacts.GetText(SyntaxKind.AbstractKeyword)); 700diagnostics.Add(ErrorCode.ERR_BadMemberFlag, location, SyntaxFacts.GetText(SyntaxKind.VirtualKeyword)); 704diagnostics.Add(ErrorCode.ERR_AbstractAndExtern, location, this); 708diagnostics.Add(ErrorCode.ERR_AbstractAndSealed, location, this); 712diagnostics.Add(ErrorCode.ERR_AbstractNotVirtual, location, this.Kind.Localize(), this); 720diagnostics.Add(ErrorCode.ERR_InstanceMemberInStaticClass, location, Name); 731diagnostics.Add(ErrorCode.ERR_BadVisEventType, location, this, this.Type); 736diagnostics.Add(ErrorCode.ERR_EventNotDelegate, location, this); 741diagnostics.Add(ErrorCode.ERR_AbstractInConcreteClass, location, this, ContainingType); 746diagnostics.Add(ErrorCode.ERR_NewVirtualInSealed, location, this, ContainingType); 915diagnostics.Add(ErrorCode.ERR_ExternMemberRequiresUnsafeOrSafe, 944diagnostics.Add(ErrorCode.ERR_ExplicitPropertyAddingAccessor, thisAccessor.GetFirstLocation(), thisAccessor, explicitlyImplementedEvent); 956diagnostics.Add(ErrorCode.ERR_PartialMemberTypeDifference, implementation.GetFirstLocation()); 960diagnostics.Add(ErrorCode.ERR_PartialMemberInconsistentTupleNames, implementation.GetFirstLocation(), this, implementation); 964diagnostics.Add(ErrorCode.WRN_PartialMemberSignatureDifference, implementation.GetFirstLocation(), 971diagnostics.Add(ErrorCode.ERR_PartialMemberStaticDifference, implementation.GetFirstLocation()); 976diagnostics.Add(ErrorCode.ERR_PartialMemberUnsafeDifference, implementation.GetFirstLocation()); 981diagnostics.Add(ErrorCode.ERR_PartialMemberSafeDifference, implementation.GetFirstLocation()); 987diagnostics.Add(ErrorCode.ERR_PartialMemberAccessibilityDifference, implementation.GetFirstLocation()); 995diagnostics.Add(ErrorCode.ERR_PartialMemberExtendedModDifference, implementation.GetFirstLocation());
Symbols\Source\SourceFieldLikeEventSymbol.cs (8)
74diagnostics.Add(ErrorCode.ERR_InterfaceEventInitializer, this.GetFirstLocation(), this); 78diagnostics.Add(ErrorCode.ERR_AbstractEventInitializer, this.GetFirstLocation(), this); 82diagnostics.Add(ErrorCode.ERR_ExternEventInitializer, this.GetFirstLocation(), this); 86diagnostics.Add(ErrorCode.ERR_PartialEventInitializer, this.GetFirstLocation(), this); 100diagnostics.Add(ErrorCode.ERR_FieldlikeEventsInRoStruct, this.GetFirstLocation()); 109diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportStaticAbstractMembersInInterfaces, this.GetFirstLocation()); 122diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportDefaultInterfaceImplementation, this.GetFirstLocation()); 128diagnostics.Add(ErrorCode.ERR_EventNeedsBothAccessors, this.GetFirstLocation(), this);
Symbols\Source\SourceFieldSymbol.cs (5)
62diagnostics.Add(ErrorCode.ERR_VolatileAndReadonly, ErrorLocation, this); 66diagnostics.Add(ErrorCode.ERR_InstanceMemberInStaticClass, ErrorLocation, this); 70diagnostics.Add(ErrorCode.ERR_FieldsInRoStruct, ErrorLocation); 126((BindingDiagnosticBag)arguments.Diagnostics).Add(ErrorCode.ERR_DoNotUseFixedBufferAttr, arguments.AttributeSyntaxOpt.Name.Location); 333diagnostics.Add(ErrorCode.ERR_CircConstValue, GetFirstLocation(), this);
Symbols\Source\SourceFixedFieldSymbol.cs (3)
81diagnostics.Add(ErrorCode.ERR_FixedBufferTooManyDimensions, declarator.ArgumentList.Location); 116diagnostics.Add(ErrorCode.ERR_FixedOverflow, sizeExpression.Location, int32Value, elementType); 121diagnostics.Add(ErrorCode.ERR_InvalidFixedArraySize, sizeExpression.Location);
Symbols\Source\SourceLocalSymbol.cs (5)
337protected virtual ErrorCode ForbiddenDiagnostic => ErrorCode.ERR_VariableUsedBeforeDeclaration; 695diagnostics.Add(ErrorCode.ERR_CircConstValue, node.GetLocation(), this); 831protected override ErrorCode ForbiddenDiagnostic => ErrorCode.ERR_ImplicitlyTypedVariableUsedInForbiddenZone;
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (63)
105diagnostics.Add(ErrorCode.ERR_UnimplementedAbstractMethod, this.GetFirstLocation(), this, abstractMember); 168Diagnostic diag = new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_DuplicateExplicitImpl, interfaceMember), this.GetFirstLocation()); 188ErrorCode.ERR_InterfaceImplementedImplicitlyByVariadic, 229var info = new CSDiagnosticInfo(ErrorCode.ERR_MixingWinRTEventWithRegular, args, ImmutableArray<Symbol>.Empty, ImmutableArray.Create<Location>(this.GetFirstLocation())); 294diagnostics.Add(ErrorCode.ERR_UnimplementedInterfaceMember, GetImplementsLocationOrFallback(@interface), this, interfaceMember); 304diagnostics.Add(ErrorCode.WRN_NullabilityMismatchInInterfaceImplementedByBase, GetImplementsLocationOrFallback(@interface), this, interfaceMember); 581diagnostics.Add(ErrorCode.ERR_CantOverrideSealed, method.GetFirstLocation(), method, overridden); 732diagnostics.Add(ErrorCode.WRN_NewRequired, symbolLocation, symbol, hiddenMember); 740diagnostics.Add(ErrorCode.ERR_RequiredMemberCannotBeHidden, symbolLocation, hiddenMember, symbol); 752diagnostics.Add(ErrorCode.WRN_NewNotRequired, symbolLocation, symbol); 785ErrorCode errorCode = 786overridingMemberIsMethod ? ErrorCode.ERR_CantOverrideNonFunction : 787overridingMemberIsProperty ? ErrorCode.ERR_CantOverrideNonProperty : 788ErrorCode.ERR_CantOverrideNonEvent; 821diagnostics.Add(ErrorCode.ERR_OverrideNotExpected, overridingMemberLocation, overridingMember); 835diagnostics.Add(ErrorCode.ERR_NoGetToOverride, overridingMemberLocation, overridingMember, overriddenProperty); 839diagnostics.Add(ErrorCode.ERR_NoSetToOverride, overridingMemberLocation, overridingMember, overriddenProperty); 843diagnostics.Add(ErrorCode.ERR_OverrideNotExpected, overridingMemberLocation, overridingMember); 853diagnostics.Add(ErrorCode.ERR_AmbigOverride, overridingMemberLocation, 876diagnostics.Add(ErrorCode.WRN_MultipleRuntimeOverrideMatches, ambiguousMethod.GetFirstLocation(), ambiguousMethod, overridingMember); 903diagnostics.Add(ErrorCode.ERR_CantOverrideBogusMethod, overridingMemberLocation, overridingMember, overriddenMember); 910diagnostics.Add(ErrorCode.ERR_CantOverrideNonVirtual, overridingMemberLocation, overridingMember, overriddenMember); 916diagnostics.Add(ErrorCode.ERR_CantOverrideSealed, overridingMemberLocation, overridingMember, overriddenMember); 922diagnostics.Add(ErrorCode.ERR_CantChangeAccessOnOverride, overridingMemberLocation, overridingMember, accessibility, overriddenMember); 929diagnostics.Add(ErrorCode.ERR_CantChangeTupleNamesOnOverride, overridingMemberLocation, overridingMember, overriddenMember); 934diagnostics.Add(ErrorCode.ERR_OverrideMustHaveRequired, overridingMemberLocation, overridingMember, overriddenMember); 938diagnostics.Add(ErrorCode.ERR_OperatorMismatchOnOverride, overridingMemberLocation, overridingMember, overriddenMember); 957ErrorCode code = overridingMemberIsObsolete 958? ErrorCode.WRN_ObsoleteOverridingNonObsolete 959: ErrorCode.WRN_NonObsoleteOverridingObsolete; 982diagnostics.Add(ErrorCode.ERR_CantChangeTypeOnOverride, overridingMemberLocation, overridingMember, overriddenMember, overriddenMemberType.Type); 990(diagnostics, overriddenEvent, overridingEvent, location) => diagnostics.Add(ErrorCode.WRN_NullabilityMismatchInTypeOnOverride, location), 996ErrorCode.ERR_RequiresUnsafeOverridingSafe, 1017diagnostics.Add(ErrorCode.ERR_CantChangeRefReturnOnOverride, overridingMemberLocation, overridingMember, overriddenMember); 1030diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportCovariantReturnsOfClasses, overridingMemberLocation, overridingMember, overriddenMember, overriddenMethod.ReturnType); 1044diagnostics.Add(ErrorCode.ERR_CantChangeReturnTypeOnOverride, overridingMemberLocation, overridingMember, overriddenMember, overriddenMethod.ReturnType); 1050diagnostics.Add(ErrorCode.ERR_OverrideFinalizeDeprecated, overridingMemberLocation); 1083diagnostics.Add(ErrorCode.ERR_CantChangeRefReturnOnOverride, overridingMemberLocation, overridingProperty, overriddenProperty); 1100diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportCovariantPropertiesOfClasses, overridingMemberLocation, overridingMember, overriddenMember, overriddenMemberType.Type); 1112diagnostics.Add(ErrorCode.ERR_CantChangeTypeOnOverride, overridingMemberLocation, overridingMember, overriddenMember, overriddenMemberType.Type); 1145diagnostics.Add(ErrorCode.ERR_CantChangeInitOnlyOnOverride, overridingMemberLocation, overridingProperty, overriddenProperty); 1160diagnostics.Add(ErrorCode.ERR_NoGetToOverride, overridingMemberLocation, overridingProperty, overriddenProperty); 1166diagnostics.Add(ErrorCode.ERR_NoSetToOverride, overridingMemberLocation, overridingProperty, overriddenProperty); 1190ErrorCode.ERR_ScopedMismatchInParameterOfOverrideOrImplementation : 1191ErrorCode.WRN_ScopedMismatchInParameterOfOverrideOrImplementation, 1211diagnostics.Add(ErrorCode.WRN_OverridingDifferentRefness, location, overridingParameter, overriddenParameter); 1219ErrorCode.ERR_RequiresUnsafeOverridingSafe, 1255ErrorCode.WRN_TopLevelNullabilityMismatchInReturnTypeOnOverride : 1256ErrorCode.WRN_NullabilityMismatchInReturnTypeOnOverride, 1262topLevel ? ErrorCode.WRN_TopLevelNullabilityMismatchInParameterTypeOnOverride : ErrorCode.WRN_NullabilityMismatchInParameterTypeOnOverride, 1289diagnostics.Add(ErrorCode.WRN_DoesNotReturnMismatch, overrideMethod.GetFirstLocation(), new FormattedSymbol(overrideMethod, SymbolDisplayFormat.MinimallyQualifiedFormat)); 1568ErrorCode errorCode, 1641diagnostics.Add(ErrorCode.WRN_NewNotRequired, hidingMemberLocation, hidingMember); 1662diagnostics.Add(ErrorCode.WRN_NewOrOverrideExpected, hidingMemberLocation, hidingMember, hiddenMember); 1669diagnostics.Add(ErrorCode.ERR_RequiredMemberCannotBeHidden, hidingMemberLocation, hiddenMember, hidingMember); 1683diagnostics.Add(ErrorCode.WRN_NewRequired, hidingMemberLocation, hidingMember, hiddenMembers[0]); 1694diagnostics.Add(ErrorCode.WRN_HidingDifferentRefness, location, hidingParameter, hiddenParameter); 1750diagnostics.Add(ErrorCode.ERR_HidingAbstractMethod, associatedPropertyOrEvent.GetFirstLocation(), associatedPropertyOrEvent, hiddenMember); 1765diagnostics.Add(ErrorCode.ERR_HidingAbstractMethod, hidingMemberLocation, hidingMember, hiddenMember); 1844diagnostics.Add(ErrorCode.ERR_UnifyingInterfaceInstantiations, this.GetFirstLocation(), this, interface1, interface2); 1869if (diagnostic.Severity == DiagnosticSeverity.Error && diagnostic.Code is not ((int)ErrorCode.ERR_ImplicitImplementationOfNonPublicInterfaceMember or (int)ErrorCode.ERR_ImplicitImplementationOfInaccessibleInterfaceMember))
Symbols\Source\SourceMemberContainerSymbol.cs (121)
262diagnostics.Add(ErrorCode.ERR_PartialModifierConflict, GetFirstLocation(), this); 381diagnostics.Add(ErrorCode.ERR_AbstractSealedStatic, GetFirstLocation(), this); 388diagnostics.Add(ErrorCode.ERR_ClosedSealedStatic, GetFirstLocation(), this); 391diagnostics.Add(ErrorCode.ERR_ClosedExplicitlyAbstract, GetFirstLocation(), this); 397diagnostics.Add(ErrorCode.ERR_SealedStaticClass, GetFirstLocation(), this); 403diagnostics.Add(ErrorCode.ERR_UnsafeMeaningless, GetFirstLocation()); 480diagnostics.Add(ErrorCode.ERR_FileTypeNoExplicitAccessibility, GetFirstLocation(), this); 495? ErrorCode.ERR_FileLocalDuplicateNameInNS 496: ErrorCode.ERR_DuplicateNameInNS, declaration.Declarations[i].NameLocation, this.Name, this.ContainingSymbol); 505diagnostics.Add(ErrorCode.ERR_DuplicateNameInClass, declaration.Declarations[i].NameLocation, this.ContainingSymbol, this.Name); 519diagnostics.Add(ErrorCode.ERR_MissingPartial, singleDeclaration.NameLocation, this.Name); 541if (reportIfContextual(SyntaxKind.RecordKeyword, MessageID.IDS_FeatureRecords, ErrorCode.WRN_RecordNamedDisallowed) 542|| reportIfContextual(SyntaxKind.RequiredKeyword, MessageID.IDS_FeatureRequiredMembers, ErrorCode.ERR_RequiredNameDisallowed) 543|| reportIfContextual(SyntaxKind.FileKeyword, MessageID.IDS_FeatureFileTypes, ErrorCode.ERR_FileTypeNameDisallowed) 544|| reportIfContextual(SyntaxKind.ClosedKeyword, MessageID.IDS_FeatureClosedClasses, ErrorCode.ERR_ClosedTypeNameDisallowed) 545|| reportIfContextual(SyntaxKind.ScopedKeyword, MessageID.IDS_FeatureRefFields, ErrorCode.ERR_ScopedTypeNameDisallowed) 546|| reportIfContextual(SyntaxKind.ExtensionKeyword, MessageID.IDS_FeatureExtensions, ErrorCode.ERR_ExtensionTypeNameDisallowed)) 552diagnostics.Add(ErrorCode.WRN_LowerCaseTypeName, location, name); 555bool reportIfContextual(SyntaxKind contextualKind, MessageID featureId, ErrorCode error) 1469diagnostics.Add(ErrorCode.ERR_PartialTypeKindConflict, t.GetFirstLocation(), t); 1473diagnostics.Add(ErrorCode.ERR_DuplicateNameInClass, t.GetFirstLocation(), this, t.Name); 1539diagnostics.Add(ErrorCode.ERR_MemberNameSameAsType, member.GetFirstLocation(), typeName); 1547diagnostics.Add(ErrorCode.ERR_MemberNameSameAsExtendedType, member.GetFirstLocation(), typeName); 2006diagnostics.Add(ErrorCode.ERR_ClosedBadDerivedTypesProperty, location); 2015diagnostics.Add(ErrorCode.ERR_ClosedBadDerivedTypesProperty, location); 2079diagnostics.Add(ErrorCode.ERR_FilePathCannotBeConvertedToUtf8, location, this, errorMessage); 2084diagnostics.Add(ErrorCode.ERR_FileTypeNested, location, this); 2101diagnostics.Add(ErrorCode.ERR_InstanceFieldInUnion, field.GetFirstLocation()); 2109diagnostics.Add(ErrorCode.ERR_InstanceCtorWithOneParameterInUnion, ctor.GetFirstLocation()); 2115diagnostics.Add(ErrorCode.ERR_MemberProviderInUnionDeclaration, location); 2123diagnostics.Add(ErrorCode.ERR_MissingUnionCaseTypes, location); 2128diagnostics.Add(ErrorCode.ERR_MissingUnionValueProperty, location); 2176diagnostics.Add(ErrorCode.ERR_CloneDisallowedInRecord, member.GetFirstLocation()); 2289diagnostics.Add(ErrorCode.ERR_DuplicateNameInClass, symbol.GetFirstLocation(), containerForDiagnostics, symbol.Name); 2316diagnostics.Add(ErrorCode.ERR_DuplicateConversionInClass, conversion.GetFirstLocation(), containerForDiagnostics); 2398(d.Code is (int)ErrorCode.ERR_OverloadRefKind or (int)ErrorCode.ERR_MemberAlreadyExists or 2399(int)ErrorCode.ERR_DuplicateNameInClass or (int)ErrorCode.ERR_MemberReserved) && 2418diagnostics.Add(ErrorCode.ERR_OverloadRefKind, method1.GetFirstLocation(), containerForDiagnostics, methodKind.Localize(), refKind1.ToParameterDisplayString(), refKind2.ToParameterDisplayString()); 2435diagnostics.Add(ErrorCode.ERR_MemberAlreadyExists, method1.GetFirstLocation(), methodName, containerForDiagnostics); 2494diagnostics.Add(ErrorCode.ERR_DuplicateNameInClass, indexer.GetFirstLocation(), containerForDiagnostics, indexerName); 2527diagnostics.Add(ErrorCode.ERR_InconsistentIndexerNames, indexer.GetFirstLocation()); 2540diagnostics.Add(ErrorCode.ERR_DuplicateNameInClass, indexer.GetFirstLocation(), containerForDiagnostics, indexerName); 2549diagnostics.Add(ErrorCode.ERR_MemberAlreadyExists, indexer.GetFirstLocation(), SyntaxFacts.GetText(SyntaxKind.ThisKeyword), containerForDiagnostics); 2729diagnostics.Add(ErrorCode.ERR_DuplicateNameInClass, dup.GetFirstLocation(), this, tp.Name); 2843diagnostics.Add(ErrorCode.ERR_StructLayoutCyclePrimaryConstructorParameter, parameterSymbol.GetFirstLocation(), parameterSymbol, type); 2851diagnostics.Add(ErrorCode.ERR_StructLayoutCycle, symbol.GetFirstLocation(), symbol, type); 2882diagnostics.Add(ErrorCode.ERR_ProtectedInStatic, member.GetFirstLocation(), member); 2961diagnostics.Add(ErrorCode.ERR_OperatorNeedsMatch, op1.GetFirstLocation(), op1, 2967diagnostics.Add(ErrorCode.ERR_CheckedOperatorNeedsMatch, op1.GetFirstLocation(), op1); 3065diagnostics.Add(ErrorCode.WRN_EqualsWithoutGetHashCode, this.GetFirstLocation(), this); 3071diagnostics.Add(ErrorCode.WRN_EqualityOpWithoutEquals, this.GetFirstLocation(), this); 3077diagnostics.Add(ErrorCode.WRN_EqualityOpWithoutGetHashCode, this.GetFirstLocation(), this); 3113diagnostics.Add(ErrorCode.ERR_RequiredMembersBaseTypeInvalid, method.GetFirstLocation(), BaseTypeNoUseSiteDiagnostics); 3127diagnostics.Add(ErrorCode.ERR_ScriptsAndSubmissionsCannotHaveRequiredMembers, member.GetFirstLocation()); 3173diagnostics.Add(ErrorCode.ERR_StructLayoutCycle, f.GetFirstLocation(), f, type); 3237diagnostics.Add(ErrorCode.WRN_SequentialOnPartialClass, GetFirstLocation(), this); 3250diagnostics.Add(ErrorCode.WRN_SequentialOnPartialClass, GetFirstLocation(), this); 3847Binder.Error(diagnostics, ErrorCode.ERR_SimpleProgramMultipleUnitsWithTopLevelStatements, singleDecl.NameLocation); 4143diagnostics.Add(ErrorCode.ERR_ConstructorInStaticClass, syntax.Identifier.GetLocation()); 4158diagnostics.Add(ErrorCode.ERR_MultipleRecordParameterLists, parameterList.Location); 4250diagnostics.Add(ErrorCode.ERR_PartialMethodMustHaveLatent, method.GetFirstLocation(), method); 4254diagnostics.Add(ErrorCode.ERR_PartialMethodWithAccessibilityModsMustHaveImplementation, method.GetFirstLocation(), method); 4262property.IsPartialDefinition ? ErrorCode.ERR_PartialPropertyMissingImplementation : ErrorCode.ERR_PartialPropertyMissingDefinition, 4272constructor.IsPartialDefinition ? ErrorCode.ERR_PartialMemberMissingImplementation : ErrorCode.ERR_PartialMemberMissingDefinition, 4282ev.IsPartialDefinition ? ErrorCode.ERR_PartialMemberMissingImplementation : ErrorCode.ERR_PartialMemberMissingDefinition, 4324diagnostics.Add(ErrorCode.ERR_PartialMethodOnlyOneActual, currentMethod.GetFirstLocation()); 4330diagnostics.Add(ErrorCode.ERR_PartialMethodOnlyOneLatent, currentMethod.GetFirstLocation()); 4343diagnostics.Add(ErrorCode.ERR_PartialPropertyDuplicateImplementation, currentProperty.GetFirstLocation()); 4348diagnostics.Add(ErrorCode.ERR_PartialPropertyDuplicateDefinition, currentProperty.GetFirstLocation()); 4354diagnostics.Add(ErrorCode.ERR_PartialPropertyDuplicateInitializer, currentProperty.GetFirstLocation()); 4375? (ErrorCode.ERR_PartialPropertyMissingAccessor, otherProperty) 4376: (ErrorCode.ERR_PartialPropertyUnexpectedAccessor, containingProperty); 4393diagnostics.Add(ErrorCode.ERR_PartialMemberDuplicateImplementation, currentConstructor.GetFirstLocation(), currentConstructor); 4399diagnostics.Add(ErrorCode.ERR_PartialMemberDuplicateDefinition, currentConstructor.GetFirstLocation(), currentConstructor); 4413diagnostics.Add(ErrorCode.ERR_PartialMemberDuplicateImplementation, currentEvent.GetFirstLocation(), currentEvent); 4419diagnostics.Add(ErrorCode.ERR_PartialMemberDuplicateDefinition, currentEvent.GetFirstLocation(), currentEvent); 4585diagnostics.Add(ErrorCode.ERR_DuplicateNameInClass, GetAccessorOrPropertyLocation(propertySymbol, getNotSet), containerForDiagnostics, accessorName); 4595diagnostics.Add(ErrorCode.ERR_MemberReserved, GetAccessorOrPropertyLocation(propertySymbol, getNotSet), accessorName, containerForDiagnostics); 4624diagnostics.Add(ErrorCode.ERR_DuplicateNameInClass, GetAccessorOrEventLocation(eventSymbol, isAdder), containerForDiagnostics, accessorName); 4634diagnostics.Add(ErrorCode.ERR_MemberReserved, GetAccessorOrEventLocation(eventSymbol, isAdder), accessorName, containerForDiagnostics); 4786diagnostics.Add(ErrorCode.ERR_InterfacesCantContainConstructors, member.GetFirstLocation()); 4793diagnostics.Add(ErrorCode.ERR_OnlyClassesCanContainDestructors, member.GetFirstLocation()); 4841diagnostics.Add(ErrorCode.ERR_ExtensionDisallowsMember, member.GetFirstLocation()); 4908diagnostics.Add(ErrorCode.ERR_EnumsCantContainDefaultConstructor, location); 4915diagnostics.Add(ErrorCode.ERR_NonPublicParameterlessStructConstructor, location); 4947diagnostics.Add(ErrorCode.ERR_StructHasInitializersAndNoDeclaredConstructor, GetFirstLocation()); 5021diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, parameterSyntax.Identifier.GetLocation()); 5032diagnostics.Add(ErrorCode.ERR_UnexpectedToken, syntaxToken.GetLocation(), syntaxToken.Text); 5039diagnostics.Add(ErrorCode.ERR_UnexpectedToken, nextToken.GetLocation(), nextToken.Text); 5058diagnostics.Add(ErrorCode.ERR_UnionDeclarationNeedsCaseTypes, valuePropertySyntax.Identifier.GetLocation()); 5146diagnostics.Add(ErrorCode.WRN_RecordEqualsWithoutGetHashCode, thisEquals.GetFirstLocation(), declaration.Name); 5199diagnostics.Add(ErrorCode.ERR_NonPublicAPIInRecord, deconstruct.GetFirstLocation(), deconstruct); 5204diagnostics.Add(ErrorCode.ERR_SignatureMismatchInRecord, deconstruct.GetFirstLocation(), deconstruct, targetMethod.ReturnType); 5209diagnostics.Add(ErrorCode.ERR_StaticAPIInRecord, deconstruct.GetFirstLocation(), deconstruct); 5244diagnostics.Add(ErrorCode.ERR_RecordAmbigCtor, copyCtor.GetFirstLocation()); 5253diagnostics.Add(ErrorCode.ERR_RecordAmbigCtor, this.GetFirstLocation()); 5257diagnostics.Add(ErrorCode.ERR_CopyConstructorWrongAccessibility, constructor.GetFirstLocation(), constructor); 5302diagnostics.Add(ErrorCode.ERR_NonPrivateAPIInRecord, printMembersMethod.GetFirstLocation(), printMembersMethod); 5307diagnostics.Add(ErrorCode.ERR_NonProtectedAPIInRecord, printMembersMethod.GetFirstLocation(), printMembersMethod); 5314diagnostics.Add(ErrorCode.ERR_SignatureMismatchInRecord, printMembersMethod.GetFirstLocation(), printMembersMethod, targetMethod.ReturnType); 5353ErrorCode.ERR_InheritingFromRecordWithSealedToString, 5460diagnostics.Add(ErrorCode.ERR_BadRecordMemberForPositionalParameter, 5490diagnostics.Add(ErrorCode.ERR_HiddenPositionalMember, param.GetFirstLocation(), symbol); 5530diagnostics.Add(ErrorCode.ERR_SealedAPIInRecord, getHashCode.GetFirstLocation(), getHashCode); 5564diagnostics.Add(ErrorCode.ERR_NonPrivateAPIInRecord, equalityContract.GetFirstLocation(), equalityContract); 5569diagnostics.Add(ErrorCode.ERR_NonProtectedAPIInRecord, equalityContract.GetFirstLocation(), equalityContract); 5576diagnostics.Add(ErrorCode.ERR_SignatureMismatchInRecord, equalityContract.GetFirstLocation(), equalityContract, targetProperty.Type); 5586diagnostics.Add(ErrorCode.ERR_EqualityContractRequiresGetter, equalityContract.GetFirstLocation(), equalityContract); 5630diagnostics.Add(ErrorCode.ERR_NonPublicAPIInRecord, thisEquals.GetFirstLocation(), thisEquals); 5635diagnostics.Add(ErrorCode.ERR_SignatureMismatchInRecord, thisEquals.GetFirstLocation(), thisEquals, targetMethod.ReturnType); 5650diagnostics.Add(ErrorCode.ERR_NotOverridableAPIInRecord, symbol.GetFirstLocation(), symbol); 5654diagnostics.Add(ErrorCode.ERR_StaticAPIInRecord, symbol.GetFirstLocation(), symbol); 6116diagnostics.Add(ErrorCode.ERR_GlobalStatement, new SourceLocation(globalStatement)); 6139var errorCode = parentSyntax.IsKind(SyntaxKind.CompilationUnit) 6140? ErrorCode.ERR_CompilationUnitUnexpected 6141: ErrorCode.ERR_NamespaceUnexpected;
Symbols\Source\SourceMemberFieldSymbol.cs (24)
52diagnostics.Add(ErrorCode.ERR_FileTypeDisallowedInSignature, this.ErrorLocation, type, ContainingType); 57diagnostics.Add(ErrorCode.ERR_VarDeclIsStaticClass, this.ErrorLocation, type); 61diagnostics.Add(ErrorCode.ERR_FieldCantHaveVoidType, getTypeErrorLocation()); 65diagnostics.Add(ErrorCode.ERR_FieldCantBeRefAny, getTypeErrorLocation(), type); 69diagnostics.Add(ErrorCode.ERR_FieldAutoPropCantBeByRefLike, getTypeErrorLocation(), type); 74diagnostics.Add(ErrorCode.ERR_BadFieldTypeInRecord, getTypeErrorLocation(), type); 89diagnostics.Add(ErrorCode.ERR_BadConstType, constToken.GetLocation(), type); 94diagnostics.Add(ErrorCode.ERR_VolatileStruct, this.ErrorLocation, this, type); 101diagnostics.Add(ErrorCode.ERR_BadVisFieldType, this.ErrorLocation, this, type); 234diagnostics.Add(ErrorCode.ERR_AbstractField, errorLocation); 261diagnostics.Add(ErrorCode.ERR_StaticConstant, errorLocation, firstIdentifier.ValueText); 281diagnostics.Add(ErrorCode.ERR_BadMemberFlag, errorLocation, SyntaxFacts.GetText(SyntaxKind.RequiredKeyword)); 307diagnostics.Add(ErrorCode.ERR_BadMemberFlag, errorLocation, ModifierUtils.ConvertSingleModifierToSyntaxText(modifier)); 417diagnostics.Add(ErrorCode.ERR_InterfacesCantContainFields, ErrorLocation); 501diagnostics.Add(ErrorCode.ERR_BadMemberFlag, ErrorLocation, SyntaxFacts.GetText(SyntaxKind.ScopedKeyword)); 540diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportRefFields, ErrorLocation); 543diagnostics.Add(ErrorCode.ERR_RefFieldInNonRefStruct, ErrorLocation); 546diagnostics.Add(ErrorCode.ERR_RefFieldCannotReferToRefStruct, typeSyntax.SkipScoped(out _).Location); 560diagnosticsForFirstDeclarator.Add(ErrorCode.ERR_ImplicitlyTypedVariableCannotBeConst, typeSyntax.Location); 565diagnostics.Add(ErrorCode.ERR_RecursivelyTypedVariable, this.ErrorLocation, this); 570diagnosticsForFirstDeclarator.Add(ErrorCode.ERR_ImplicitlyTypedVariableMultipleDeclarator, typeSyntax.Location); 610diagnostics.Add(ErrorCode.ERR_FixedNotInStruct, ErrorLocation); 615diagnostics.Add(ErrorCode.ERR_FixedFieldMustNotBeRef, ErrorLocation); 623diagnostics.Add(ErrorCode.ERR_IllegalFixedType, loc);
Symbols\Source\SourceMemberMethodSymbol.cs (13)
358ErrorCode code = (this.MethodKind == MethodKind.Conversion || this.MethodKind == MethodKind.UserDefinedOperator) ? 359ErrorCode.ERR_BadVisOpReturn : 360ErrorCode.ERR_BadVisReturnType; 370ErrorCode.ERR_BadVisOpParam : 371ErrorCode.ERR_BadVisParamType; 410diagnostics.Add(ErrorCode.ERR_FileTypeDisallowedInSignature, GetFirstLocation(), returnType.Type, containingType); 417diagnostics.Add(ErrorCode.ERR_FileTypeDisallowedInSignature, GetFirstLocation(), param.Type, containingType); 1017diagnostics.Add(ErrorCode.ERR_ExternMemberRequiresUnsafeOrSafe, 1083diagnostics.Add(ErrorCode.ERR_ExternHasBody, location, this); 1087diagnostics.Add(ErrorCode.ERR_AbstractHasBody, location, this); 1111diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportDefaultInterfaceImplementation, location); 1117diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportStaticAbstractMembersInInterfaces, location); 1130diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportProtectedAccessForInterfaceMember, location);
Symbols\Source\SourceMethodSymbol.cs (4)
38diagnostics.Add(ErrorCode.ERR_UnexpectedToken, refKeyword.GetLocation(), refKeyword.ToString()); 72diagnostics.Add(ErrorCode.ERR_BadAsyncArgType, getLocation(parameter, location, isExtensionParameter)); 77diagnostics.Add(ErrorCode.ERR_UnsafeAsyncArgType, getLocation(parameter, location, isExtensionParameter)); 81diagnostics.Add(ErrorCode.ERR_BadSpecialByRefParameter, getLocation(parameter, location, isExtensionParameter), parameter.Type);
Symbols\Source\SourceMethodSymbolWithAttributes.cs (63)
572diagnostics.Add(ErrorCode.ERR_RequiresUnsafeAttributeInSource, arguments.AttributeSyntaxOpt.Location); 591diagnostics.Add(ErrorCode.ERR_SecurityCriticalOrSecuritySafeCriticalOnAsync, arguments.AttributeSyntaxOpt.Location, arguments.AttributeSyntaxOpt.GetErrorDisplayName()); 625diagnostics.Add(ErrorCode.WRN_UnscopedRefAttributeOldRules, arguments.AttributeSyntaxOpt.Location); 639diagnostics.Add(ErrorCode.ERR_UnscopedRefAttributeUnsupportedMemberTarget, arguments.AttributeSyntaxOpt.Location); 654? ErrorCode.ERR_CannotApplyOverloadResolutionPriorityToOverride 656: ErrorCode.ERR_CannotApplyOverloadResolutionPriorityToMember, 716diagnostics.Add(ErrorCode.ERR_AttributeNotOnEventAccessor, arguments.AttributeSyntaxOpt.Name.Location, description.FullName, attributeUsage.GetValidTargetsErrorArgument()); 738diagnostics.Add(ErrorCode.ERR_AttributeNotOnAccessor, node.Name.Location, node.GetErrorDisplayName(), attributeUsage.GetValidTargetsErrorArgument()); 743diagnostics.Add(ErrorCode.ERR_ConditionalOnInterfaceMethod, node.Location); 748diagnostics.Add(ErrorCode.ERR_ConditionalOnOverride, node.Location, this); 753diagnostics.Add(ErrorCode.ERR_ConditionalOnSpecialMethod, node.Location, this); 758diagnostics.Add(ErrorCode.ERR_ConditionalMustReturnVoid, node.Location, this); 763diagnostics.Add(ErrorCode.ERR_ConditionalWithOutParam, node.Location, this); 767diagnostics.Add(ErrorCode.ERR_ConditionalOnLocalFunction, node.Location, this); 776diagnostics.Add(ErrorCode.ERR_BadArgumentToAttribute, attribute.GetAttributeArgumentLocation(0), node.GetErrorDisplayName()); 844diagnostics.Add(ErrorCode.ERR_DllImportOnInvalidMethod, arguments.AttributeSyntaxOpt.Name.Location); 860diagnostics.Add(ErrorCode.ERR_DllImportOnGenericMethod, arguments.AttributeSyntaxOpt.Name.Location); 868diagnostics.Add(ErrorCode.ERR_InvalidAttributeArgument, attribute.GetAttributeArgumentLocation(0), arguments.AttributeSyntaxOpt.GetErrorDisplayName()); 897diagnostics.Add(ErrorCode.ERR_InvalidNamedArgument, arguments.AttributeSyntaxOpt.ArgumentList.Arguments[position].Location, namedArg.Key); 964diagnostics.Add(ErrorCode.ERR_ModuleInitializerMethodMustBeOrdinary, arguments.AttributeSyntaxOpt.Location); 974diagnostics.Add(ErrorCode.ERR_ModuleInitializerMethodMustBeAccessibleOutsideTopLevelType, arguments.AttributeSyntaxOpt.Location, Name); 982diagnostics.Add(ErrorCode.ERR_ModuleInitializerMethodMustBeStaticParameterlessVoid, arguments.AttributeSyntaxOpt.Location, Name); 988diagnostics.Add(ErrorCode.ERR_ModuleInitializerMethodAndContainingTypesMustNotBeGeneric, arguments.AttributeSyntaxOpt.Location, Name); 996diagnostics.Add(ErrorCode.ERR_ModuleInitializerCannotBeUnmanagedCallersOnly, arguments.AttributeSyntaxOpt.Location); 1033diagnostics.Add(ErrorCode.ERR_InterceptsLocationUnsupportedVersion, attributeLocation, version); 1039diagnostics.Add(ErrorCode.ERR_InterceptsLocationDataInvalidFormat, attributeLocation); 1063diagnostics.Add(ErrorCode.ERR_InterceptsLocationDuplicateFile, attributeLocation, displayFileName); 1069diagnostics.Add(ErrorCode.ERR_InterceptsLocationFileNotFound, attributeLocation, displayFileName); 1079diagnostics.Add(ErrorCode.ERR_InterceptsLocationDataInvalidPosition, attributeLocation, displayFileName); 1099diagnostics.Add(ErrorCode.ERR_InterceptorNameNotInvoked, attributeLocation, referencedToken.Text); 1102diagnostics.Add(ErrorCode.ERR_InterceptorPositionBadToken, attributeLocation, referencedToken.Text); 1108diagnostics.Add(ErrorCode.ERR_InterceptsLocationDataInvalidPosition, attributeLocation, displayFileName); 1154diagnostics.Add(ErrorCode.ERR_InterceptorGlobalNamespace, attributeLocation); 1159diagnostics.Add(ErrorCode.ERR_InterceptorsFeatureNotEnabled, attributeLocation, recommendedProperty); 1174diagnostics.Add(ErrorCode.WRN_InterceptsLocationAttributeUnsupportedSignature, attributeLocation); 1194diagnostics.Add(ErrorCode.ERR_InterceptorFilePathCannotBeNull, attributeData.GetAttributeArgumentLocation(filePathParameterIndex)); 1208diagnostics.Add(ErrorCode.ERR_InterceptorNonUniquePath, attributeData.GetAttributeArgumentLocation(filePathParameterIndex), normalizedPath); 1219diagnostics.Add(ErrorCode.ERR_InterceptorNonUniquePath, attributeData.GetAttributeArgumentLocation(filePathParameterIndex), attributeFilePath); 1241ErrorCode.ERR_InterceptorPathNotInCompilationWithCandidate, 1248diagnostics.Add(ErrorCode.ERR_InterceptorPathNotInCompilation, attributeData.GetAttributeArgumentLocation(filePathParameterIndex), normalizedPath); 1262diagnostics.Add(ErrorCode.ERR_InterceptorLineCharacterMustBePositive, location); 1271diagnostics.Add(ErrorCode.ERR_InterceptorLineOutOfRange, attributeData.GetAttributeArgumentLocation(lineNumberParameterIndex), referencedLineCount, lineNumberOneBased); 1279diagnostics.Add(ErrorCode.ERR_InterceptorCharacterOutOfRange, attributeData.GetAttributeArgumentLocation(characterNumberParameterIndex), lineLength, characterNumberOneBased); 1296diagnostics.Add(ErrorCode.ERR_InterceptorNameNotInvoked, attributeLocation, referencedToken.Text); 1299diagnostics.Add(ErrorCode.ERR_InterceptorPositionBadToken, attributeLocation, referencedToken.Text); 1308diagnostics.Add(ErrorCode.ERR_InterceptorMustReferToStartOfTokenPosition, attributeLocation, referencedToken.Text, linePositionZeroBased.Line + 1, linePositionZeroBased.Character + 1); 1354diagnostics.Add(ErrorCode.ERR_InterceptorGlobalNamespace, attributeSyntax); 1359diagnostics.Add(ErrorCode.ERR_InterceptorsFeatureNotEnabled, attributeSyntax, recommendedProperty); 1368diagnostics.Add(ErrorCode.ERR_InterceptorContainingTypeCannotBeGeneric, attributeLocation, this); 1374diagnostics.Add(ErrorCode.ERR_InterceptorMethodMustBeOrdinary, attributeLocation); 1382diagnostics.Add(ErrorCode.ERR_InterceptorCannotUseUnmanagedCallersOnly, attributeLocation); 1421diagnostics.Add(ErrorCode.ERR_CannotUseRefInUnmanagedCallersOnly, syntax.Location); 1437diagnostics.Add(ErrorCode.ERR_CannotUseManagedTypeInUnmanagedCallersOnly, syntax.Location, type, (isParam ? MessageID.IDS_Parameter : MessageID.IDS_Return).Localize()); 1496diagnostics.Add(ErrorCode.ERR_ComImportWithUserCtor, this.GetFirstLocation()); 1505diagnostics.Add(ErrorCode.ERR_ComImportWithImpl, this.GetFirstLocation(), this, ContainingType); 1519var errorCode = (this.MethodKind == MethodKind.Constructor || this.MethodKind == MethodKind.StaticConstructor) ? 1520ErrorCode.WRN_ExternCtorNoImplementation : 1521ErrorCode.WRN_ExternMethodNoImplementation; 1557diagnostics.Add(ErrorCode.ERR_BadAsyncReturn, errorLocation); 1577diagnostics.Add(ErrorCode.ERR_SecurityCriticalOrSecuritySafeCriticalOnAsyncInClassOrStruct, errorLocation); 1586diagnostics.Add(ErrorCode.ERR_SynchronizedAsyncMethod, errorLocation); 1606diagnostics.Add(ErrorCode.WRN_UndecoratedCancellationTokenParameter, errorLocation, this); 1612diagnostics.Add(ErrorCode.ERR_MultipleEnumeratorCancellationAttributes, errorLocation);
Symbols\Source\SourceModuleSymbol.cs (3)
342diagnostics.Add(ErrorCode.ERR_NoPIAAssemblyMissingAttribute, NoLocation.Singleton, a, AttributeDescription.GuidAttribute.FullName); 348diagnostics.Add(ErrorCode.ERR_NoPIAAssemblyMissingAttributes, NoLocation.Singleton, a, 593((BindingDiagnosticBag)arguments.Diagnostics).Add(ErrorCode.ERR_InvalidAttributeArgument, attribute.GetAttributeArgumentLocation(0), arguments.AttributeSyntaxOpt.GetErrorDisplayName());
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (32)
132diagnostics.Add(ErrorCode.ERR_BadRecordBase, baseLocation); 137diagnostics.Add(ErrorCode.ERR_BadInheritanceFromRecord, baseLocation); 193diagnostics.Add(ErrorCode.WRN_DuplicateInterfaceWithNullabilityMismatchInBaseList, location, @interface, this); 198diagnostics.Add(ErrorCode.ERR_DuplicateInterfaceWithTupleNamesInBaseList, location, @interface, other, this); 202diagnostics.Add(ErrorCode.ERR_DuplicateInterfaceWithDifferencesInBaseList, location, @interface, other, this); 341var info = diagnostics.Add(ErrorCode.ERR_PartialMultipleBases, GetFirstLocation(), this); 392diagnostics.Add(ErrorCode.ERR_StaticBaseClass, baseTypeLocation, baseType, this); 400diagnostics.Add(ErrorCode.ERR_BadVisBaseClass, baseTypeLocation, this, lessVisibleType); 405diagnostics.Add(ErrorCode.ERR_BadVisBaseType, baseTypeLocation, this, lessVisibleType); 411diagnostics.Add(ErrorCode.ERR_FileTypeBase, baseTypeLocation, baseType, this); 422diagnostics.Add(ErrorCode.ERR_ClosedBaseTypeBaseFromOtherAssembly, baseTypeLocation, this, baseType); 438diagnostics.Add(ErrorCode.ERR_UnderspecifiedClosedSubtype, baseTypeLocation, this, typeParameter, baseType); 456diagnostics.Add(ErrorCode.ERR_BadVisBaseInterface, interfaceLocations[i], this, i); 461diagnostics.Add(ErrorCode.ERR_FileTypeBase, interfaceLocations[i], i, this); 517diagnostics.Add(ErrorCode.ERR_BadBaseType, typeSyntax.GetLocation()); 545diagnostics.Add(ErrorCode.ERR_DeriveFromEnumOrValueType, location, this, baseType); 552diagnostics.Add(ErrorCode.ERR_CantDeriveFromSealedType, location, this, baseType); 586var info = diagnostics.Add(ErrorCode.ERR_StaticDerivedFromNonObject, location, this, localBase); 610diagnostics.Add(ErrorCode.ERR_DuplicateInterfaceInBaseList, location, baseType); 615diagnostics.Add(ErrorCode.WRN_DuplicateInterfaceWithNullabilityMismatchInBaseList, location, baseType, this); 622diagnostics.Add(ErrorCode.ERR_StaticClassInterfaceImpl, location, this); 632diagnostics.Add(ErrorCode.ERR_DeriveFromConstructedDynamic, location, this, baseType); 644diagnostics.Add(ErrorCode.ERR_BaseClassMustBeFirst, location, baseType); 649diagnostics.Add(ErrorCode.ERR_NoMultipleInheritance, location, this, localBase, baseType); 656diagnostics.Add(ErrorCode.ERR_DerivingFromATyVar, location, baseType); 665diagnostics.Add(ErrorCode.ERR_DeriveFromDynamic, location, this); 672diagnostics.Add(ErrorCode.ERR_NonInterfaceInInterfaceList, location, baseType); 680diagnostics.Add(ErrorCode.ERR_ObjectCantHaveBases, new SourceLocation(name)); 691diagnostics.Add(ErrorCode.ERR_UnexpectedArgumentList, primaryConstructorBaseType.ArgumentList.Location); 695diagnostics.Add(ErrorCode.ERR_UnexpectedArgumentListInBaseTypeWithoutParameterList, primaryConstructorBaseType.ArgumentList.Location); 740diagnostics.Add(ErrorCode.ERR_CycleInInterfaceInheritance, GetFirstLocation(), this, t))); 828diagnostics.Add(ErrorCode.ERR_CircularBase, GetFirstLocation(), declaredBase, this));
Symbols\Source\SourceNamedTypeSymbol_Enum.cs (1)
68diagnostics.Add(ErrorCode.ERR_IntegralTypeExpected, typeSyntax.Location);
Symbols\Source\SourceNamedTypeSymbol.cs (37)
197diagnostics.Add(ErrorCode.ERR_IllegalVarianceSyntax, tp.VarianceKeyword.GetLocation()); 220diagnostics.Add(ErrorCode.ERR_DuplicateTypeParameter, location, name); 231diagnostics.Add(ErrorCode.WRN_TypeParameterSameAsOuterTypeParameter, location, name, tpEnclosing.ContainingType); 247ErrorCode.ERR_PartialWrongTypeParamsVariance, 255ErrorCode.ERR_PartialWrongTypeParams, 535diagnostics.Add(ErrorCode.ERR_PartialWrongConstraints, GetFirstLocation(), this, typeParameters[i]); 1180diagnostics.Add(ErrorCode.ERR_CantUseRequiredAttribute, arguments.AttributeSyntaxOpt.Name.Location); 1202diagnostics.Add(ErrorCode.ERR_CollectionBuilderAttributeInvalidType, arguments.AttributeSyntaxOpt.Name.Location); 1212diagnostics.Add(ErrorCode.ERR_CollectionBuilderAttributeInvalidMethodName, arguments.AttributeSyntaxOpt.Name.Location); 1225diagnostics.Add(ErrorCode.ERR_InvalidInlineArrayLength, attribute.GetAttributeArgumentLocation(0)); 1230diagnostics.Add(ErrorCode.ERR_AttributeOnBadSymbolType, arguments.AttributeSyntaxOpt.Name.Location, arguments.AttributeSyntaxOpt.GetErrorDisplayName(), "struct"); 1234diagnostics.Add(ErrorCode.ERR_InlineArrayAttributeOnRecord, arguments.AttributeSyntaxOpt.Name.Location); 1328diagnosticsOpt.Add(ErrorCode.ERR_AttributeUsageOnNonAttributeClass, node.Name.Location, node.GetErrorDisplayName()); 1343diagnosticsOpt.Add(ErrorCode.ERR_InvalidAttributeArgument, attribute.GetAttributeArgumentLocation(0), node.GetErrorDisplayName()); 1414diagnostics.Add(ErrorCode.ERR_ConditionalOnNonAttributeClass, node.Location, node.GetErrorDisplayName()); 1423diagnostics.Add(ErrorCode.ERR_BadArgumentToAttribute, attribute.GetAttributeArgumentLocation(0), node.GetErrorDisplayName()); 1655diagnostics.Add(ErrorCode.ERR_ComImportWithoutUuidAttribute, allAttributeSyntaxNodes[index].Name.Location); 1664diagnostics.Add(ErrorCode.ERR_ComImportWithBase, this.GetFirstLocation(), this.Name); 1677diagnostics.Add(ErrorCode.ERR_ComImportWithInitializers, singleInitializer.Syntax.GetLocation(), this.Name); 1691diagnostics.Add(ErrorCode.ERR_ComImportWithInitializers, singleInitializer.Syntax.GetLocation(), this.Name); 1703diagnostics.Add(ErrorCode.WRN_CoClassWithoutComImport, allAttributeSyntaxNodes[index].Location, this.Name); 1712diagnostics.Add(ErrorCode.ERR_DefaultMemberOnIndexedType, allAttributeSyntaxNodes[index].Name.Location); 1890diagnostics.Add(ErrorCode.ERR_LayoutFieldRequiresUnsafeOrSafe, field.GetFirstLocation()); 1995diagnostics.Add(ErrorCode.WRN_ObsoleteMembersShouldNotBeRequired, member.GetFirstLocation(), member); 2008diagnostics.Add(ErrorCode.ERR_StructLayoutAndExtendedLayout, GetFirstLocation()); 2015diagnostics.Add(ErrorCode.ERR_InvalidInlineArrayLayout, GetFirstLocation()); 2024diagnostics.Add(ErrorCode.ERR_InlineArrayUnsupportedElementFieldModifier, elementField.TryGetFirstLocation() ?? GetFirstLocation()); 2038diagnostics.Add(ErrorCode.WRN_InlineArrayIndexerNotUsed, indexer.TryGetFirstLocation() ?? GetFirstLocation()); 2046diagnostics.Add(ErrorCode.WRN_InlineArraySliceNotUsed, slice.TryGetFirstLocation() ?? GetFirstLocation()); 2069diagnostics.Add(ErrorCode.WRN_InlineArrayConversionOperatorNotUsed, conversion.TryGetFirstLocation() ?? GetFirstLocation()); 2078diagnostics.Add(ErrorCode.WRN_InlineArrayNotSupportedByLanguage, elementField.TryGetFirstLocation() ?? GetFirstLocation()); 2082diagnostics.Add(ErrorCode.WRN_InlineArrayNotSupportedByLanguage, GetFirstLocation()); 2088diagnostics.Add(ErrorCode.ERR_InvalidInlineArrayFields, GetFirstLocation()); 2093diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportInlineArrayTypes, GetFirstLocation()); 2101diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportExtendedLayoutTypes, GetFirstLocation()); 2130diagnostics.Add(ErrorCode.ERR_EmbeddedAttributeMustFollowPattern, GetFirstLocation()); 2141diagnostics.Add(ErrorCode.ERR_BadExtensionContainingType, syntax.Keyword);
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (21)
306diagnostics.Add(ErrorCode.ERR_DuplicateAlias, pair.Value.Alias.GetFirstLocation(), pair.Key); 339diagnostics.Add(ErrorCode.HDN_DuplicateWithGlobalUsing, namespaceOrType.UsingDirective!.NamespaceOrType.Location, namespaceOrType.NamespaceOrType); 375diagnostics.Add(ErrorCode.ERR_DuplicateAlias, externAlias.Alias.GetFirstLocation(), externAlias.Alias.Name); 487diagnostics.Add(ErrorCode.ERR_ExternAliasNotAllowed, aliasSyntax.Location); 497diagnostics.Add(ErrorCode.ERR_DuplicateAlias, existingAlias.Alias.GetFirstLocation(), existingAlias.Alias.Name); 504diagnostics.Add(ErrorCode.ERR_GlobalExternAlias, aliasSyntax.Identifier.GetLocation()); 673diagnostics.Add(ErrorCode.WRN_GlobalAliasDefn, location); 678diagnostics.Add(ErrorCode.ERR_NoAliasHere, location); 694diagnostics.Add(ErrorCode.ERR_DuplicateAlias, location, identifierValueText); 705diagnostics.Add(ErrorCode.ERR_DuplicateAlias, usingDirective.Location, identifierValueText); 747diagnostics.Add(ErrorCode.ERR_BadUnsafeInUsingDirective, unsafeKeywordLocation); 754diagnostics.Add(ErrorCode.ERR_IllegalUnsafe, unsafeKeywordLocation); 796diagnostics.Add(ErrorCode.ERR_BadUsingType, usingDirective.NamespaceOrType.Location, imported); 801ErrorCode.HDN_DuplicateWithGlobalUsing : 802ErrorCode.WRN_DuplicateUsing, 814diagnostics.Add(ErrorCode.ERR_BadUsingNamespace, usingDirective.NamespaceOrType.Location, imported); 821diagnostics.Add(ErrorCode.ERR_GlobalUsingStaticFileType, usingDirective.NamespaceOrType.Location, imported); 827ErrorCode.HDN_DuplicateWithGlobalUsing : 828ErrorCode.WRN_DuplicateUsing, 842diagnostics.Add(ErrorCode.ERR_BadUsingStaticType, usingDirective.NamespaceOrType.Location, imported.GetKindText()); 854diagnostics.Add(ErrorCode.ERR_BadSKknown, usingDirective.NamespaceOrType.Location,
Symbols\Source\SourceNamespaceSymbol.cs (4)
358diagnostics.Add(ErrorCode.ERR_FileLocalDuplicateNameInNS, symbol.GetFirstLocationOrNone(), symbol.Name, @namespace); 361diagnostics.Add(ErrorCode.ERR_PartialTypeKindConflict, symbol.GetFirstLocationOrNone(), symbol); 364diagnostics.Add(ErrorCode.ERR_DuplicateNameInNS, symbol.GetFirstLocationOrNone(), symbol.Name, @namespace); 377diagnostics.Add(ErrorCode.ERR_NoNamespacePrivate, symbol.GetFirstLocationOrNone());
Symbols\Source\SourceOrdinaryMethodOrUserDefinedOperatorSymbol.cs (3)
54diagnostics.Add(ErrorCode.WRN_FinalizeMethod, _location); 63diagnostics.Add(ErrorCode.ERR_PartialMemberNotExplicit, _location); 68diagnostics.Add(ErrorCode.ERR_PartialMemberOnlyInPartialClass, _location);
Symbols\Source\SourceOrdinaryMethodSymbol.cs (55)
150diagnostics.Add(ErrorCode.ERR_MethodReturnCantBeRefAny, syntax.ReturnType.Location, returnType.Type); 218diagnostics.Add(ErrorCode.ERR_BadTypeforThis, loc, parameter0Type.Type); 222diagnostics.Add(ErrorCode.ERR_RefExtensionMustBeValueTypeOrConstrainedToOne, _location, Name); 227diagnostics.Add(ErrorCode.ERR_InExtensionMustBeValueType, _location, Name); 231diagnostics.Add(ErrorCode.ERR_ExtensionMethodsDecl, _location, ContainingType.Name); 240diagnostics.Add(ErrorCode.ERR_BadExtensionAgg, loc); 244diagnostics.Add(ErrorCode.ERR_BadExtensionMeth, _location); 254diagnostics.Add(ErrorCode.ERR_InstanceMemberWithUnnamedExtensionsParameter, _location, Name); 267ErrorCode.ERR_ExtensionAttrNotFound, 489diagnostics.Add(ErrorCode.ERR_PartialMethodReturnTypeDifference, implementation.GetFirstLocation()); 494diagnostics.Add(ErrorCode.ERR_PartialMemberInconsistentTupleNames, implementation.GetFirstLocation(), definition, implementation); 499diagnostics.Add(ErrorCode.ERR_PartialMemberRefReturnDifference, implementation.GetFirstLocation()); 504diagnostics.Add(ErrorCode.ERR_PartialMemberStaticDifference, implementation.GetFirstLocation()); 509diagnostics.Add(ErrorCode.ERR_PartialMemberReadOnlyDifference, implementation.GetFirstLocation()); 514diagnostics.Add(ErrorCode.ERR_PartialMethodExtensionDifference, implementation.GetFirstLocation()); 519diagnostics.Add(ErrorCode.ERR_PartialMemberUnsafeDifference, implementation.GetFirstLocation()); 524diagnostics.Add(ErrorCode.ERR_PartialMemberSafeDifference, implementation.GetFirstLocation()); 529diagnostics.Add(ErrorCode.ERR_PartialMemberParamsDifference, implementation.GetFirstLocation()); 535diagnostics.Add(ErrorCode.ERR_PartialMemberAccessibilityDifference, implementation.GetFirstLocation()); 543diagnostics.Add(ErrorCode.ERR_PartialMemberExtendedModDifference, implementation.GetFirstLocation()); 554diagnostics.Add(ErrorCode.ERR_ScopedMismatchInParameterOfPartial, implementingMethod.GetFirstLocation(), new FormattedSymbol(implementingParameter, SymbolDisplayFormat.ShortFormat)); 571diagnostics.Add(ErrorCode.WRN_NullabilityMismatchInReturnTypeOnPartial, implementingMethod.GetFirstLocation()); 575diagnostics.Add(ErrorCode.WRN_NullabilityMismatchInParameterTypeOnPartial, implementingMethod.GetFirstLocation(), new FormattedSymbol(implementingParameter, SymbolDisplayFormat.ShortFormat)); 585diagnostics.Add(ErrorCode.WRN_PartialMethodTypeDifference, implementation.GetFirstLocation(), 624diagnostics.Add(ErrorCode.ERR_PartialMethodInconsistentConstraints, implementation.GetFirstLocation(), implementation, typeParameter2.Name); 628diagnostics.Add(ErrorCode.WRN_NullabilityMismatchInConstraintsOnPartialImplementation, implementation.GetFirstLocation(), implementation, typeParameter2.Name); 676ErrorCode report; 683report = ErrorCode.ERR_OverrideRefConstraintNotSatisfied; 690report = ErrorCode.ERR_OverrideValConstraintNotSatisfied; 697report = ErrorCode.ERR_OverrideDefaultConstraintNotSatisfied; 855diagnostics.Add(ErrorCode.ERR_PartialMemberCannotBeAbstract, location); 859diagnostics.Add(ErrorCode.ERR_PartialMethodWithNonVoidReturnMustHaveAccessMods, location, this); 863diagnostics.Add(ErrorCode.ERR_PartialMethodWithExtendedModMustHaveAccessMods, location, this); 867diagnostics.Add(ErrorCode.ERR_PartialMethodWithOutParamMustHaveAccessMods, location, this); 871diagnostics.Add(ErrorCode.ERR_VirtualPrivate, location, this); 876diagnostics.Add(ErrorCode.ERR_OverrideNotNew, location, this); 881diagnostics.Add(ErrorCode.ERR_SealedNonOverride, location, this); 886diagnostics.Add(ErrorCode.ERR_BadMemberFlag, location, SyntaxFacts.GetText(SyntaxKind.SealedKeyword)); 895diagnostics.Add(ErrorCode.ERR_AbstractAndExtern, location, this); 899diagnostics.Add(ErrorCode.ERR_AbstractAndSealed, location, this); 903diagnostics.Add(ErrorCode.ERR_AbstractNotVirtual, location, this.Kind.Localize(), this); 908diagnostics.Add(ErrorCode.ERR_BadMemberFlag, location, SyntaxFacts.GetText(SyntaxKind.AbstractKeyword)); 913diagnostics.Add(ErrorCode.ERR_BadMemberFlag, location, SyntaxFacts.GetText(SyntaxKind.VirtualKeyword)); 918diagnostics.Add(ErrorCode.ERR_StaticMemberCantBeReadOnly, location, this); 923diagnostics.Add(ErrorCode.ERR_AbstractInConcreteClass, location, this, ContainingType); 928diagnostics.Add(ErrorCode.ERR_NewVirtualInSealed, location, this, ContainingType); 932diagnostics.Add(ErrorCode.ERR_BadAsyncLacksBody, location); 936diagnostics.Add(ErrorCode.ERR_ConcreteMissingBody, location, this); 944diagnostics.Add(ErrorCode.ERR_InstanceMemberInStaticClass, location, Name); 948diagnostics.Add(ErrorCode.ERR_BadVarargs, location); 952diagnostics.Add(ErrorCode.ERR_VarargsAsync, location); 1166diagnostics.Add(ErrorCode.ERR_IllegalVarianceSyntax, parameter.VarianceKeyword.GetLocation()); 1182diagnostics.Add(ErrorCode.ERR_TypeParameterSameNameAsExtensionTypeParameter, location, name); 1188diagnostics.Add(ErrorCode.WRN_TypeParameterSameAsOuterTypeParameter, location, name, tpEnclosing.ContainingType); 1198diagnostics.Add(ErrorCode.ERR_DuplicateTypeParameter, location, name);
Symbols\Source\SourcePropertyAccessorSymbol.cs (14)
574diagnostics.Add(ErrorCode.ERR_AbstractInConcreteClass, location, this, ContainingType); 579diagnostics.Add(ErrorCode.ERR_NewVirtualInSealed, location, this, ContainingType); 583diagnostics.Add(ErrorCode.ERR_ConcreteMissingBody, location, this); 592diagnostics.Add(ErrorCode.ERR_InvalidPropertyReadOnlyMods, location, _property); 597diagnostics.Add(ErrorCode.ERR_StaticMemberCantBeReadOnly, location, this); 601diagnostics.Add(ErrorCode.ERR_InitInExtension, location, _property); 606diagnostics.Add(ErrorCode.ERR_InitCannotBeReadonly, location, _property); 611diagnostics.Add(ErrorCode.ERR_AutoSetterCantBeReadOnly, location, this); 616diagnostics.Add(ErrorCode.ERR_BadInitAccessor, location); 879diagnostics.Add(ErrorCode.ERR_PartialMemberAccessibilityDifference, implementationAccessor.GetFirstLocation()); 884diagnostics.Add(ErrorCode.ERR_PartialMemberReadOnlyDifference, implementationAccessor.GetFirstLocation()); 889diagnostics.Add(ErrorCode.ERR_PartialMemberUnsafeDifference, implementationAccessor.GetFirstLocation()); 894diagnostics.Add(ErrorCode.ERR_PartialMemberSafeDifference, implementationAccessor.GetFirstLocation()); 900diagnostics.Add(ErrorCode.ERR_PartialPropertyInitMismatch, implementationAccessor.GetFirstLocation(), implementationAccessor, accessorName);
Symbols\Source\SourcePropertySymbol.cs (31)
277diagnostics.Add(ErrorCode.ERR_DuplicateAccessor, accessor.Keyword.GetLocation()); 290diagnostics.Add(ErrorCode.ERR_DuplicateAccessor, accessor.Keyword.GetLocation()); 295diagnostics.Add(ErrorCode.ERR_GetOrSetExpected, accessor.Keyword.GetLocation()); 507diagnostics.Add(ErrorCode.ERR_BadMemberFlag, location, SyntaxFacts.GetText(SyntaxKind.RequiredKeyword)); 598diagnostics.Add((this.IsIndexer ? ErrorCode.ERR_BadVisIndexerReturn : ErrorCode.ERR_BadVisPropertyType), Location, this, type.Type); 611diagnostics.Add(ErrorCode.ERR_FileTypeDisallowedInSignature, Location, type.Type, containingType); 621diagnostics.Add(ErrorCode.ERR_IndexerCantHaveVoidType, Location); 625diagnostics.Add(ErrorCode.ERR_PropertyCantHaveVoidType, Location, this); 642diagnostics.Add(ErrorCode.ERR_IndexerNeedsParam, parameterSyntaxOpt.GetLastToken().GetLocation()); 655diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, arglistToken.GetLocation()); 666diagnostics.Add(ErrorCode.WRN_DefaultValueForUnconsumedLocation, paramNameToken.GetLocation(), paramNameToken.ValueText); 696diagnostics.Add(ErrorCode.ERR_BadVisIndexerParam, Location, this, param.Type); 700diagnostics.Add(ErrorCode.ERR_FileTypeDisallowedInSignature, Location, param.Type, containingTypeForFileTypeCheck); 704diagnostics.Add(ErrorCode.ERR_DuplicateGeneratedName, param.TryGetFirstLocation() ?? Location, param.Name); 712diagnostics.Add(ErrorCode.ERR_ValueParameterSameNameAsExtensionTypeParameter, setter.GetFirstLocationOrNone()); 717diagnostics.Add(ErrorCode.ERR_ValueParameterSameNameAsExtensionParameter, setter.GetFirstLocationOrNone()); 724diagnostics.Add(ErrorCode.ERR_BadVisIndexerParam, Location, this, extensionParameter.Type); 751diagnostics.Add(ErrorCode.ERR_PartialMemberTypeDifference, implementation.GetFirstLocation()); 756diagnostics.Add(ErrorCode.ERR_PartialMemberInconsistentTupleNames, implementation.GetFirstLocation(), this, implementation); 762diagnostics.Add(ErrorCode.ERR_PartialMemberRefReturnDifference, implementation.GetFirstLocation()); 768diagnostics.Add(ErrorCode.WRN_PartialMemberSignatureDifference, implementation.GetFirstLocation(), 775diagnostics.Add(ErrorCode.ERR_PartialPropertyRequiredDifference, implementation.GetFirstLocation()); 780diagnostics.Add(ErrorCode.ERR_PartialMemberStaticDifference, implementation.GetFirstLocation()); 785diagnostics.Add(ErrorCode.ERR_PartialMemberReadOnlyDifference, implementation.GetFirstLocation()); 790diagnostics.Add(ErrorCode.ERR_PartialMemberUnsafeDifference, implementation.GetFirstLocation()); 795diagnostics.Add(ErrorCode.ERR_PartialMemberSafeDifference, implementation.GetFirstLocation()); 800diagnostics.Add(ErrorCode.ERR_PartialMemberParamsDifference, implementation.GetFirstLocation()); 806diagnostics.Add(ErrorCode.ERR_PartialMemberAccessibilityDifference, implementation.GetFirstLocation()); 814diagnostics.Add(ErrorCode.ERR_PartialMemberExtendedModDifference, implementation.GetFirstLocation()); 826diagnostics.Add(ErrorCode.ERR_ScopedMismatchInParameterOfPartial, implementation.GetFirstLocation(), new FormattedSymbol(implementation.Parameters[i], SymbolDisplayFormat.ShortFormat));
Symbols\Source\SourcePropertySymbolBase.cs (54)
310diagnostics.Add(ErrorCode.ERR_InstancePropertyInitializerInInterface, Location); 314diagnostics.Add(ErrorCode.ERR_InitializerOnNonAutoProperty, Location); 355diagnostics.Add(ErrorCode.WRN_AccessorDoesNotUseBackingField, accessorToBlame.GetFirstLocation(), accessorName, property); 892diagnostics.Add(ErrorCode.ERR_RefReturningPropertiesCannotBeRequired, Location); 901diagnostics.Add(ErrorCode.ERR_AutoPropsInRoStruct, Location); 905diagnostics.Add(ErrorCode.ERR_AutoPropertyWithSetterCantBeReadOnly, Location, this); 915diagnostics.Add(ErrorCode.ERR_AutoPropertyCannotBeRefReturning, Location); 925diagnostics.Add(ErrorCode.ERR_AutoPropertyMustOverrideSet, Location); 937diagnostics.Add(ErrorCode.ERR_InterfacesCantContainFields, Location); 949diagnostics.Add(ErrorCode.ERR_InvalidPropertyUnsafeMods, Location, this); 962diagnostics.Add(ErrorCode.ERR_RefPropertyCannotHaveSetAccessor, _setMethod.GetFirstLocation()); 968diagnostics.Add(ErrorCode.ERR_DuplicatePropertyAccessMods, Location, this); 972diagnostics.Add(ErrorCode.ERR_DuplicatePropertyReadOnlyMods, Location, this); 979diagnostics.Add(ErrorCode.ERR_SamePropertyUnsafeAccessorMods, Location, this); 992diagnostics.Add(ErrorCode.ERR_PropertyWithNoAccessors, Location, this); 998diagnostics.Add(ErrorCode.ERR_RefPropertyMustHaveGetAccessor, Location); 1006diagnostics.Add(ErrorCode.ERR_AutoPropertyMustHaveGetAccessor, _setMethod!.GetFirstLocation()); 1017diagnostics.Add(ErrorCode.ERR_AccessModMissingAccessor, Location, this); 1023diagnostics.Add(ErrorCode.ERR_ReadOnlyModMissingAccessor, Location, this); 1029diagnostics.Add(ErrorCode.ERR_SamePropertyUnsafeAccessorMods, Location, this); 1079diagnostics.Add(ErrorCode.ERR_ExternMemberRequiresUnsafeOrSafe, 1132diagnostics.Add(ErrorCode.ERR_VirtualPrivate, location, this); 1137diagnostics.Add(ErrorCode.ERR_StaticMemberCantBeReadOnly, location, this); 1142diagnostics.Add(ErrorCode.ERR_OverrideNotNew, location, this); 1147diagnostics.Add(ErrorCode.ERR_SealedNonOverride, location, this); 1151diagnostics.Add(ErrorCode.ERR_PartialMemberOnlyInPartialClass, location); 1155diagnostics.Add(ErrorCode.ERR_PartialMemberNotExplicit, location); 1159diagnostics.Add(ErrorCode.ERR_PartialMemberCannotBeAbstract, location); 1164diagnostics.Add(ErrorCode.ERR_BadMemberFlag, location, SyntaxFacts.GetText(SyntaxKind.AbstractKeyword)); 1169diagnostics.Add(ErrorCode.ERR_BadMemberFlag, location, SyntaxFacts.GetText(SyntaxKind.VirtualKeyword)); 1173diagnostics.Add(ErrorCode.ERR_AbstractAndExtern, location, this); 1177diagnostics.Add(ErrorCode.ERR_AbstractAndSealed, location, this); 1181diagnostics.Add(ErrorCode.ERR_AbstractNotVirtual, location, this.Kind.Localize(), this); 1189diagnostics.Add(ErrorCode.ERR_InstanceMemberWithUnnamedExtensionsParameter, location, Name); 1193ErrorCode errorCode = isIndexer ? ErrorCode.ERR_IndexerInStaticClass : ErrorCode.ERR_InstanceMemberInStaticClass; 1203diagnostics.Add(ErrorCode.ERR_InvalidPropertyAccessMod, accessor.GetFirstLocation(), accessor, this); 1225diagnostics.Add(ErrorCode.ERR_PrivateAbstractAccessor, accessor.GetFirstLocation(), accessor); 1244diagnostics.Add(ErrorCode.ERR_ExplicitPropertyMissingAccessor, this.Location, this, otherAccessor); 1248diagnostics.Add(ErrorCode.ERR_ExplicitPropertyAddingAccessor, thisAccessor.GetFirstLocation(), thisAccessor, explicitlyImplementedProperty); 1253diagnostics.Add(ErrorCode.ERR_ExplicitPropertyMismatchInitOnly, thisAccessor.GetFirstLocation(), thisAccessor, otherAccessor); 1610diagnostics.Add(ErrorCode.ERR_ExplicitDynamicAttr, arguments.AttributeSyntaxOpt.Location); 1614diagnostics.Add(ErrorCode.ERR_RequiresUnsafeAttributeInSource, arguments.AttributeSyntaxOpt.Location); 1654diagnostics.Add(ErrorCode.WRN_UnscopedRefAttributeOldRules, arguments.AttributeSyntaxOpt.Location); 1668diagnostics.Add(ErrorCode.ERR_UnscopedRefAttributeUnsupportedMemberTarget, arguments.AttributeSyntaxOpt.Location); 1679? ErrorCode.ERR_CannotApplyOverloadResolutionPriorityToOverride 1681: ErrorCode.ERR_CannotApplyOverloadResolutionPriorityToMember, 1780diagnostics.Add(ErrorCode.ERR_BadIndexerNameAttr, node.Name.Location, node.GetErrorDisplayName()); 1787diagnostics.Add(ErrorCode.ERR_BadArgumentToAttribute, node.ArgumentList.Arguments[0].Location, node.GetErrorDisplayName()); 1793diagnostics.Add(ErrorCode.ERR_InsufficientStack, node.ArgumentList.Arguments[0].Location); 1929diagnostics.Add(ErrorCode.ERR_FieldCantBeRefAny, TypeLocation, type); 1936diagnostics.Add(ErrorCode.ERR_BadFieldTypeInRecord, TypeLocation, type); 1940diagnostics.Add(ErrorCode.ERR_FieldAutoPropCantBeByRefLike, TypeLocation, type);
Symbols\Source\SourceUserDefinedConversionSymbol.cs (2)
35diagnostics.Add(ErrorCode.ERR_ImplicitConversionOperatorCantBeChecked, syntax.CheckedKeyword.GetLocation()); 83diagnostics.Add(ErrorCode.ERR_OvlUnaryOperatorExpected, syntax.ParameterList.GetLocation());
Symbols\Source\SourceUserDefinedOperatorSymbol.cs (1)
36diagnostics.Add(ErrorCode.ERR_OperatorCantBeChecked, syntax.CheckedKeyword.GetLocation(), SyntaxFacts.GetText(SyntaxFacts.GetOperatorKind(name)));
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (50)
68diagnostics.Add(ErrorCode.ERR_InterfacesCantContainConversionOrEqualityOperators, this.GetFirstLocation()); 78diagnostics.Add(ErrorCode.ERR_OperatorInStaticClass, location, this); 84diagnostics.Add(ErrorCode.ERR_OperatorInExtensionOfStaticClass, location); 94diagnostics.Add(ErrorCode.ERR_ExplicitImplementationOfOperatorsMustBeStatic, this.GetFirstLocation(), this); 101diagnostics.Add(ErrorCode.ERR_OperatorsMustBePublic, this.GetFirstLocation(), this); 107diagnostics.Add(ErrorCode.ERR_OperatorsMustBeStaticAndPublic, this.GetFirstLocation(), this); 116diagnostics.Add(ErrorCode.ERR_AbstractAndExtern, location, this); 120diagnostics.Add(ErrorCode.ERR_AbstractNotVirtual, location, this.Kind.Localize(), this); 127diagnostics.Add(ErrorCode.ERR_ExternHasBody, location, this); 131diagnostics.Add(ErrorCode.ERR_AbstractHasBody, location, this); 139diagnostics.Add(ErrorCode.ERR_ConcreteMissingBody, location, this); 144diagnostics.Add(ErrorCode.ERR_OverrideNotNew, location, this); 149diagnostics.Add(ErrorCode.ERR_SealedNonOverride, location, this); 153diagnostics.Add(ErrorCode.ERR_AbstractAndSealed, location, this); 158diagnostics.Add(ErrorCode.ERR_AbstractInConcreteClass, location, this, ContainingType); 163diagnostics.Add(ErrorCode.ERR_NewVirtualInSealed, location, this, ContainingType); 243diagnostics.Add(ErrorCode.ERR_BadMemberFlag, location, ModifierUtils.ConvertSingleModifierToSyntaxText(DeclarationModifiers.Sealed)); 303diagnostics.Add(ErrorCode.ERR_InvalidModifierForLanguageVersion, location, 338diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, new SourceLocation(arglistToken)); 351diagnostics.Add(ErrorCode.ERR_MethodReturnCantBeRefAny, returnTypeSyntax.Location, returnType.Type); 391diagnostics.Add(ErrorCode.ERR_InstanceMemberWithUnnamedExtensionsParameter, _location, new FormattedSymbol(this, SymbolDisplayFormat.ShortFormat)); 411diagnostics.Add(ErrorCode.ERR_InstanceOperatorStructExtensionWrongReceiverRefKind, _location); 420diagnostics.Add(ErrorCode.ERR_InstanceOperatorStructExtensionWrongReceiverRefKind, _location); 424diagnostics.Add(ErrorCode.ERR_InstanceOperatorExtensionWrongReceiverType, _location); 476diagnostics.Add(ErrorCode.ERR_IllegalRefParam, this.GetFirstLocation()); 566diagnostics.Add(ErrorCode.ERR_OperatorMustReturnVoid, this.GetFirstLocation()); 649diagnostics.Add(ErrorCode.ERR_ConversionWithInterface, this.GetFirstLocation(), this); 663diagnostics.Add(IsInInterfaceAndAbstractOrVirtual() ? ErrorCode.ERR_AbstractConversionNotInvolvingContainedType : ErrorCode.ERR_ConversionNotInvolvingContainedType, this.GetFirstLocation()); 674diagnostics.Add(ErrorCode.ERR_IdentityConversion, this.GetFirstLocation()); 742diagnostics.Add(ErrorCode.ERR_BadDynamicConversion, this.GetFirstLocation(), this); 770diagnostics.Add(ErrorCode.ERR_ConversionWithBase, this.GetFirstLocation(), this); 775diagnostics.Add(ErrorCode.ERR_ConversionWithDerived, this.GetFirstLocation(), this); 787diagnostics.Add(ErrorCode.ERR_OperatorCantReturnVoid, this.GetFirstLocation()); 806ErrorCode.ERR_BadAbstractUnaryOperatorSignature : 808ErrorCode.ERR_BadExtensionUnaryOperatorSignature : 809ErrorCode.ERR_BadUnaryOperatorSignature), 822diagnostics.Add(ErrorCode.ERR_OpTFRetType, this.GetFirstLocation()); 875ErrorCode.ERR_BadAbstractIncDecSignature : 877ErrorCode.ERR_BadExtensionIncDecSignature : 878ErrorCode.ERR_BadIncDecSignature), 888diagnostics.Add(IsInInterfaceAndAbstractOrVirtual() ? ErrorCode.ERR_BadAbstractIncDecRetType : ErrorCode.ERR_BadIncDecRetType, this.GetFirstLocation()); 950ErrorCode.ERR_BadAbstractShiftOperatorSignature : 951(ContainingType.IsExtension ? ErrorCode.ERR_BadExtensionShiftOperatorSignature : ErrorCode.ERR_BadShiftOperatorSignature), 972ErrorCode.ERR_BadAbstractBinaryOperatorSignature : 973(ContainingType.IsExtension ? ErrorCode.ERR_BadExtensionBinaryOperatorSignature : ErrorCode.ERR_BadBinaryOperatorSignature), 985diagnostics.Add(ErrorCode.ERR_BadAbstractEqualityOperatorSignature, this.GetFirstLocation(), this.ContainingType);
Symbols\Source\TypeParameterBuilder.cs (1)
48diagnostics.Add(ErrorCode.ERR_TypeVariableSameAsParent, result.GetFirstLocation(), result.Name);
Symbols\Symbol_Attributes.cs (12)
223arguments.Diagnostics.DiagnosticBag.Add(ErrorCode.ERR_ExplicitReservedAttr, arguments.AttributeSyntaxOpt.Location, AttributeDescription.CompilerFeatureRequiredAttribute.FullName); 230arguments.Diagnostics.DiagnosticBag.Add(ErrorCode.ERR_InvalidExperimentalDiagID, attrArgumentLocation); 235arguments.Diagnostics.DiagnosticBag.Add(ErrorCode.ERR_AttributeCannotBeAppliedManually, arguments.AttributeSyntaxOpt!.Location, args: [AttributeDescription.MetadataUpdateDeletedAttribute.FullName]); 688diagnostics.Add(ErrorCode.ERR_AttributesNotAllowed, attributeList); 711diagnostics.Add(ErrorCode.WRN_NonECMAFeature, targetOpt.GetLocation(), MessageID.IDS_FeatureModuleAttrLoc); 722diagnostics.Add(ErrorCode.WRN_InvalidAttributeLocation, 741diagnostics.Add(ErrorCode.ERR_GlobalAttributesNotAllowed, targetOpt.Identifier.GetLocation()); 751diagnostics.Add(ErrorCode.WRN_AttributeLocationOnBadDeclaration, 913diagnostics.Add(ErrorCode.ERR_AttributesNotAllowed, node.Name.Location); 920diagnostics.Add(ErrorCode.ERR_DuplicateAttribute, node.Name.Location, node.GetErrorDisplayName()); 940diagnostics.Add(ErrorCode.ERR_AttributeOnBadSymbolType, node.Name.Location, node.GetErrorDisplayName(), attributeUsageInfo.GetValidTargetsErrorArgument()); 955diagnostics.Add(ErrorCode.ERR_SecurityAttributeInvalidTarget, node.Name.Location, node.GetErrorDisplayName());
Symbols\Symbol.cs (15)
1197if (info.Code == (int)ErrorCode.WRN_UnifyReferenceBldRev || 1198info.Code == (int)ErrorCode.WRN_UnifyReferenceMajMin || 1199info.Code == (int)ErrorCode.ERR_AssemblyMatchBadVersion) 1219if (info.DiagnosticInfo?.Code == (int)ErrorCode.ERR_BogusType) 1235info = info.AdjustDiagnosticInfo(new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, this)); 1242var useSiteInfo = new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_BogusType, string.Empty)); 1507ErrorCode.ERR_ConstraintOnlyAllowedOnGenericDecl, 1520diagnostics.Add(ErrorCode.ERR_BlockBodyAndExpressionBody, syntax.GetLocation()); 1559diagnostics.Add(ErrorCode.ERR_ExplicitDynamicAttr, arguments.AttributeSyntaxOpt.Location); 1580diagnostics.Add(ErrorCode.ERR_ExplicitTupleElementNamesAttribute, arguments.AttributeSyntaxOpt.Location); 1586diagnostics.Add(ErrorCode.ERR_ExplicitNullableAttribute, arguments.AttributeSyntaxOpt.Location); 1604diagnostics.Add(ErrorCode.ERR_ExplicitExtension, arguments.AttributeSyntaxOpt.Location); 1610diagnostics.Add(ErrorCode.ERR_ExplicitRequiredMember, arguments.AttributeSyntaxOpt.Location); 1616diagnostics.Add(ErrorCode.ERR_ExplicitScopedRef, arguments.AttributeSyntaxOpt.Location); 1649diagnostics.Add(ErrorCode.ERR_ExplicitReservedAttr, arguments.AttributeSyntaxOpt.Location, attributeDescription.FullName);
Symbols\SymbolExtensions.cs (1)
310diagnostics.Add(ErrorCode.ERR_IllegalUnsafeModifier,
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (1)
242return new CSDiagnosticInfo(ErrorCode.ERR_MissingPredefinedMember, memberDescriptor.DeclaringTypeMetadataName, memberDescriptor.Name);
Symbols\Synthesized\Records\SynthesizedPrimaryConstructor.cs (1)
189diagnostics.Add(ErrorCode.WRN_AttributeLocationOnBadDeclaration,
Symbols\Synthesized\Records\SynthesizedRecordBaseEquals.cs (1)
47diagnostics.Add(ErrorCode.ERR_DoesNotOverrideBaseMethod, GetFirstLocation(), this, ContainingType.BaseTypeNoUseSiteDiagnostics);
Symbols\Synthesized\Records\SynthesizedRecordEqualityContractProperty.cs (1)
138diagnostics.Add(ErrorCode.ERR_DoesNotOverrideBaseEqualityContract, overriding.GetFirstLocation(), overriding, baseType);
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (1)
117diagnostics.Add(ErrorCode.ERR_AbstractBaseRecordImplementation, GetFirstLocation(), this, baseEquals);
Symbols\Synthesized\Records\SynthesizedRecordGetHashCode.cs (1)
90diagnostics.Add(ErrorCode.ERR_AbstractBaseRecordImplementation, GetFirstLocation(), this, overridden);
Symbols\Synthesized\Records\SynthesizedRecordObjectMethod.cs (1)
54diagnostics.Add(ErrorCode.ERR_DoesNotOverrideMethodFromObject, overriding.GetFirstLocation(), overriding);
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (3)
112diagnostics.Add(ErrorCode.ERR_DoesNotOverrideBaseMethod, GetFirstLocation(), this, ContainingType.BaseTypeNoUseSiteDiagnostics); 166diagnostics.Add(ErrorCode.ERR_AbstractBaseRecordImplementation, GetFirstLocation(), this, basePrintMethod); 308diagnostics.Add(ErrorCode.ERR_DoesNotOverrideBaseMethod, overriding.GetFirstLocation(), overriding, baseType);
Symbols\Synthesized\SynthesizedBackingFieldSymbol.cs (2)
264((BindingDiagnosticBag)arguments.Diagnostics).Add(ErrorCode.ERR_DoNotUseFixedBufferAttrOnProperty, arguments.AttributeSyntaxOpt.Name.Location); 303new CSDiagnosticInfo(ErrorCode.WRN_AttributesOnBackingFieldsNotAvailable,
Symbols\Synthesized\SynthesizedHotReloadExceptionConstructorSymbol.cs (2)
46diagnostics.Add(ErrorCode.ERR_EncUpdateFailedMissingSymbol, 61diagnostics.Add(ErrorCode.ERR_EncUpdateFailedMissingSymbol,
Symbols\Synthesized\SynthesizedUnionCtor.cs (1)
98diagnostics.Add(ErrorCode.ERR_NoImplicitConversionToObject, _typeSyntax.GetLocation(), parameterType);
Symbols\Tuples\TupleFieldSymbol.cs (1)
285return new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_TupleInferredNamesNotAvailable, _name,
Symbols\Tuples\TupleTypeSymbol.cs (3)
302diagnostics.Add(ErrorCode.WRN_TupleLiteralNameMismatch, literal.Arguments[i].Syntax.Parent!.Location, sourceName, destination); 496Binder.Error(diagnostics, ErrorCode.ERR_PredefinedTypeMemberNotFoundInAssembly, syntax, relativeDescriptor.Name, type, type.ContainingAssembly); 748new CSDiagnosticInfo(ErrorCode.ERR_PredefinedTypeMemberNotFoundInAssembly,
Symbols\TypeSymbol.cs (50)
522=> code is (int)ErrorCode.ERR_UnsupportedCompilerFeature or (int)ErrorCode.ERR_BogusType; 529return (object)info != null && info.Code is (int)ErrorCode.ERR_UnsupportedCompilerFeature or (int)ErrorCode.ERR_BogusType; 860diagnostics.Add(ErrorCode.ERR_DuplicateExplicitImpl, implementingType.GetFirstLocation(), interfaceMember); 1020diagnostics.Add(ErrorCode.ERR_ImplicitImplementationOfInaccessibleInterfaceMember, GetImplicitImplementationDiagnosticLocation(interfaceMember, implementingType, implicitImpl), implementingType, interfaceMember, implicitImpl); 1029diagnostics.Add(ErrorCode.ERR_ImplicitImplementationOfNonPublicInterfaceMember, GetImplicitImplementationDiagnosticLocation(interfaceMember, implementingType, implicitImpl), 1081diagnostics.Add(ErrorCode.ERR_MostSpecificImplementationIsNotFound, GetInterfaceLocation(interfaceMember, implementingType), 1107return !symbolAndDiagnostics.Diagnostics.Diagnostics.Any(static d => d.Code == (int)ErrorCode.ERR_MostSpecificImplementationIsNotFound); 1639diagnostics.Add(ErrorCode.ERR_RefStructDoesNotSupportDefaultInterfaceImplementationForMember, 1653diagnostics.Add(ErrorCode.ERR_LanguageVersionDoesNotSupportInterfaceImplementationForMember, 1666ErrorCode.ERR_RuntimeDoesNotSupportStaticAbstractMembersInInterfacesForMember : 1667ErrorCode.ERR_RuntimeDoesNotSupportDefaultInterfaceImplementationForMember, 1691diagnostics.Add(ErrorCode.ERR_MethodImplementingAccessor, GetImplicitImplementationDiagnosticLocation(interfaceMember, implementingType, implicitImpl), implicitImpl, interfaceMethod, implementingType); 1695diagnostics.Add(ErrorCode.ERR_AccessorImplementingMethod, GetImplicitImplementationDiagnosticLocation(interfaceMember, implementingType, implicitImpl), implicitImpl, interfaceMethod, implementingType); 1704diagnostics.Add(ErrorCode.ERR_InterfaceImplementedByConditional, GetImplicitImplementationDiagnosticLocation(interfaceMember, implementingType, implicitImpl), implicitImpl, interfaceMethod, implementingType); 1708diagnostics.Add(ErrorCode.ERR_InterfaceImplementedByUnmanagedCallersOnlyMethod, GetImplicitImplementationDiagnosticLocation(interfaceMember, implementingType, implicitImpl), implicitImpl, interfaceMethod, implementingType); 1720diagnostics.Add(ErrorCode.ERR_ImplBadTupleNames, GetImplicitImplementationDiagnosticLocation(interfaceMember, implementingType, implicitImpl), implicitImpl, interfaceMember); 1743diagnostics.Add(ErrorCode.WRN_MultipleRuntimeImplementationMatches, GetImplicitImplementationDiagnosticLocation(interfaceMember, implementingType, member), member, interfaceMember, implementingType); 1754diagnostics.Add(ErrorCode.ERR_LanguageVersionDoesNotSupportInterfaceImplementationForMember, 1764diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportStaticAbstractMembersInInterfacesForMember, 1789diagnostics.Add(ErrorCode.WRN_NullabilityMismatchInTypeOnExplicitImplementation, 1794diagnostics.Add(ErrorCode.WRN_NullabilityMismatchInTypeOnImplicitImplementation, 1805isExplicit ? ErrorCode.ERR_RequiresUnsafeExplicitlyImplementingSafe : ErrorCode.ERR_RequiresUnsafeImplicitlyImplementingSafe, 1827ErrorCode.WRN_TopLevelNullabilityMismatchInReturnTypeOnExplicitImplementation : 1828ErrorCode.WRN_NullabilityMismatchInReturnTypeOnExplicitImplementation, 1834ErrorCode.WRN_TopLevelNullabilityMismatchInReturnTypeOnImplicitImplementation : 1835ErrorCode.WRN_NullabilityMismatchInReturnTypeOnImplicitImplementation, 1848ErrorCode.WRN_TopLevelNullabilityMismatchInParameterTypeOnExplicitImplementation : 1849ErrorCode.WRN_NullabilityMismatchInParameterTypeOnExplicitImplementation, 1857ErrorCode.WRN_TopLevelNullabilityMismatchInParameterTypeOnImplicitImplementation : 1858ErrorCode.WRN_NullabilityMismatchInParameterTypeOnImplicitImplementation, 1886ErrorCode.ERR_ScopedMismatchInParameterOfOverrideOrImplementation : 1887ErrorCode.WRN_ScopedMismatchInParameterOfOverrideOrImplementation, 1903diagnostics.Add(ErrorCode.WRN_OverridingDifferentRefness, location, implementingParameter, implementedParameter); 1911isExplicit ? ErrorCode.ERR_RequiresUnsafeExplicitlyImplementingSafe : ErrorCode.ERR_RequiresUnsafeImplicitlyImplementingSafe, 1929ErrorCode.ERR_UnscopedRefAttributeInterfaceImplementation, 2015diagnostics.Add(closestMismatch.IsStatic ? ErrorCode.ERR_CloseUnimplementedInterfaceMemberStatic : ErrorCode.ERR_CloseUnimplementedInterfaceMemberNotStatic, 2020ErrorCode errorCode = interfaceMember.IsAccessor() ? ErrorCode.ERR_UnimplementedInterfaceAccessor : ErrorCode.ERR_CloseUnimplementedInterfaceMemberNotPublic; 2025diagnostics.Add(ErrorCode.ERR_CloseUnimplementedInterfaceMemberWrongInitOnly, interfaceLocation, implementingType, interfaceMember, closestMismatch); 2071diagnostics.Add(ErrorCode.ERR_CloseUnimplementedInterfaceMemberWrongRefReturn, interfaceLocation, implementingType, interfaceMember, closestMismatch); 2076diagnostics.Add(ErrorCode.ERR_CloseUnimplementedInterfaceMemberOperatorMismatch, interfaceLocation, implementingType, interfaceMember, closestMismatch); 2080diagnostics.Add(ErrorCode.ERR_CloseUnimplementedInterfaceMemberWrongReturnType, interfaceLocation, implementingType, interfaceMember, closestMismatch, interfaceMemberReturnType); 2150diagnostics.Add(ErrorCode.ERR_ImplBadConstraints, GetImplicitImplementationDiagnosticLocation(interfaceMethod, implementingType, implicitImpl), typeParameter2.Name, implicitImpl, typeParameter1.Name, interfaceMethod); 2154diagnostics.Add(ErrorCode.WRN_NullabilityMismatchInConstraintsOnImplicitImplementation, GetImplicitImplementationDiagnosticLocation(interfaceMethod, implementingType, implicitImpl),
Symbols\UnboundGenericType.cs (2)
42new CSDiagnosticInfo(ErrorCode.ERR_UnexpectedUnboundGenericName)); 60public static readonly ErrorTypeSymbol Instance = new UnboundArgumentErrorTypeSymbol(string.Empty, new CSDiagnosticInfo(ErrorCode.ERR_UnexpectedUnboundGenericName));
Symbols\UnsupportedMetadataTypeSymbol.cs (1)
29return new CSDiagnosticInfo(ErrorCode.ERR_BogusType, string.Empty);
Symbols\VarianceSafety.cs (3)
95diagnostics.Add(ErrorCode.ERR_VarianceInterfaceNesting, member.GetFirstLocation()); 477diagnostics.Add(ErrorCode.ERR_UnexpectedVarianceStaticMember, location, context, unsafeTypeParameter, actualVariance.Localize(), expectedVariance.Localize(), 482diagnostics.Add(ErrorCode.ERR_UnexpectedVariance, location, context, unsafeTypeParameter, actualVariance.Localize(), expectedVariance.Localize());
Syntax\InternalSyntax\SyntaxFirstTokenReplacer.cs (1)
78(ErrorCode)oldSyntaxDiagnostic.Code,
Syntax\SyntaxFactory.cs (9)
2387switch ((ErrorCode)error.Code) 2389case ErrorCode.ERR_OpenEndedComment: 2390case ErrorCode.ERR_EndifDirectiveExpected: 2391case ErrorCode.ERR_EndRegionDirectiveExpected: 2443switch ((ErrorCode)error.Code) 2446case ErrorCode.ERR_NewlineInConst: 2449case ErrorCode.ERR_UnterminatedStringLit: 2452case ErrorCode.ERR_GlobalDefinitionOrStatementExpected: 2453case ErrorCode.ERR_EOFExpected:
Syntax\SyntaxNodeExtensions.cs (1)
340diagnostics.Add(ErrorCode.ERR_VarInvocationLvalueReserved, expression.GetLocation());
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
SyncedSource\FileBasedPrograms\FileLevelDirectiveHelpers.cs (1)
36/// compiler reports <see cref="ErrorCode.ERR_PPIgnoredFollowsToken"/> anyway, so we speed up success scenarios by not parsing the whole file up front in the SDK CLI.
Microsoft.DotNet.ProjectTools (1)
src\sdk\src\Cli\Microsoft.DotNet.FileBasedPrograms\FileLevelDirectiveHelpers.cs (1)
36/// compiler reports <see cref="ErrorCode.ERR_PPIgnoredFollowsToken"/> anyway, so we speed up success scenarios by not parsing the whole file up front in the SDK CLI.