435 references to Add
Microsoft.CodeAnalysis.CSharp (435)
Binder\Binder.ValueChecks.cs (2)
1345diagnostics.Add(ErrorCode.ERR_RefLocalOrParamExpected, node.Location); 5581diagnostics.Add(ErrorCode.ERR_InternalError, node.Location);
Binder\Binder_AnonymousTypes.cs (1)
59diagnostics.Add(ErrorCode.ERR_InvalidAnonymousTypeMemberDeclarator, expression.GetLocation());
Binder\Binder_Attributes.cs (2)
475diagnostics.Add(ErrorCode.ERR_NamedArgumentExpected, argument.Expression.GetLocation()); 741diagnostics.Add(ErrorCode.ERR_BadAttributeArgument, syntax.Location);
Binder\Binder_Constraints.cs (7)
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()); 354diagnostics.Add(ErrorCode.ERR_OverrideWithConstraints, syntax.GetLocation()); 361diagnostics.Add(ErrorCode.ERR_TypeConstraintsMustBeUniqueAndFirst, syntax.GetLocation());
Binder\Binder_Conversions.cs (1)
1254_diagnostics.Add(ErrorCode.ERR_CollectionArgumentsMustBeEmpty, _node.WithElement.Syntax.GetFirstToken().GetLocation());
Binder\Binder_Crefs.cs (2)
742diagnostics.Add(ErrorCode.WRN_UnqualifiedNestedTypeInCref, parameterListSyntax.Parameters[i].Location); 1185diagnostics.Add(ErrorCode.WRN_BadXMLRefReturnType, typeSyntax.Location);
Binder\Binder_Deconstruct.cs (4)
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);
Binder\Binder_Expressions.cs (27)
328diagnostics.Add(ErrorCode.ERR_SwitchExpressionNoBestType, exprSyntax.SwitchKeyword.GetLocation()); 390diagnostics.Add(ErrorCode.ERR_DefaultLiteralNoTargetType, defaultExpr.Syntax.GetLocation()); 433diagnostics.Add(ErrorCode.ERR_CollectionExpressionNoTargetType, expr.Syntax.GetLocation()); 459diagnostics.Add(ErrorCode.ERR_CannotInferDelegateType, syntax.GetLocation()); 875diagnostics.Add(ErrorCode.ERR_InternalError, node.Location); 918diagnostics.Add(ErrorCode.ERR_ThrowMisplaced, node.ThrowKeyword.GetLocation()); 1078diagnostics.Add(ErrorCode.ERR_VoidInTuple, argumentSyntax.Location); 1421diagnostics.Add(ErrorCode.ERR_BadDynamicTypeof, node.Location); 1427diagnostics.Add(ErrorCode.ERR_BadNullableTypeof, node.Location); 3239diagnostics.Add(ErrorCode.ERR_ScopedDiscard, scopedType.ScopedKeyword.GetLocation()); 3245diagnostics.Add(ErrorCode.ERR_OutVariableCannotBeByRef, refType.Location); 3289diagnostics.Add(ErrorCode.ERR_OutVariableCannotBeByRef, refType.Location); 3314diagnostics.Add(ErrorCode.ERR_ScopedRefAndRefStructOnly, typeSyntax.Location); 5014diagnostics.Add(ErrorCode.ERR_NoDynamicPhantomOnBaseCtor, errorLocation); 5160diagnostics.Add(ErrorCode.ERR_ChainingToSetsRequiredMembersRequiresSetsRequiredMembers, errorLocation); 5207diagnostics.Add(ErrorCode.ERR_CopyConstructorMustInvokeBaseCopyConstructor, errorLocation); 5216diagnostics.Add(ErrorCode.ERR_CopyConstructorMustInvokeBaseCopyConstructor, errorLocation); 5291diagnostics.Add(ErrorCode.ERR_AnnotationDisallowedInObjectCreation, node.Location); 5324diagnostics.Add(ErrorCode.ERR_InvalidObjectCreation, node.Type.Location)); 5340diagnostics.Add(ErrorCode.ERR_InsufficientStack, syntax.Location); 5537diagnostics.Add(ErrorCode.ERR_MethodNameExpected, loc); 5613diagnostics.Add(ErrorCode.ERR_MethodNameExpected, argument.Syntax.Location); 5674diagnostics.Add(ErrorCode.ERR_MethodNameExpected, argument.Syntax.Location); 5700diagnostics.Add(ErrorCode.ERR_NewWithTupleTypeSyntax, node.Type.GetLocation()); 6120diagnostics.Add(ErrorCode.ERR_InterpolatedStringsReferencingInstanceCannotBeInObjectInitializers, argument.Syntax.Location); 9218diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportRefFields, node.Location); 10601diagnostics.Add(
Binder\Binder_InterpolatedString.cs (3)
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);
Binder\Binder_Invocation.cs (5)
1678diagnostics.Add(ErrorCode.ERR_BadAttributeArgument, syntax.Location); 2390diagnostics.Add(ErrorCode.ERR_NameofMethodGroupWithTypeParameters, argument.Location); 2448diagnostics.Add(ErrorCode.ERR_NameofExtensionMethod, methodGroup.Syntax.Location); 2495diagnostics.Add(ErrorCode.ERR_AliasQualifiedNameNotAnExpression, argument.Location); 2510diagnostics.Add(code, argument.Location);
Binder\Binder_Lambda.cs (2)
300diagnostics.Add(ErrorCode.ERR_LambdaExplicitReturnTypeVar, syntax.Location); 342diagnostics.Add(ErrorCode.ERR_InconsistentLambdaParameterUsage,
Binder\Binder_Operators.cs (3)
5958diagnostics.Add(ErrorCode.ERR_RefConditionalNeedsTwoRefs, whenFalse.GetFirstToken().GetLocation()); 5963diagnostics.Add(ErrorCode.ERR_RefConditionalNeedsTwoRefs, whenTrue.GetFirstToken().GetLocation()); 6067diagnostics.Add(_inUnsafeRegion ? ErrorCode.WRN_MismatchedRefEscapeInTernary : ErrorCode.ERR_MismatchedRefEscapeInTernary, node.Location);
Binder\Binder_Patterns.cs (16)
532diagnostics.Add(ErrorCode.WRN_GivenExpressionNeverMatchesPattern, node.Location); 540diagnostics.Add(ErrorCode.WRN_GivenExpressionAlwaysMatchesConstant, node.Location); 548diagnostics.Add(ErrorCode.WRN_GivenExpressionAlwaysMatchesPattern, node.Location); 654diagnostics.Add(ErrorCode.ERR_MisplacedSlicePattern, node.Location); 969diagnostics.Add(ErrorCode.ERR_DefaultPattern, e.Location); 976diagnostics.Add(ErrorCode.ERR_IllegalSuppression, e.Location); 1066diagnostics.Add(ErrorCode.ERR_ConstantExpected, patternExpression.Location); 1283diagnostics.Add(ErrorCode.ERR_PointerTypeInPatternMatching, typeSyntax.Location); 1488diagnostics.Add(ErrorCode.ERR_DesignatorBeneathPatternCombinator, identifier.GetLocation()); 1580diagnostics.Add(ErrorCode.ERR_PointerTypeInPatternMatching, node.Location); 1713diagnostics.Add(ErrorCode.ERR_IdentifierExpected, subPattern.ExpressionColon.Expression.Location); 1744diagnostics.Add(ErrorCode.ERR_ArgumentNameInITuplePattern, subpatternSyntax.NameColon.Location); 1748diagnostics.Add(ErrorCode.ERR_IdentifierExpected, subpatternSyntax.ExpressionColon.Expression.Location); 1793diagnostics.Add(ErrorCode.ERR_IdentifierExpected, subpatternSyntax.ExpressionColon.Expression.Location); 1944diagnostics.Add(ErrorCode.ERR_PointerTypeInPatternMatching, node.Location); 2322diagnostics.Add(ErrorCode.ERR_RelationalPatternWithNaN, node.Expression.Location);
Binder\Binder_Query.cs (5)
35diagnostics.Add(ErrorCode.ERR_BadDynamicQuery, fromClause.Expression.Location); 386diagnostics.Add(ErrorCode.ERR_BadDynamicQuery, join.InExpression.Location); 944diagnostics.Add(ErrorCode.ERR_NullNotValid, node.Location); 948diagnostics.Add(ErrorCode.ERR_DefaultLiteralNotValid, node.Location); 952diagnostics.Add(ErrorCode.ERR_ImplicitObjectCreationNotValid, node.Location);
Binder\Binder_Statements.cs (14)
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()); 1108localDiagnostics.Add(ErrorCode.ERR_ScopedRefAndRefStructOnly, typeSyntax.Location); 1473diagnostics.Add(ErrorCode.ERR_VoidAssignment, op1.Syntax.Location); 2270diagnostics.Add(ErrorCode.ERR_InternalError, syntax.Location); 3062diagnostics.Add(ErrorCode.ERR_ReturnInIterator, syntax.ReturnKeyword.GetLocation()); 3070diagnostics.Add(ErrorCode.ERR_MustNotHaveRefReturn, syntax.ReturnKeyword.GetLocation()); 3075diagnostics.Add(ErrorCode.ERR_ReturnInIterator, syntax.ReturnKeyword.GetLocation()); 3084diagnostics.Add(errorCode, syntax.ReturnKeyword.GetLocation()); 3290diagnostics.Add(ErrorCode.ERR_TooManyCatches, catchSyntax.CatchKeyword.GetLocation());
Binder\Binder_Symbols.cs (4)
501diagnostics.Add(ErrorCode.ERR_BadRefInUsingAlias, refToken.GetLocation()); 618diagnostics.Add(ErrorCode.ERR_TypeExpected, syntax.GetLocation()); 1234diagnostics.Add(ErrorCode.ERR_UnexpectedUnboundGenericName, node.Location); 2698return diagnostics.Add(code, location);
Binder\Binder_WithExpression.cs (1)
25diagnostics.Add(ErrorCode.ERR_InvalidWithReceiverType, syntax.Expression.Location);
Binder\EarlyWellKnownAttributeBinder.cs (1)
49diagnostics.Add(ErrorCode.ERR_InternalError, node.Location);
Binder\ExecutableCodeBinder.cs (3)
118diagnostics.Add(ErrorCode.ERR_BadIteratorArgType, location); 123diagnostics.Add(ErrorCode.ERR_UnsafeIteratorArgType, parameter.GetFirstLocation()); 131diagnostics.Add(ErrorCode.ERR_VarargsIterator, errorLocation);
Binder\ForEachLoopBinder.cs (3)
330diagnostics.Add(ErrorCode.ERR_ScopedRefAndRefStructOnly, typeSyntax.Location); 948diagnostics.Add(ErrorCode.ERR_NullNotValid, collectionExpr.Syntax.Location); 970diagnostics.Add(ErrorCode.ERR_BadDynamicAwaitForEach, collectionSyntax.Location);
Binder\InMethodBinder.cs (1)
327diagnostics.Add(ErrorCode.ERR_InternalError, newLocation);
Binder\LocalScopeBinder.cs (1)
537diagnostics.Add(ErrorCode.ERR_InternalError, newLocation);
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (5)
497diagnostics.Add(ErrorCode.ERR_FunctionPointersCannotBeCalledWithNamedArguments, badName); 536diagnostics.Add( 1268diagnostics.Add(ErrorCode.ERR_MissingAddressOf, sourceLocation); 1304diagnostics.Add(ErrorCode.ERR_ExpectedInterpolatedString, sourceLocation); 1373diagnostics.Add(ErrorCode.ERR_ExpectedInterpolatedString, sourceLocation);
Binder\SwitchBinder.cs (2)
450diagnostics.Add(ErrorCode.ERR_V6SwitchGoverningTypeValueExpected, node.Location); 529diagnostics.Add(ErrorCode.ERR_ConstantExpected, node.Location);
Binder\SwitchBinder_Patterns.cs (5)
35diagnostics.Add(ErrorCode.WRN_EmptySwitch, node.OpenBraceToken.GetLocation()); 112diagnostics.Add(ErrorCode.ERR_SwitchCaseSubsumed, p.Pattern.Location); 125diagnostics.Add(ErrorCode.ERR_SwitchCaseSubsumed, p.Value.Location); 216diagnostics.Add(ErrorCode.ERR_UsingVarInSwitchCase, statement.Location); 302diagnostics.Add(ErrorCode.WRN_CaseConstantNamedUnderscore, expression.Location);
Binder\SwitchExpressionBinder.cs (1)
80diagnostics.Add(ErrorCode.ERR_SwitchArmSubsumed, arm.Pattern.Syntax.Location);
Binder\WithLambdaParametersBinder.cs (2)
82diagnostics.Add(ErrorCode.ERR_YieldInAnonMeth, node.YieldKeyword.GetLocation()); 154diagnostics.Add(ErrorCode.ERR_InternalError, newLocation);
BoundTree\BoundTreeVisitors.cs (1)
180diagnostics.Add(ErrorCode.ERR_InsufficientStack, GetTooLongOrComplexExpressionErrorLocation(Node));
BoundTree\VariablePendingInference.cs (1)
69diagnosticsOpt.Add(ErrorCode.ERR_ScopedRefAndRefStructOnly,
CodeGen\EmitExpression.cs (1)
88_diagnostics.Add(ErrorCode.ERR_InsufficientStack,
CodeGen\EmitStatement.cs (1)
387_diagnostics.Add(ErrorCode.ERR_InsufficientStack,
Compilation\CSharpCompilation.cs (6)
1961diagnostics.Add(ErrorCode.ERR_SimpleProgramNotAnExecutable, simpleProgramEntryPointSymbol.ReturnTypeSyntax.Location); 2114diagnostics.Add(ErrorCode.ERR_NonTaskMainCantBeAsync, candidate.GetFirstLocation()); 2189diagnostics.Add(ErrorCode.ERR_NoEntryPoint, NoLocation.Singleton); 2204diagnostics.Add(ErrorCode.ERR_EntryPointCannotBeUnmanagedCallersOnly, viableEntryPoint.GetFirstLocation()); 2772diagnostics.Add(code, infoTree.GetLocation(infoSpan)); 3860diagnostics.Add(ErrorCode.ERR_DuplicateInterceptor, attributeLocation);
Compiler\MethodCompiler.cs (1)
1740diagnosticsForThisMethod.Add(ErrorCode.ERR_TooManyLocals, method.GetFirstLocation());
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (1)
367F.Diagnostics.Add(ErrorCode.ERR_BadAsyncReturn, F.Syntax.Location);
Lowering\AsyncRewriter\AsyncRewriter.cs (1)
65diagnostics.Add(containsAwait ? ErrorCode.ERR_PossibleAsyncIteratorWithoutYield : ErrorCode.ERR_PossibleAsyncIteratorWithoutYieldOrAwait,
Lowering\DiagnosticsPass_ExpressionTrees.cs (2)
623_diagnostics.Add(ErrorCode.ERR_ByRefParameterInExpressionTree, location); 632_diagnostics.Add(ErrorCode.ERR_LambdaWithAttributesToExpressionTree, p.GetFirstLocation());
Lowering\LocalRewriter\LocalRewriter.cs (1)
256this._diagnostics.Add(ErrorCode.ERR_InterceptorCannotInterceptNameof, nameofIdentiferSyntax.Location);
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (1)
628_factory.Diagnostics.Add(ErrorCode.ERR_DynamicRequiredTypesMissing, NoLocation.Singleton);
Lowering\StateMachineRewriter\RefInitializationHoister.cs (1)
263_factory.Diagnostics.Add(ErrorCode.ERR_RefConditionalAndAwait, _factory.Syntax.Location);
Symbols\AliasSymbol.cs (1)
412diagnostics.Add(ErrorCode.ERR_BadNullableReferenceTypeInUsingAlias, nullableType.QuestionToken.GetLocation());
Symbols\Attributes\AttributeData.cs (2)
246((BindingDiagnosticBag)arguments.Diagnostics).Add(ErrorCode.ERR_IllegalUnsafe, arguments.AttributeSyntaxOpt.Location); 375diagnostics.Add(ErrorCode.ERR_SecurityAttributeMissingAction, nodeOpt != null ? nodeOpt.Name.Location : NoLocation.Singleton);
Symbols\ConstraintsHelper.cs (2)
106diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportByRefLikeGenerics, location); 118diagnostics.Add(ErrorCode.ERR_ClassIsCombinedWithRefStruct, typeParameter.GetFirstLocation());
Symbols\Extensions\SynthesizedExtensionMarker.cs (1)
83diagnostics.Add(ErrorCode.ERR_ReceiverParameterOnlyOne, parameterList.Parameters[parameterIndex].GetLocation());
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (3)
75diagnostics.Add(ErrorCode.ERR_NoVoidHere, returnTypeParameter.Location); 119diagnostics.Add(ErrorCode.ERR_CannotSpecifyManagedWithUnmanagedSpecifiers, callingConventionSyntax.UnmanagedCallingConventionList.GetLocation()); 233diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportUnmanagedDefaultCallConv, errorLocation);
Symbols\MethodSymbol.cs (2)
1060diagnostics?.Add(ErrorCode.ERR_UnmanagedCallersOnlyRequiresStatic, node!.Location); 1066diagnostics?.Add(ErrorCode.ERR_UnmanagedCallersOnlyMethodOrTypeCannotBeGeneric, node!.Location);
Symbols\Source\ExplicitInterfaceHelpers.cs (2)
231diagnostics.Add(ErrorCode.WRN_NullabilityMismatchInExplicitlyImplementedInterface, location); 406diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportStaticAbstractMembersInInterfaces, implementingMember.GetFirstLocation());
Symbols\Source\ExtensionGroupingInfo.cs (1)
477diagnostics.Add(ErrorCode.ERR_ExtensionBlockCollision, extension.GetFirstLocation());
Symbols\Source\FieldSymbolWithAttributesAndModifiers.cs (5)
185diagnostics.Add(ErrorCode.ERR_StructOffsetOnBadField, arguments.AttributeSyntaxOpt.Name.Location); 282diagnostics.Add(ErrorCode.ERR_FieldHasMultipleDistinctConstantValues, arguments.AttributeSyntaxOpt.Location); 287diagnostics.Add(ErrorCode.ERR_FieldHasMultipleDistinctConstantValues, arguments.AttributeSyntaxOpt.Location); 303diagnostics.Add(ErrorCode.ERR_FieldHasMultipleDistinctConstantValues, arguments.AttributeSyntaxOpt.Location); 334diagnostics.Add(ErrorCode.ERR_StructOffsetOnBadStruct, allAttributeSyntaxNodes[i].Name.Location);
Symbols\Source\LambdaSymbol.cs (1)
313addTo.Add(ErrorCode.ERR_BuilderAttributeDisallowed, DiagnosticLocation);
Symbols\Source\LocalFunctionSymbol.cs (2)
223diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, arglistToken.GetLocation()); 447diagnostics.Add(ErrorCode.ERR_IllegalVarianceSyntax, parameter.VarianceKeyword.GetLocation());
Symbols\Source\ModifierUtils.cs (4)
138diagnostics.Add(ErrorCode.ERR_PartialMisplaced, partialToken.GetLocation()); 143diagnostics.Add(ErrorCode.ERR_PartialMisplaced, errorLocation); 509diagnostics.Add(ErrorCode.ERR_BadMemberProtection, errorLocation); 525diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportProtectedAccessForInterfaceMember, errorLocation);
Symbols\Source\ParameterHelpers.cs (17)
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()); 627diagnostics.Add(ErrorCode.ERR_ThisInBadContext, modifier.GetLocation()); 639diagnostics.Add(ErrorCode.ERR_BadParamModThis, modifier.GetLocation()); 709diagnostics.Add(ErrorCode.ERR_IllegalParams, modifier.GetLocation()); 717diagnostics.Add(ErrorCode.ERR_BadParamModThis, modifier.GetLocation()); 787diagnostics.Add(ErrorCode.ERR_ScopedAfterInOutRefReadonly, modifier.GetLocation()); 878diagnostics.Add(ErrorCode.ERR_IllegalParams, paramsKeyword.GetLocation()); 902diagnostics.Add(ErrorCode.ERR_DefaultValueBeforeRequiredValue, loc); 915diagnostics.Add(ErrorCode.ERR_ParamsLast, syntax.GetLocation()); 952diagnostics.Add(ErrorCode.ERR_ExtensionParameterDisallowsDefaultValue, parameterSyntax.GetLocation()); 970diagnostics.Add(ErrorCode.ERR_RefOutDefaultValue, refnessKeyword.GetLocation()); 976diagnostics.Add(ErrorCode.ERR_DefaultValueForParamsParameter, paramsKeyword.GetLocation()); 986diagnostics.Add(ErrorCode.ERR_DefaultValueForExtensionParameter, thisKeyword.GetLocation());
Symbols\Source\SourceAssemblySymbol.cs (10)
599diagnostics.Add(ErrorCode.WRN_DelaySignButNoKey, NoLocation.Singleton); 606diagnostics.Add(ErrorCode.ERR_PublicSignNetModule, NoLocation.Singleton); 610diagnostics.Add(ErrorCode.ERR_PublicSignButNoKey, NoLocation.Singleton); 2215diagnostics.Add(ErrorCode.ERR_InvalidFwdType, GetAssemblyAttributeLocationForDiagnostic(arguments.AttributeSyntaxOpt)); 2246diagnostics.Add(ErrorCode.ERR_InvalidFwdType, GetAssemblyAttributeLocationForDiagnostic(arguments.AttributeSyntaxOpt)); 2284diagnostics.Add(ErrorCode.ERR_CannotPassNullForFriendAssembly, GetAssemblyAttributeLocationForDiagnostic(nodeOpt)); 2384diagnostics.Add(ErrorCode.ERR_InvalidSignaturePublicKey, attribute.GetAttributeArgumentLocation(0)); 2439diagnostics.Add(ErrorCode.ERR_InvalidAssemblyCultureForExe, attribute.GetAttributeArgumentLocation(0)); 2443diagnostics.Add(ErrorCode.ERR_InvalidAssemblyCulture, attribute.GetAttributeArgumentLocation(0)); 2569diagnostics.Add(ErrorCode.ERR_ExplicitExtension, arguments.AttributeSyntaxOpt.Location);
Symbols\Source\SourceComplexParameterSymbol.cs (23)
792diagnostics.Add(ErrorCode.ERR_DefaultValueUsedWithAttributes, arguments.AttributeSyntaxOpt.Name.Location); 798diagnostics.Add(ErrorCode.ERR_ExplicitParamArrayOrCollection, arguments.AttributeSyntaxOpt.Name.Location); 894diagnostics.Add(ErrorCode.WRN_UnscopedRefAttributeOldRules, arguments.AttributeSyntaxOpt.Location); 899diagnostics.Add(ErrorCode.ERR_UnscopedRefAttributeUnsupportedTarget, arguments.AttributeSyntaxOpt.Location); 903diagnostics.Add(ErrorCode.ERR_UnscopedScoped, arguments.AttributeSyntaxOpt.Location); 958diagnostics.Add(ErrorCode.ERR_ParamDefaultValueDiffersFromAttribute, syntax.Location); 991diagnosticsOpt.Add(ErrorCode.ERR_DefaultValueUsedWithAttributes, node.Name.Location); 1029diagnosticsOpt.Add(ErrorCode.ERR_DefaultValueTypeMustMatch, node.Name.Location); 1049diagnosticsOpt.Add(ErrorCode.ERR_DefaultValueTypeMustMatch, node.Name.Location); 1110diagnostics.Add(ErrorCode.ERR_BadCallerLineNumberParamWithoutDefaultValue, node.Name.Location); 1138diagnostics.Add(ErrorCode.ERR_BadCallerFilePathParamWithoutDefaultValue, node.Name.Location); 1171diagnostics.Add(ErrorCode.ERR_BadCallerMemberNameParamWithoutDefaultValue, node.Name.Location); 1212diagnostics.Add(ErrorCode.ERR_BadCallerArgumentExpressionParamWithoutDefaultValue, node.Name.Location); 1303diagnostics.Add(ErrorCode.WRN_InterpolatedStringHandlerArgumentAttributeIgnoredOnLambdaParameters, arguments.AttributeSyntaxOpt.Location); 1309diagnostics.Add(ErrorCode.ERR_InterpolatedStringHandlerArgumentDisallowed, arguments.AttributeSyntaxOpt.Location); 1337diagnostics.Add(ErrorCode.ERR_NullInvalidInterpolatedStringHandlerArgumentName, arguments.AttributeSyntaxOpt!.Location); 1378diagnostics.Add(ErrorCode.ERR_NullInvalidInterpolatedStringHandlerArgumentName, arguments.AttributeSyntaxOpt.Location); 1428diagnostics.Add(ErrorCode.ERR_CannotUseSelfAsInterpolatedStringHandlerArgument, arguments.AttributeSyntaxOpt.Location); 1468diagnostics.Add(ErrorCode.ERR_OutAttrOnRefParam, this.GetFirstLocation()); 1475diagnostics.Add(ErrorCode.ERR_InAttrOnOutParam, this.GetFirstLocation()); 1482diagnostics.Add(ErrorCode.ERR_OutAttrOnInParam, this.GetFirstLocation()); 1489diagnostics.Add(ErrorCode.ERR_OutAttrOnRefReadonlyParam, this.GetFirstLocation()); 1748diagnostics.Add(ErrorCode.ERR_ParamsMustBeCollection, ParameterSyntax.Modifiers.First(static m => m.IsKind(SyntaxKind.ParamsKeyword)).GetLocation());
Symbols\Source\SourceConstructorSymbol.cs (6)
58diagnostics.Add(ErrorCode.ERR_MemberNeedsType, location); 201diagnostics.Add(ErrorCode.ERR_ConstructorInStaticClass, location); 205diagnostics.Add(ErrorCode.ERR_PartialMemberOnlyInPartialClass, location); 311diagnostics.Add(ErrorCode.ERR_PartialMemberUnsafeDifference, implementation.GetFirstLocation()); 316diagnostics.Add(ErrorCode.ERR_PartialMemberParamsDifference, implementation.GetFirstLocation()); 322diagnostics.Add(ErrorCode.ERR_PartialMemberAccessibilityDifference, implementation.GetFirstLocation());
Symbols\Source\SourceConstructorSymbolBase.cs (1)
76diagnostics.Add(ErrorCode.ERR_BadVarargs, location);
Symbols\Source\SourceCustomEventAccessorSymbol.cs (1)
55diagnostics.Add(ErrorCode.ERR_NoModifiersOnAccessor, syntax.Modifiers[0].GetLocation());
Symbols\Source\SourceCustomEventSymbol.cs (6)
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()); 144diagnostics.Add(ErrorCode.ERR_ExplicitEventFieldImpl, this.GetFirstLocation()); 155diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportDefaultInterfaceImplementation, this.GetFirstLocation());
Symbols\Source\SourceDelegateMethodSymbol.cs (1)
283diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, new SourceLocation(arglistToken));
Symbols\Source\SourceDestructorSymbol.cs (3)
34diagnostics.Add(ErrorCode.ERR_BadDestructorName, syntax.Identifier.GetLocation()); 54diagnostics.Add(ErrorCode.ERR_DestructorInStaticClass, location); 58diagnostics.Add(ErrorCode.ERR_OnlyClassesCanContainDestructors, location);
Symbols\Source\SourceEventSymbol.cs (10)
370diagnostics.Add(ErrorCode.ERR_UnscopedRefAttributeUnsupportedMemberTarget, arguments.AttributeSyntaxOpt!.Location); 374diagnostics.Add(ErrorCode.ERR_RequiresUnsafeAttributeInSource, arguments.AttributeSyntaxOpt!.Location); 643diagnostics.Add(ErrorCode.ERR_PartialMemberOnlyInPartialClass, location); 647diagnostics.Add(ErrorCode.ERR_PartialMemberNotExplicit, location); 651diagnostics.Add(ErrorCode.ERR_PartialMemberCannotBeAbstract, location); 910diagnostics.Add(ErrorCode.ERR_PartialMemberTypeDifference, implementation.GetFirstLocation()); 925diagnostics.Add(ErrorCode.ERR_PartialMemberStaticDifference, implementation.GetFirstLocation()); 930diagnostics.Add(ErrorCode.ERR_PartialMemberUnsafeDifference, implementation.GetFirstLocation()); 936diagnostics.Add(ErrorCode.ERR_PartialMemberAccessibilityDifference, implementation.GetFirstLocation()); 944diagnostics.Add(ErrorCode.ERR_PartialMemberExtendedModDifference, implementation.GetFirstLocation());
Symbols\Source\SourceFieldLikeEventSymbol.cs (3)
99diagnostics.Add(ErrorCode.ERR_FieldlikeEventsInRoStruct, this.GetFirstLocation()); 108diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportStaticAbstractMembersInInterfaces, this.GetFirstLocation()); 121diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportDefaultInterfaceImplementation, this.GetFirstLocation());
Symbols\Source\SourceFieldSymbol.cs (2)
70diagnostics.Add(ErrorCode.ERR_FieldsInRoStruct, ErrorLocation); 126((BindingDiagnosticBag)arguments.Diagnostics).Add(ErrorCode.ERR_DoNotUseFixedBufferAttr, arguments.AttributeSyntaxOpt.Name.Location);
Symbols\Source\SourceFixedFieldSymbol.cs (2)
81diagnostics.Add(ErrorCode.ERR_FixedBufferTooManyDimensions, declarator.ArgumentList.Location); 121diagnostics.Add(ErrorCode.ERR_InvalidFixedArraySize, sizeExpression.Location);
Symbols\Source\SourceMemberContainerSymbol.cs (25)
382diagnostics.Add(ErrorCode.WRN_UnsafeMeaningless, GetFirstLocation()); 1981diagnostics.Add(ErrorCode.ERR_InstanceFieldInUnion, field.GetFirstLocation()); 1989diagnostics.Add(ErrorCode.ERR_InstanceCtorWithOneParameterInUnion, ctor.GetFirstLocation()); 2038diagnostics.Add(ErrorCode.ERR_CloneDisallowedInRecord, member.GetFirstLocation()); 2389diagnostics.Add(ErrorCode.ERR_InconsistentIndexerNames, indexer.GetFirstLocation()); 2989diagnostics.Add(ErrorCode.ERR_ScriptsAndSubmissionsCannotHaveRequiredMembers, member.GetFirstLocation()); 4005diagnostics.Add(ErrorCode.ERR_ConstructorInStaticClass, syntax.Identifier.GetLocation()); 4020diagnostics.Add(ErrorCode.ERR_MultipleRecordParameterLists, parameterList.Location); 4186diagnostics.Add(ErrorCode.ERR_PartialMethodOnlyOneActual, currentMethod.GetFirstLocation()); 4192diagnostics.Add(ErrorCode.ERR_PartialMethodOnlyOneLatent, currentMethod.GetFirstLocation()); 4205diagnostics.Add(ErrorCode.ERR_PartialPropertyDuplicateImplementation, currentProperty.GetFirstLocation()); 4210diagnostics.Add(ErrorCode.ERR_PartialPropertyDuplicateDefinition, currentProperty.GetFirstLocation()); 4216diagnostics.Add(ErrorCode.ERR_PartialPropertyDuplicateInitializer, currentProperty.GetFirstLocation()); 4648diagnostics.Add(ErrorCode.ERR_InterfacesCantContainConstructors, member.GetFirstLocation()); 4655diagnostics.Add(ErrorCode.ERR_OnlyClassesCanContainDestructors, member.GetFirstLocation()); 4696diagnostics.Add(ErrorCode.ERR_ExtensionDisallowsMember, member.GetFirstLocation()); 4761diagnostics.Add(ErrorCode.ERR_EnumsCantContainDefaultConstructor, location); 4768diagnostics.Add(ErrorCode.ERR_NonPublicParameterlessStructConstructor, location); 4800diagnostics.Add(ErrorCode.ERR_StructHasInitializersAndNoDeclaredConstructor, GetFirstLocation()); 4874diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, parameterSyntax.Identifier.GetLocation()); 4923diagnostics.Add(ErrorCode.ERR_UnionDeclarationNeedsCaseTypes, valuePropertySyntax.Identifier.GetLocation()); 5109diagnostics.Add(ErrorCode.ERR_RecordAmbigCtor, copyCtor.GetFirstLocation()); 5118diagnostics.Add(ErrorCode.ERR_RecordAmbigCtor, this.GetFirstLocation()); 5981diagnostics.Add(ErrorCode.ERR_GlobalStatement, new SourceLocation(globalStatement)); 6007diagnostics.Add(errorCode, new SourceLocation(locationSyntax));
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (3)
990(diagnostics, overriddenEvent, overridingEvent, location) => diagnostics.Add(ErrorCode.WRN_NullabilityMismatchInTypeOnOverride, location), 1050diagnostics.Add(ErrorCode.ERR_OverrideFinalizeDeprecated, overridingMemberLocation); 1254=> diagnostics.Add(topLevel ?
Symbols\Source\SourceMemberFieldSymbol.cs (11)
61diagnostics.Add(ErrorCode.ERR_FieldCantHaveVoidType, getTypeErrorLocation()); 201diagnostics.Add(ErrorCode.ERR_AbstractField, errorLocation); 383diagnostics.Add(ErrorCode.ERR_InterfacesCantContainFields, ErrorLocation); 506diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportRefFields, ErrorLocation); 509diagnostics.Add(ErrorCode.ERR_RefFieldInNonRefStruct, ErrorLocation); 512diagnostics.Add(ErrorCode.ERR_RefFieldCannotReferToRefStruct, typeSyntax.SkipScoped(out _).Location); 526diagnosticsForFirstDeclarator.Add(ErrorCode.ERR_ImplicitlyTypedVariableCannotBeConst, typeSyntax.Location); 536diagnosticsForFirstDeclarator.Add(ErrorCode.ERR_ImplicitlyTypedVariableMultipleDeclarator, typeSyntax.Location); 576diagnostics.Add(ErrorCode.ERR_FixedNotInStruct, ErrorLocation); 581diagnostics.Add(ErrorCode.ERR_FixedFieldMustNotBeRef, ErrorLocation); 589diagnostics.Add(ErrorCode.ERR_IllegalFixedType, loc);
Symbols\Source\SourceMemberMethodSymbol.cs (3)
1066diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportDefaultInterfaceImplementation, location); 1072diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportStaticAbstractMembersInInterfaces, location); 1085diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportProtectedAccessForInterfaceMember, location);
Symbols\Source\SourceMethodSymbol.cs (2)
71diagnostics.Add(ErrorCode.ERR_BadAsyncArgType, getLocation(parameter, location, isExtensionParameter)); 76diagnostics.Add(ErrorCode.ERR_UnsafeAsyncArgType, getLocation(parameter, location, isExtensionParameter));
Symbols\Source\SourceMethodSymbolWithAttributes.cs (21)
619diagnostics.Add(ErrorCode.WRN_UnscopedRefAttributeOldRules, arguments.AttributeSyntaxOpt.Location); 633diagnostics.Add(ErrorCode.ERR_UnscopedRefAttributeUnsupportedMemberTarget, arguments.AttributeSyntaxOpt.Location); 638diagnostics.Add(ErrorCode.ERR_RequiresUnsafeAttributeInSource, arguments.AttributeSyntaxOpt.Location); 741diagnostics.Add(ErrorCode.ERR_ConditionalOnInterfaceMethod, node.Location); 844diagnostics.Add(ErrorCode.ERR_DllImportOnInvalidMethod, arguments.AttributeSyntaxOpt.Name.Location); 860diagnostics.Add(ErrorCode.ERR_DllImportOnGenericMethod, arguments.AttributeSyntaxOpt.Name.Location); 964diagnostics.Add(ErrorCode.ERR_ModuleInitializerMethodMustBeOrdinary, arguments.AttributeSyntaxOpt.Location); 996diagnostics.Add(ErrorCode.ERR_ModuleInitializerCannotBeUnmanagedCallersOnly, arguments.AttributeSyntaxOpt.Location); 1039diagnostics.Add(ErrorCode.ERR_InterceptsLocationDataInvalidFormat, attributeLocation); 1154diagnostics.Add(ErrorCode.ERR_InterceptorGlobalNamespace, attributeLocation); 1174diagnostics.Add(ErrorCode.WRN_InterceptsLocationAttributeUnsupportedSignature, attributeLocation); 1194diagnostics.Add(ErrorCode.ERR_InterceptorFilePathCannotBeNull, attributeData.GetAttributeArgumentLocation(filePathParameterIndex)); 1262diagnostics.Add(ErrorCode.ERR_InterceptorLineCharacterMustBePositive, location); 1374diagnostics.Add(ErrorCode.ERR_InterceptorMethodMustBeOrdinary, attributeLocation); 1382diagnostics.Add(ErrorCode.ERR_InterceptorCannotUseUnmanagedCallersOnly, attributeLocation); 1421diagnostics.Add(ErrorCode.ERR_CannotUseRefInUnmanagedCallersOnly, syntax.Location); 1496diagnostics.Add(ErrorCode.ERR_ComImportWithUserCtor, this.GetFirstLocation()); 1557diagnostics.Add(ErrorCode.ERR_BadAsyncReturn, errorLocation); 1577diagnostics.Add(ErrorCode.ERR_SecurityCriticalOrSecuritySafeCriticalOnAsyncInClassOrStruct, errorLocation); 1586diagnostics.Add(ErrorCode.ERR_SynchronizedAsyncMethod, errorLocation); 1612diagnostics.Add(ErrorCode.ERR_MultipleEnumeratorCancellationAttributes, errorLocation);
Symbols\Source\SourceNamedTypeSymbol.cs (20)
197diagnostics.Add(ErrorCode.ERR_IllegalVarianceSyntax, tp.VarianceKeyword.GetLocation()); 1180diagnostics.Add(ErrorCode.ERR_CantUseRequiredAttribute, arguments.AttributeSyntaxOpt.Name.Location); 1211diagnostics.Add(ErrorCode.ERR_CollectionBuilderAttributeInvalidType, arguments.AttributeSyntaxOpt.Name.Location); 1221diagnostics.Add(ErrorCode.ERR_CollectionBuilderAttributeInvalidMethodName, arguments.AttributeSyntaxOpt.Name.Location); 1234diagnostics.Add(ErrorCode.ERR_InvalidInlineArrayLength, attribute.GetAttributeArgumentLocation(0)); 1243diagnostics.Add(ErrorCode.ERR_InlineArrayAttributeOnRecord, arguments.AttributeSyntaxOpt.Name.Location); 1664diagnostics.Add(ErrorCode.ERR_ComImportWithoutUuidAttribute, allAttributeSyntaxNodes[index].Name.Location); 1721diagnostics.Add(ErrorCode.ERR_DefaultMemberOnIndexedType, allAttributeSyntaxNodes[index].Name.Location); 1969diagnostics.Add(ErrorCode.ERR_StructLayoutAndExtendedLayout, GetFirstLocation()); 1976diagnostics.Add(ErrorCode.ERR_InvalidInlineArrayLayout, GetFirstLocation()); 1985diagnostics.Add(ErrorCode.ERR_InlineArrayUnsupportedElementFieldModifier, elementField.TryGetFirstLocation() ?? GetFirstLocation()); 1999diagnostics.Add(ErrorCode.WRN_InlineArrayIndexerNotUsed, indexer.TryGetFirstLocation() ?? GetFirstLocation()); 2007diagnostics.Add(ErrorCode.WRN_InlineArraySliceNotUsed, slice.TryGetFirstLocation() ?? GetFirstLocation()); 2030diagnostics.Add(ErrorCode.WRN_InlineArrayConversionOperatorNotUsed, conversion.TryGetFirstLocation() ?? GetFirstLocation()); 2039diagnostics.Add(ErrorCode.WRN_InlineArrayNotSupportedByLanguage, elementField.TryGetFirstLocation() ?? GetFirstLocation()); 2043diagnostics.Add(ErrorCode.WRN_InlineArrayNotSupportedByLanguage, GetFirstLocation()); 2049diagnostics.Add(ErrorCode.ERR_InvalidInlineArrayFields, GetFirstLocation()); 2054diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportInlineArrayTypes, GetFirstLocation()); 2062diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportExtendedLayoutTypes, GetFirstLocation()); 2091diagnostics.Add(ErrorCode.ERR_EmbeddedAttributeMustFollowPattern, GetFirstLocation());
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (6)
132diagnostics.Add(ErrorCode.ERR_BadRecordBase, baseLocation); 137diagnostics.Add(ErrorCode.ERR_BadInheritanceFromRecord, baseLocation); 484diagnostics.Add(ErrorCode.ERR_BadBaseType, typeSyntax.GetLocation()); 647diagnostics.Add(ErrorCode.ERR_ObjectCantHaveBases, new SourceLocation(name)); 658diagnostics.Add(ErrorCode.ERR_UnexpectedArgumentList, primaryConstructorBaseType.ArgumentList.Location); 662diagnostics.Add(ErrorCode.ERR_UnexpectedArgumentListInBaseTypeWithoutParameterList, primaryConstructorBaseType.ArgumentList.Location);
Symbols\Source\SourceNamedTypeSymbol_Enum.cs (1)
68diagnostics.Add(ErrorCode.ERR_IntegralTypeExpected, typeSyntax.Location);
Symbols\Source\SourceNamespaceSymbol.cs (1)
375diagnostics.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 (17)
241diagnostics.Add(ErrorCode.ERR_BadExtensionAgg, loc); 245diagnostics.Add(ErrorCode.ERR_BadExtensionMeth, _location); 494diagnostics.Add(ErrorCode.ERR_PartialMethodReturnTypeDifference, implementation.GetFirstLocation()); 504diagnostics.Add(ErrorCode.ERR_PartialMemberRefReturnDifference, implementation.GetFirstLocation()); 509diagnostics.Add(ErrorCode.ERR_PartialMemberStaticDifference, implementation.GetFirstLocation()); 514diagnostics.Add(ErrorCode.ERR_PartialMemberReadOnlyDifference, implementation.GetFirstLocation()); 519diagnostics.Add(ErrorCode.ERR_PartialMethodExtensionDifference, implementation.GetFirstLocation()); 524diagnostics.Add(ErrorCode.ERR_PartialMemberUnsafeDifference, implementation.GetFirstLocation()); 529diagnostics.Add(ErrorCode.ERR_PartialMemberParamsDifference, implementation.GetFirstLocation()); 535diagnostics.Add(ErrorCode.ERR_PartialMemberAccessibilityDifference, implementation.GetFirstLocation()); 543diagnostics.Add(ErrorCode.ERR_PartialMemberExtendedModDifference, implementation.GetFirstLocation()); 571diagnostics.Add(ErrorCode.WRN_NullabilityMismatchInReturnTypeOnPartial, implementingMethod.GetFirstLocation()); 855diagnostics.Add(ErrorCode.ERR_PartialMemberCannotBeAbstract, location); 932diagnostics.Add(ErrorCode.ERR_BadAsyncLacksBody, location); 948diagnostics.Add(ErrorCode.ERR_BadVarargs, location); 952diagnostics.Add(ErrorCode.ERR_VarargsAsync, location); 1166diagnostics.Add(ErrorCode.ERR_IllegalVarianceSyntax, parameter.VarianceKeyword.GetLocation());
Symbols\Source\SourcePropertyAccessorSymbol.cs (4)
624diagnostics.Add(ErrorCode.ERR_BadInitAccessor, location); 887diagnostics.Add(ErrorCode.ERR_PartialMemberAccessibilityDifference, implementationAccessor.GetFirstLocation()); 892diagnostics.Add(ErrorCode.ERR_PartialMemberReadOnlyDifference, implementationAccessor.GetFirstLocation()); 897diagnostics.Add(ErrorCode.ERR_PartialMemberUnsafeDifference, implementationAccessor.GetFirstLocation());
Symbols\Source\SourcePropertySymbol.cs (17)
263diagnostics.Add(ErrorCode.ERR_DuplicateAccessor, accessor.Keyword.GetLocation()); 276diagnostics.Add(ErrorCode.ERR_DuplicateAccessor, accessor.Keyword.GetLocation()); 281diagnostics.Add(ErrorCode.ERR_GetOrSetExpected, accessor.Keyword.GetLocation()); 607diagnostics.Add(ErrorCode.ERR_IndexerCantHaveVoidType, Location); 628diagnostics.Add(ErrorCode.ERR_IndexerNeedsParam, parameterSyntaxOpt.GetLastToken().GetLocation()); 641diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, arglistToken.GetLocation()); 698diagnostics.Add(ErrorCode.ERR_ValueParameterSameNameAsExtensionTypeParameter, setter.GetFirstLocationOrNone()); 703diagnostics.Add(ErrorCode.ERR_ValueParameterSameNameAsExtensionParameter, setter.GetFirstLocationOrNone()); 737diagnostics.Add(ErrorCode.ERR_PartialMemberTypeDifference, implementation.GetFirstLocation()); 748diagnostics.Add(ErrorCode.ERR_PartialMemberRefReturnDifference, implementation.GetFirstLocation()); 761diagnostics.Add(ErrorCode.ERR_PartialPropertyRequiredDifference, implementation.GetFirstLocation()); 766diagnostics.Add(ErrorCode.ERR_PartialMemberStaticDifference, implementation.GetFirstLocation()); 771diagnostics.Add(ErrorCode.ERR_PartialMemberReadOnlyDifference, implementation.GetFirstLocation()); 776diagnostics.Add(ErrorCode.ERR_PartialMemberUnsafeDifference, implementation.GetFirstLocation()); 781diagnostics.Add(ErrorCode.ERR_PartialMemberParamsDifference, implementation.GetFirstLocation()); 787diagnostics.Add(ErrorCode.ERR_PartialMemberAccessibilityDifference, implementation.GetFirstLocation()); 795diagnostics.Add(ErrorCode.ERR_PartialMemberExtendedModDifference, implementation.GetFirstLocation());
Symbols\Source\SourcePropertySymbolBase.cs (18)
309diagnostics.Add(ErrorCode.ERR_InstancePropertyInitializerInInterface, Location); 313diagnostics.Add(ErrorCode.ERR_InitializerOnNonAutoProperty, Location); 886diagnostics.Add(ErrorCode.ERR_RefReturningPropertiesCannotBeRequired, Location); 895diagnostics.Add(ErrorCode.ERR_AutoPropsInRoStruct, Location); 909diagnostics.Add(ErrorCode.ERR_AutoPropertyCannotBeRefReturning, Location); 919diagnostics.Add(ErrorCode.ERR_AutoPropertyMustOverrideSet, Location); 931diagnostics.Add(ErrorCode.ERR_InterfacesCantContainFields, Location); 946diagnostics.Add(ErrorCode.ERR_RefPropertyCannotHaveSetAccessor, _setMethod.GetFirstLocation()); 975diagnostics.Add(ErrorCode.ERR_RefPropertyMustHaveGetAccessor, Location); 983diagnostics.Add(ErrorCode.ERR_AutoPropertyMustHaveGetAccessor, _setMethod!.GetFirstLocation()); 1116diagnostics.Add(ErrorCode.ERR_PartialMemberOnlyInPartialClass, location); 1120diagnostics.Add(ErrorCode.ERR_PartialMemberNotExplicit, location); 1124diagnostics.Add(ErrorCode.ERR_PartialMemberCannotBeAbstract, location); 1575diagnostics.Add(ErrorCode.ERR_ExplicitDynamicAttr, arguments.AttributeSyntaxOpt.Location); 1620diagnostics.Add(ErrorCode.WRN_UnscopedRefAttributeOldRules, arguments.AttributeSyntaxOpt.Location); 1634diagnostics.Add(ErrorCode.ERR_UnscopedRefAttributeUnsupportedMemberTarget, arguments.AttributeSyntaxOpt.Location); 1639diagnostics.Add(ErrorCode.ERR_RequiresUnsafeAttributeInSource, arguments.AttributeSyntaxOpt.Location); 1761diagnostics.Add(ErrorCode.ERR_InsufficientStack, node.ArgumentList.Arguments[0].Location);
Symbols\Source\SourceUserDefinedConversionSymbol.cs (2)
35diagnostics.Add(ErrorCode.ERR_ImplicitConversionOperatorCantBeChecked, syntax.CheckedKeyword.GetLocation()); 83diagnostics.Add(ErrorCode.ERR_OvlUnaryOperatorExpected, syntax.ParameterList.GetLocation());
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (17)
67diagnostics.Add(ErrorCode.ERR_InterfacesCantContainConversionOrEqualityOperators, this.GetFirstLocation()); 83diagnostics.Add(ErrorCode.ERR_OperatorInExtensionOfStaticClass, location); 337diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, new SourceLocation(arglistToken)); 410diagnostics.Add(ErrorCode.ERR_InstanceOperatorStructExtensionWrongReceiverRefKind, _location); 419diagnostics.Add(ErrorCode.ERR_InstanceOperatorStructExtensionWrongReceiverRefKind, _location); 423diagnostics.Add(ErrorCode.ERR_InstanceOperatorExtensionWrongReceiverType, _location); 475diagnostics.Add(ErrorCode.ERR_IllegalRefParam, this.GetFirstLocation()); 565diagnostics.Add(ErrorCode.ERR_OperatorMustReturnVoid, this.GetFirstLocation()); 662diagnostics.Add(IsInInterfaceAndAbstractOrVirtual() ? ErrorCode.ERR_AbstractConversionNotInvolvingContainedType : ErrorCode.ERR_ConversionNotInvolvingContainedType, this.GetFirstLocation()); 673diagnostics.Add(ErrorCode.ERR_IdentityConversion, this.GetFirstLocation()); 786diagnostics.Add(ErrorCode.ERR_OperatorCantReturnVoid, this.GetFirstLocation()); 804diagnostics.Add(IsInInterfaceAndAbstractOrVirtual() ? 821diagnostics.Add(ErrorCode.ERR_OpTFRetType, this.GetFirstLocation()); 873diagnostics.Add(IsInInterfaceAndAbstractOrVirtual() ? 887diagnostics.Add(IsInInterfaceAndAbstractOrVirtual() ? ErrorCode.ERR_BadAbstractIncDecRetType : ErrorCode.ERR_BadIncDecRetType, this.GetFirstLocation()); 948diagnostics.Add(IsInInterfaceAndAbstractOrVirtual() ? 970diagnostics.Add(IsInInterfaceAndAbstractOrVirtual() ?
Symbols\Symbol.cs (7)
1518diagnostics.Add(ErrorCode.ERR_BlockBodyAndExpressionBody, syntax.GetLocation()); 1554diagnostics.Add(ErrorCode.ERR_ExplicitDynamicAttr, arguments.AttributeSyntaxOpt.Location); 1575diagnostics.Add(ErrorCode.ERR_ExplicitTupleElementNamesAttribute, arguments.AttributeSyntaxOpt.Location); 1581diagnostics.Add(ErrorCode.ERR_ExplicitNullableAttribute, arguments.AttributeSyntaxOpt.Location); 1599diagnostics.Add(ErrorCode.ERR_ExplicitExtension, arguments.AttributeSyntaxOpt.Location); 1605diagnostics.Add(ErrorCode.ERR_ExplicitRequiredMember, arguments.AttributeSyntaxOpt.Location); 1611diagnostics.Add(ErrorCode.ERR_ExplicitScopedRef, arguments.AttributeSyntaxOpt.Location);
Symbols\Symbol_Attributes.cs (2)
741diagnostics.Add(ErrorCode.ERR_GlobalAttributesNotAllowed, targetOpt.Identifier.GetLocation()); 913diagnostics.Add(ErrorCode.ERR_AttributesNotAllowed, node.Name.Location);
Symbols\Synthesized\SynthesizedBackingFieldSymbol.cs (1)
259((BindingDiagnosticBag)arguments.Diagnostics).Add(ErrorCode.ERR_DoNotUseFixedBufferAttrOnProperty, arguments.AttributeSyntaxOpt.Name.Location);
Symbols\VarianceSafety.cs (1)
95diagnostics.Add(ErrorCode.ERR_VarianceInterfaceNesting, member.GetFirstLocation());
Syntax\SyntaxNodeExtensions.cs (1)
339diagnostics.Add(ErrorCode.ERR_VarInvocationLvalueReserved, expression.GetLocation());