455 references to Add
Microsoft.CodeAnalysis.CSharp (455)
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)
1253_diagnostics.Add(ErrorCode.ERR_CollectionArgumentsMustBeEmpty, _node.WithElement.Syntax.GetFirstToken().GetLocation());
Binder\Binder_Crefs.cs (2)
748diagnostics.Add(ErrorCode.WRN_UnqualifiedNestedTypeInCref, parameterListSyntax.Parameters[i].Location); 1191diagnostics.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()); 878diagnostics.Add(ErrorCode.ERR_InternalError, node.Location); 921diagnostics.Add(ErrorCode.ERR_ThrowMisplaced, node.ThrowKeyword.GetLocation()); 1081diagnostics.Add(ErrorCode.ERR_VoidInTuple, argumentSyntax.Location); 1424diagnostics.Add(ErrorCode.ERR_BadDynamicTypeof, node.Location); 1430diagnostics.Add(ErrorCode.ERR_BadNullableTypeof, node.Location); 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); 5029diagnostics.Add(ErrorCode.ERR_NoDynamicPhantomOnBaseCtor, errorLocation); 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); 5339diagnostics.Add(ErrorCode.ERR_InvalidObjectCreation, node.Type.Location)); 5355diagnostics.Add(ErrorCode.ERR_InsufficientStack, syntax.Location); 5553diagnostics.Add(ErrorCode.ERR_MethodNameExpected, loc); 5629diagnostics.Add(ErrorCode.ERR_MethodNameExpected, argument.Syntax.Location); 5690diagnostics.Add(ErrorCode.ERR_MethodNameExpected, argument.Syntax.Location); 5716diagnostics.Add(ErrorCode.ERR_NewWithTupleTypeSyntax, node.Type.GetLocation()); 6136diagnostics.Add(ErrorCode.ERR_InterpolatedStringsReferencingInstanceCannotBeInObjectInitializers, argument.Syntax.Location); 9901diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportRefFields, node.Location); 11324diagnostics.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)
1703diagnostics.Add(ErrorCode.ERR_BadAttributeArgument, syntax.Location); 2415diagnostics.Add(ErrorCode.ERR_NameofMethodGroupWithTypeParameters, argument.Location); 2473diagnostics.Add(ErrorCode.ERR_NameofExtensionMethod, methodGroup.Syntax.Location); 2520diagnostics.Add(ErrorCode.ERR_AliasQualifiedNameNotAnExpression, argument.Location); 2535diagnostics.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)
5984diagnostics.Add(ErrorCode.ERR_RefConditionalNeedsTwoRefs, whenFalse.GetFirstToken().GetLocation()); 5989diagnostics.Add(ErrorCode.ERR_RefConditionalNeedsTwoRefs, whenTrue.GetFirstToken().GetLocation()); 6093diagnostics.Add(_inUnsafeRegion ? ErrorCode.WRN_MismatchedRefEscapeInTernary : ErrorCode.ERR_MismatchedRefEscapeInTernary, node.Location);
Binder\Binder_Patterns.cs (16)
149diagnostics.Add(ErrorCode.WRN_GivenExpressionNeverMatchesPattern, node.Location); 157diagnostics.Add(ErrorCode.WRN_GivenExpressionAlwaysMatchesConstant, node.Location); 165diagnostics.Add(ErrorCode.WRN_GivenExpressionAlwaysMatchesPattern, node.Location); 271diagnostics.Add(ErrorCode.ERR_MisplacedSlicePattern, node.Location); 596diagnostics.Add(ErrorCode.ERR_DefaultPattern, e.Location); 603diagnostics.Add(ErrorCode.ERR_IllegalSuppression, e.Location); 662diagnostics.Add(ErrorCode.ERR_ConstantExpected, patternExpression.Location); 883diagnostics.Add(ErrorCode.ERR_PointerTypeInPatternMatching, typeSyntax.Location); 1093diagnostics.Add(ErrorCode.ERR_DesignatorBeneathPatternCombinator, identifier.GetLocation()); 1160diagnostics.Add(ErrorCode.ERR_PointerTypeInPatternMatching, node.Location); 1326diagnostics.Add(ErrorCode.ERR_IdentifierExpected, subPattern.ExpressionColon.Expression.Location); 1358diagnostics.Add(ErrorCode.ERR_ArgumentNameInITuplePattern, subpatternSyntax.NameColon.Location); 1362diagnostics.Add(ErrorCode.ERR_IdentifierExpected, subpatternSyntax.ExpressionColon.Expression.Location); 1408diagnostics.Add(ErrorCode.ERR_IdentifierExpected, subpatternSyntax.ExpressionColon.Expression.Location); 1559diagnostics.Add(ErrorCode.ERR_PointerTypeInPatternMatching, node.Location); 2074diagnostics.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); 2271diagnostics.Add(ErrorCode.ERR_InternalError, syntax.Location); 3087diagnostics.Add(ErrorCode.ERR_ReturnInIterator, syntax.ReturnKeyword.GetLocation()); 3095diagnostics.Add(ErrorCode.ERR_MustNotHaveRefReturn, syntax.ReturnKeyword.GetLocation()); 3100diagnostics.Add(ErrorCode.ERR_ReturnInIterator, syntax.ReturnKeyword.GetLocation()); 3109diagnostics.Add(errorCode, syntax.ReturnKeyword.GetLocation()); 3315diagnostics.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\Binder.ValueChecks.cs (2)
1341diagnostics.Add(ErrorCode.ERR_RefLocalOrParamExpected, node.Location); 5572diagnostics.Add(ErrorCode.ERR_InternalError, node.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)
317diagnostics.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_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); 304diagnostics.Add(ErrorCode.WRN_CaseConstantNamedUnderscore, expression.Location);
Binder\SwitchBinder.cs (2)
451diagnostics.Add(ErrorCode.ERR_V6SwitchGoverningTypeValueExpected, node.Location); 530diagnostics.Add(ErrorCode.ERR_ConstantExpected, node.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)
1744diagnosticsForThisMethod.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)
629_diagnostics.Add(ErrorCode.ERR_ByRefParameterInExpressionTree, location); 638_diagnostics.Add(ErrorCode.ERR_LambdaWithAttributesToExpressionTree, p.GetFirstLocation());
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\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 (6)
191diagnostics.Add(ErrorCode.ERR_StructOffsetOnBadField, arguments.AttributeSyntaxOpt.Name.Location); 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);
Symbols\Source\LambdaSymbol.cs (1)
313addTo.Add(ErrorCode.ERR_BuilderAttributeDisallowed, DiagnosticLocation);
Symbols\Source\LocalFunctionSymbol.cs (4)
138addTo.Add(ErrorCode.ERR_ExternMemberRequiresUnsafeOrSafe, 151addTo.Add(ErrorCode.ERR_SafeModifierCannotBeUsedWithUnsafe, 242diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, arglistToken.GetLocation()); 467diagnostics.Add(ErrorCode.ERR_IllegalVarianceSyntax, parameter.VarianceKeyword.GetLocation());
Symbols\Source\ModifierUtils.cs (5)
124diagnostics.Add(ErrorCode.ERR_SafeModifierCannotBeUsedWithUnsafe, safeToken == default ? errorLocation : safeToken.GetLocation()); 154diagnostics.Add(ErrorCode.ERR_PartialMisplaced, partialToken.GetLocation()); 159diagnostics.Add(ErrorCode.ERR_PartialMisplaced, errorLocation); 533diagnostics.Add(ErrorCode.ERR_BadMemberProtection, errorLocation); 549diagnostics.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()); 617diagnostics.Add(ErrorCode.ERR_ThisInBadContext, modifier.GetLocation()); 629diagnostics.Add(ErrorCode.ERR_BadParamModThis, modifier.GetLocation()); 699diagnostics.Add(ErrorCode.ERR_IllegalParams, modifier.GetLocation()); 707diagnostics.Add(ErrorCode.ERR_BadParamModThis, modifier.GetLocation()); 777diagnostics.Add(ErrorCode.ERR_ScopedAfterInOutRefReadonly, modifier.GetLocation()); 868diagnostics.Add(ErrorCode.ERR_IllegalParams, paramsKeyword.GetLocation()); 892diagnostics.Add(ErrorCode.ERR_DefaultValueBeforeRequiredValue, loc); 905diagnostics.Add(ErrorCode.ERR_ParamsLast, syntax.GetLocation()); 942diagnostics.Add(ErrorCode.ERR_ExtensionParameterDisallowsDefaultValue, parameterSyntax.GetLocation()); 960diagnostics.Add(ErrorCode.ERR_RefOutDefaultValue, refnessKeyword.GetLocation()); 966diagnostics.Add(ErrorCode.ERR_DefaultValueForParamsParameter, paramsKeyword.GetLocation()); 976diagnostics.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)); 2403diagnostics.Add(ErrorCode.ERR_InvalidSignaturePublicKey, attribute.GetAttributeArgumentLocation(0)); 2458diagnostics.Add(ErrorCode.ERR_InvalidAssemblyCultureForExe, attribute.GetAttributeArgumentLocation(0)); 2462diagnostics.Add(ErrorCode.ERR_InvalidAssemblyCulture, attribute.GetAttributeArgumentLocation(0)); 2588diagnostics.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); 889diagnostics.Add(ErrorCode.WRN_UnscopedRefAttributeOldRules, arguments.AttributeSyntaxOpt.Location); 894diagnostics.Add(ErrorCode.ERR_UnscopedRefAttributeUnsupportedTarget, arguments.AttributeSyntaxOpt.Location); 898diagnostics.Add(ErrorCode.ERR_UnscopedScoped, arguments.AttributeSyntaxOpt.Location); 953diagnostics.Add(ErrorCode.ERR_ParamDefaultValueDiffersFromAttribute, syntax.Location); 986diagnosticsOpt.Add(ErrorCode.ERR_DefaultValueUsedWithAttributes, node.Name.Location); 1024diagnosticsOpt.Add(ErrorCode.ERR_DefaultValueTypeMustMatch, node.Name.Location); 1044diagnosticsOpt.Add(ErrorCode.ERR_DefaultValueTypeMustMatch, node.Name.Location); 1105diagnostics.Add(ErrorCode.ERR_BadCallerLineNumberParamWithoutDefaultValue, node.Name.Location); 1133diagnostics.Add(ErrorCode.ERR_BadCallerFilePathParamWithoutDefaultValue, node.Name.Location); 1166diagnostics.Add(ErrorCode.ERR_BadCallerMemberNameParamWithoutDefaultValue, node.Name.Location); 1207diagnostics.Add(ErrorCode.ERR_BadCallerArgumentExpressionParamWithoutDefaultValue, node.Name.Location); 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); 1423diagnostics.Add(ErrorCode.ERR_CannotUseSelfAsInterpolatedStringHandlerArgument, arguments.AttributeSyntaxOpt.Location); 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()); 1747diagnostics.Add(ErrorCode.ERR_ParamsMustBeCollection, ParameterSyntax.Modifiers.First(static m => m.IsKind(SyntaxKind.ParamsKeyword)).GetLocation());
Symbols\Source\SourceConstructorSymbol.cs (8)
58diagnostics.Add(ErrorCode.ERR_MemberNeedsType, location); 189diagnostics.Add(ErrorCode.ERR_UnsafeMeaningless, 209diagnostics.Add(ErrorCode.ERR_ConstructorInStaticClass, location); 213diagnostics.Add(ErrorCode.ERR_PartialMemberOnlyInPartialClass, location); 320diagnostics.Add(ErrorCode.ERR_PartialMemberUnsafeDifference, implementation.GetFirstLocation()); 325diagnostics.Add(ErrorCode.ERR_PartialMemberSafeDifference, implementation.GetFirstLocation()); 330diagnostics.Add(ErrorCode.ERR_PartialMemberParamsDifference, implementation.GetFirstLocation()); 336diagnostics.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)
285diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, new SourceLocation(arglistToken));
Symbols\Source\SourceDestructorSymbol.cs (4)
34diagnostics.Add(ErrorCode.ERR_BadDestructorName, syntax.Identifier.GetLocation()); 54diagnostics.Add(ErrorCode.ERR_DestructorInStaticClass, location); 58diagnostics.Add(ErrorCode.ERR_OnlyClassesCanContainDestructors, location); 147diagnostics.Add(ErrorCode.ERR_UnsafeMeaningless,
Symbols\Source\SourceEventSymbol.cs (12)
356diagnostics.Add(ErrorCode.ERR_RequiresUnsafeAttributeInSource, arguments.AttributeSyntaxOpt!.Location); 383diagnostics.Add(ErrorCode.ERR_UnscopedRefAttributeUnsupportedMemberTarget, arguments.AttributeSyntaxOpt!.Location); 652diagnostics.Add(ErrorCode.ERR_PartialMemberOnlyInPartialClass, location); 656diagnostics.Add(ErrorCode.ERR_PartialMemberNotExplicit, location); 660diagnostics.Add(ErrorCode.ERR_PartialMemberCannotBeAbstract, location); 885diagnostics.Add(ErrorCode.ERR_ExternMemberRequiresUnsafeOrSafe, 926diagnostics.Add(ErrorCode.ERR_PartialMemberTypeDifference, implementation.GetFirstLocation()); 941diagnostics.Add(ErrorCode.ERR_PartialMemberStaticDifference, implementation.GetFirstLocation()); 946diagnostics.Add(ErrorCode.ERR_PartialMemberUnsafeDifference, implementation.GetFirstLocation()); 951diagnostics.Add(ErrorCode.ERR_PartialMemberSafeDifference, implementation.GetFirstLocation()); 957diagnostics.Add(ErrorCode.ERR_PartialMemberAccessibilityDifference, implementation.GetFirstLocation()); 965diagnostics.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_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\SourceMemberContainerSymbol.cs (30)
393diagnostics.Add(ErrorCode.ERR_UnsafeMeaningless, GetFirstLocation()); 1996diagnostics.Add(ErrorCode.ERR_ClosedBadDerivedTypesProperty, location); 2005diagnostics.Add(ErrorCode.ERR_ClosedBadDerivedTypesProperty, location); 2091diagnostics.Add(ErrorCode.ERR_InstanceFieldInUnion, field.GetFirstLocation()); 2099diagnostics.Add(ErrorCode.ERR_InstanceCtorWithOneParameterInUnion, ctor.GetFirstLocation()); 2105diagnostics.Add(ErrorCode.ERR_MemberProviderInUnionDeclaration, location); 2113diagnostics.Add(ErrorCode.ERR_MissingUnionCaseTypes, location); 2118diagnostics.Add(ErrorCode.ERR_MissingUnionValueProperty, location); 2166diagnostics.Add(ErrorCode.ERR_CloneDisallowedInRecord, member.GetFirstLocation()); 2517diagnostics.Add(ErrorCode.ERR_InconsistentIndexerNames, indexer.GetFirstLocation()); 3117diagnostics.Add(ErrorCode.ERR_ScriptsAndSubmissionsCannotHaveRequiredMembers, member.GetFirstLocation()); 4133diagnostics.Add(ErrorCode.ERR_ConstructorInStaticClass, syntax.Identifier.GetLocation()); 4148diagnostics.Add(ErrorCode.ERR_MultipleRecordParameterLists, parameterList.Location); 4314diagnostics.Add(ErrorCode.ERR_PartialMethodOnlyOneActual, currentMethod.GetFirstLocation()); 4320diagnostics.Add(ErrorCode.ERR_PartialMethodOnlyOneLatent, currentMethod.GetFirstLocation()); 4333diagnostics.Add(ErrorCode.ERR_PartialPropertyDuplicateImplementation, currentProperty.GetFirstLocation()); 4338diagnostics.Add(ErrorCode.ERR_PartialPropertyDuplicateDefinition, currentProperty.GetFirstLocation()); 4344diagnostics.Add(ErrorCode.ERR_PartialPropertyDuplicateInitializer, currentProperty.GetFirstLocation()); 4776diagnostics.Add(ErrorCode.ERR_InterfacesCantContainConstructors, member.GetFirstLocation()); 4783diagnostics.Add(ErrorCode.ERR_OnlyClassesCanContainDestructors, member.GetFirstLocation()); 4831diagnostics.Add(ErrorCode.ERR_ExtensionDisallowsMember, member.GetFirstLocation()); 4898diagnostics.Add(ErrorCode.ERR_EnumsCantContainDefaultConstructor, location); 4905diagnostics.Add(ErrorCode.ERR_NonPublicParameterlessStructConstructor, location); 4937diagnostics.Add(ErrorCode.ERR_StructHasInitializersAndNoDeclaredConstructor, GetFirstLocation()); 5011diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, parameterSyntax.Identifier.GetLocation()); 5060diagnostics.Add(ErrorCode.ERR_UnionDeclarationNeedsCaseTypes, valuePropertySyntax.Identifier.GetLocation()); 5246diagnostics.Add(ErrorCode.ERR_RecordAmbigCtor, copyCtor.GetFirstLocation()); 5255diagnostics.Add(ErrorCode.ERR_RecordAmbigCtor, this.GetFirstLocation()); 6118diagnostics.Add(ErrorCode.ERR_GlobalStatement, new SourceLocation(globalStatement)); 6144diagnostics.Add(errorCode, new SourceLocation(locationSyntax));
Symbols\Source\SourceMemberFieldSymbol.cs (11)
61diagnostics.Add(ErrorCode.ERR_FieldCantHaveVoidType, getTypeErrorLocation()); 234diagnostics.Add(ErrorCode.ERR_AbstractField, errorLocation); 417diagnostics.Add(ErrorCode.ERR_InterfacesCantContainFields, ErrorLocation); 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); 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 (4)
1000diagnostics.Add(ErrorCode.ERR_ExternMemberRequiresUnsafeOrSafe, 1094diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportDefaultInterfaceImplementation, location); 1100diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportStaticAbstractMembersInInterfaces, location); 1113diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportProtectedAccessForInterfaceMember, location);
Symbols\Source\SourceMethodSymbol.cs (2)
72diagnostics.Add(ErrorCode.ERR_BadAsyncArgType, getLocation(parameter, location, isExtensionParameter)); 77diagnostics.Add(ErrorCode.ERR_UnsafeAsyncArgType, getLocation(parameter, location, isExtensionParameter));
Symbols\Source\SourceMethodSymbolWithAttributes.cs (21)
572diagnostics.Add(ErrorCode.ERR_RequiresUnsafeAttributeInSource, arguments.AttributeSyntaxOpt.Location); 625diagnostics.Add(ErrorCode.WRN_UnscopedRefAttributeOldRules, arguments.AttributeSyntaxOpt.Location); 639diagnostics.Add(ErrorCode.ERR_UnscopedRefAttributeUnsupportedMemberTarget, arguments.AttributeSyntaxOpt.Location); 743diagnostics.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_Bases.cs (6)
132diagnostics.Add(ErrorCode.ERR_BadRecordBase, baseLocation); 137diagnostics.Add(ErrorCode.ERR_BadInheritanceFromRecord, baseLocation); 517diagnostics.Add(ErrorCode.ERR_BadBaseType, typeSyntax.GetLocation()); 680diagnostics.Add(ErrorCode.ERR_ObjectCantHaveBases, new SourceLocation(name)); 691diagnostics.Add(ErrorCode.ERR_UnexpectedArgumentList, primaryConstructorBaseType.ArgumentList.Location); 695diagnostics.Add(ErrorCode.ERR_UnexpectedArgumentListInBaseTypeWithoutParameterList, primaryConstructorBaseType.ArgumentList.Location);
Symbols\Source\SourceNamedTypeSymbol_Enum.cs (1)
68diagnostics.Add(ErrorCode.ERR_IntegralTypeExpected, typeSyntax.Location);
Symbols\Source\SourceNamedTypeSymbol.cs (21)
197diagnostics.Add(ErrorCode.ERR_IllegalVarianceSyntax, tp.VarianceKeyword.GetLocation()); 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)); 1234diagnostics.Add(ErrorCode.ERR_InlineArrayAttributeOnRecord, arguments.AttributeSyntaxOpt.Name.Location); 1655diagnostics.Add(ErrorCode.ERR_ComImportWithoutUuidAttribute, allAttributeSyntaxNodes[index].Name.Location); 1712diagnostics.Add(ErrorCode.ERR_DefaultMemberOnIndexedType, allAttributeSyntaxNodes[index].Name.Location); 1889diagnostics.Add(ErrorCode.ERR_ExplicitOrExtendedLayoutFieldRequiresUnsafeOrSafe, field.GetFirstLocation()); 2007diagnostics.Add(ErrorCode.ERR_StructLayoutAndExtendedLayout, GetFirstLocation()); 2014diagnostics.Add(ErrorCode.ERR_InvalidInlineArrayLayout, GetFirstLocation()); 2023diagnostics.Add(ErrorCode.ERR_InlineArrayUnsupportedElementFieldModifier, elementField.TryGetFirstLocation() ?? GetFirstLocation()); 2037diagnostics.Add(ErrorCode.WRN_InlineArrayIndexerNotUsed, indexer.TryGetFirstLocation() ?? GetFirstLocation()); 2045diagnostics.Add(ErrorCode.WRN_InlineArraySliceNotUsed, slice.TryGetFirstLocation() ?? GetFirstLocation()); 2068diagnostics.Add(ErrorCode.WRN_InlineArrayConversionOperatorNotUsed, conversion.TryGetFirstLocation() ?? GetFirstLocation()); 2077diagnostics.Add(ErrorCode.WRN_InlineArrayNotSupportedByLanguage, elementField.TryGetFirstLocation() ?? GetFirstLocation()); 2081diagnostics.Add(ErrorCode.WRN_InlineArrayNotSupportedByLanguage, GetFirstLocation()); 2087diagnostics.Add(ErrorCode.ERR_InvalidInlineArrayFields, GetFirstLocation()); 2092diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportInlineArrayTypes, GetFirstLocation()); 2100diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportExtendedLayoutTypes, GetFirstLocation()); 2129diagnostics.Add(ErrorCode.ERR_EmbeddedAttributeMustFollowPattern, GetFirstLocation());
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 (18)
241diagnostics.Add(ErrorCode.ERR_BadExtensionAgg, loc); 245diagnostics.Add(ErrorCode.ERR_BadExtensionMeth, _location); 514diagnostics.Add(ErrorCode.ERR_PartialMethodReturnTypeDifference, implementation.GetFirstLocation()); 524diagnostics.Add(ErrorCode.ERR_PartialMemberRefReturnDifference, implementation.GetFirstLocation()); 529diagnostics.Add(ErrorCode.ERR_PartialMemberStaticDifference, implementation.GetFirstLocation()); 534diagnostics.Add(ErrorCode.ERR_PartialMemberReadOnlyDifference, implementation.GetFirstLocation()); 539diagnostics.Add(ErrorCode.ERR_PartialMethodExtensionDifference, implementation.GetFirstLocation()); 544diagnostics.Add(ErrorCode.ERR_PartialMemberUnsafeDifference, implementation.GetFirstLocation()); 549diagnostics.Add(ErrorCode.ERR_PartialMemberSafeDifference, implementation.GetFirstLocation()); 554diagnostics.Add(ErrorCode.ERR_PartialMemberParamsDifference, implementation.GetFirstLocation()); 560diagnostics.Add(ErrorCode.ERR_PartialMemberAccessibilityDifference, implementation.GetFirstLocation()); 568diagnostics.Add(ErrorCode.ERR_PartialMemberExtendedModDifference, implementation.GetFirstLocation()); 596diagnostics.Add(ErrorCode.WRN_NullabilityMismatchInReturnTypeOnPartial, implementingMethod.GetFirstLocation()); 880diagnostics.Add(ErrorCode.ERR_PartialMemberCannotBeAbstract, location); 957diagnostics.Add(ErrorCode.ERR_BadAsyncLacksBody, location); 973diagnostics.Add(ErrorCode.ERR_BadVarargs, location); 977diagnostics.Add(ErrorCode.ERR_VarargsAsync, location); 1191diagnostics.Add(ErrorCode.ERR_IllegalVarianceSyntax, parameter.VarianceKeyword.GetLocation());
Symbols\Source\SourcePropertyAccessorSymbol.cs (5)
614diagnostics.Add(ErrorCode.ERR_BadInitAccessor, location); 877diagnostics.Add(ErrorCode.ERR_PartialMemberAccessibilityDifference, implementationAccessor.GetFirstLocation()); 882diagnostics.Add(ErrorCode.ERR_PartialMemberReadOnlyDifference, implementationAccessor.GetFirstLocation()); 887diagnostics.Add(ErrorCode.ERR_PartialMemberUnsafeDifference, implementationAccessor.GetFirstLocation()); 892diagnostics.Add(ErrorCode.ERR_PartialMemberSafeDifference, implementationAccessor.GetFirstLocation());
Symbols\Source\SourcePropertySymbol.cs (18)
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_PartialMemberSafeDifference, implementation.GetFirstLocation()); 786diagnostics.Add(ErrorCode.ERR_PartialMemberParamsDifference, implementation.GetFirstLocation()); 792diagnostics.Add(ErrorCode.ERR_PartialMemberAccessibilityDifference, implementation.GetFirstLocation()); 800diagnostics.Add(ErrorCode.ERR_PartialMemberExtendedModDifference, implementation.GetFirstLocation());
Symbols\Source\SourcePropertySymbolBase.cs (19)
310diagnostics.Add(ErrorCode.ERR_InstancePropertyInitializerInInterface, Location); 314diagnostics.Add(ErrorCode.ERR_InitializerOnNonAutoProperty, Location); 892diagnostics.Add(ErrorCode.ERR_RefReturningPropertiesCannotBeRequired, Location); 901diagnostics.Add(ErrorCode.ERR_AutoPropsInRoStruct, Location); 915diagnostics.Add(ErrorCode.ERR_AutoPropertyCannotBeRefReturning, Location); 925diagnostics.Add(ErrorCode.ERR_AutoPropertyMustOverrideSet, Location); 937diagnostics.Add(ErrorCode.ERR_InterfacesCantContainFields, Location); 962diagnostics.Add(ErrorCode.ERR_RefPropertyCannotHaveSetAccessor, _setMethod.GetFirstLocation()); 998diagnostics.Add(ErrorCode.ERR_RefPropertyMustHaveGetAccessor, Location); 1006diagnostics.Add(ErrorCode.ERR_AutoPropertyMustHaveGetAccessor, _setMethod!.GetFirstLocation()); 1079diagnostics.Add(ErrorCode.ERR_ExternMemberRequiresUnsafeOrSafe, 1151diagnostics.Add(ErrorCode.ERR_PartialMemberOnlyInPartialClass, location); 1155diagnostics.Add(ErrorCode.ERR_PartialMemberNotExplicit, location); 1159diagnostics.Add(ErrorCode.ERR_PartialMemberCannotBeAbstract, location); 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); 1793diagnostics.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_Attributes.cs (2)
741diagnostics.Add(ErrorCode.ERR_GlobalAttributesNotAllowed, targetOpt.Identifier.GetLocation()); 913diagnostics.Add(ErrorCode.ERR_AttributesNotAllowed, node.Name.Location);
Symbols\Symbol.cs (7)
1521diagnostics.Add(ErrorCode.ERR_BlockBodyAndExpressionBody, syntax.GetLocation()); 1560diagnostics.Add(ErrorCode.ERR_ExplicitDynamicAttr, arguments.AttributeSyntaxOpt.Location); 1581diagnostics.Add(ErrorCode.ERR_ExplicitTupleElementNamesAttribute, arguments.AttributeSyntaxOpt.Location); 1587diagnostics.Add(ErrorCode.ERR_ExplicitNullableAttribute, arguments.AttributeSyntaxOpt.Location); 1605diagnostics.Add(ErrorCode.ERR_ExplicitExtension, arguments.AttributeSyntaxOpt.Location); 1611diagnostics.Add(ErrorCode.ERR_ExplicitRequiredMember, arguments.AttributeSyntaxOpt.Location); 1617diagnostics.Add(ErrorCode.ERR_ExplicitScopedRef, arguments.AttributeSyntaxOpt.Location);
Symbols\Synthesized\SynthesizedBackingFieldSymbol.cs (1)
261((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)
340diagnostics.Add(ErrorCode.ERR_VarInvocationLvalueReserved, expression.GetLocation());