224 references to Add
Microsoft.CodeAnalysis.CSharp (224)
Binder\Binder.ValueChecks.cs (2)
1074diagnostics.Add(ErrorCode.ERR_RefLocalOrParamExpected, node.Location); 5433diagnostics.Add(ErrorCode.ERR_InternalError, node.Location);
Binder\Binder_Constraints.cs (1)
361diagnostics.Add(ErrorCode.ERR_TypeConstraintsMustBeUniqueAndFirst, syntax.GetLocation());
Binder\Binder_Expressions.cs (11)
358diagnostics.Add(ErrorCode.ERR_DefaultLiteralNoTargetType, defaultExpr.Syntax.GetLocation()); 401diagnostics.Add(ErrorCode.ERR_CollectionExpressionNoTargetType, expr.Syntax.GetLocation()); 427diagnostics.Add(ErrorCode.ERR_CannotInferDelegateType, syntax.GetLocation()); 4927diagnostics.Add(ErrorCode.ERR_NoDynamicPhantomOnBaseCtor, errorLocation); 5071diagnostics.Add(ErrorCode.ERR_ChainingToSetsRequiredMembersRequiresSetsRequiredMembers, errorLocation); 5117diagnostics.Add(ErrorCode.ERR_CopyConstructorMustInvokeBaseCopyConstructor, errorLocation); 5126diagnostics.Add(ErrorCode.ERR_CopyConstructorMustInvokeBaseCopyConstructor, errorLocation); 5443diagnostics.Add(ErrorCode.ERR_MethodNameExpected, argument.Syntax.Location); 5504diagnostics.Add(ErrorCode.ERR_MethodNameExpected, argument.Syntax.Location); 5972diagnostics.Add(ErrorCode.ERR_InterpolatedStringsReferencingInstanceCannotBeInObjectInitializers, argument.Syntax.Location); 8999diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportRefFields, node.Location);
Binder\Binder_Invocation.cs (2)
1668diagnostics.Add(ErrorCode.ERR_BadAttributeArgument, syntax.Location); 2363diagnostics.Add(ErrorCode.ERR_NameofExtensionMethod, methodGroup.Syntax.Location);
Binder\Binder_Operators.cs (1)
5783diagnostics.Add(_inUnsafeRegion ? ErrorCode.WRN_MismatchedRefEscapeInTernary : ErrorCode.ERR_MismatchedRefEscapeInTernary, node.Location);
Binder\Binder_Patterns.cs (5)
104diagnostics.Add(ErrorCode.WRN_GivenExpressionNeverMatchesPattern, node.Location); 111diagnostics.Add(ErrorCode.WRN_GivenExpressionAlwaysMatchesConstant, node.Location); 118diagnostics.Add(ErrorCode.WRN_GivenExpressionAlwaysMatchesPattern, node.Location); 738diagnostics.Add(ErrorCode.ERR_PointerTypeInPatternMatching, typeSyntax.Location); 883diagnostics.Add(ErrorCode.ERR_DesignatorBeneathPatternCombinator, identifier.GetLocation());
Binder\Binder_Query.cs (3)
939diagnostics.Add(ErrorCode.ERR_NullNotValid, node.Location); 943diagnostics.Add(ErrorCode.ERR_DefaultLiteralNotValid, node.Location); 947diagnostics.Add(ErrorCode.ERR_ImplicitObjectCreationNotValid, node.Location);
Binder\Binder_Statements.cs (2)
1467diagnostics.Add(ErrorCode.ERR_VoidAssignment, op1.Syntax.Location); 2240diagnostics.Add(ErrorCode.ERR_InternalError, syntax.Location);
Binder\Binder_Symbols.cs (1)
2661return diagnostics.Add(code, 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 (2)
958diagnostics.Add(ErrorCode.ERR_BadDynamicAwaitForEach, collectionSyntax.Location); 1208diagnostics.Add(ErrorCode.ERR_NullNotValid, collectionExpr.Syntax.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 (2)
479diagnostics.Add(ErrorCode.ERR_FunctionPointersCannotBeCalledWithNamedArguments, badName); 513diagnostics.Add(
Binder\SwitchExpressionBinder.cs (1)
71diagnostics.Add(ErrorCode.ERR_SwitchArmSubsumed, arm.Pattern.Syntax.Location);
Binder\WithLambdaParametersBinder.cs (1)
154diagnostics.Add(ErrorCode.ERR_InternalError, newLocation);
BoundTree\BoundTreeVisitors.cs (1)
180diagnostics.Add(ErrorCode.ERR_InsufficientStack, GetTooLongOrComplexExpressionErrorLocation(Node));
CodeGen\EmitExpression.cs (1)
88_diagnostics.Add(ErrorCode.ERR_InsufficientStack,
CodeGen\EmitStatement.cs (1)
387_diagnostics.Add(ErrorCode.ERR_InsufficientStack,
Compilation\CSharpCompilation.cs (3)
1878diagnostics.Add(ErrorCode.ERR_SimpleProgramNotAnExecutable, simpleProgramEntryPointSymbol.ReturnTypeSyntax.Location); 2115diagnostics.Add(ErrorCode.ERR_NoEntryPoint, NoLocation.Singleton); 2693diagnostics.Add(code, infoTree.GetLocation(infoSpan));
Compiler\MethodCompiler.cs (1)
1699diagnosticsForThisMethod.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)
621_diagnostics.Add(ErrorCode.ERR_ByRefParameterInExpressionTree, location); 630_diagnostics.Add(ErrorCode.ERR_LambdaWithAttributesToExpressionTree, p.GetFirstLocation());
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (1)
628_factory.Diagnostics.Add(ErrorCode.ERR_DynamicRequiredTypesMissing, NoLocation.Singleton);
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (1)
668F.Diagnostics.Add(ErrorCode.ERR_RefConditionalAndAwait, F.Syntax.Location);
Symbols\ConstraintsHelper.cs (2)
106diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportByRefLikeGenerics, location); 118diagnostics.Add(ErrorCode.ERR_ClassIsCombinedWithRefStruct, typeParameter.GetFirstLocation());
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (1)
233diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportUnmanagedDefaultCallConv, errorLocation);
Symbols\MethodSymbol.cs (2)
1047diagnostics?.Add(ErrorCode.ERR_UnmanagedCallersOnlyRequiresStatic, node!.Location); 1053diagnostics?.Add(ErrorCode.ERR_UnmanagedCallersOnlyMethodOrTypeCannotBeGeneric, node!.Location);
Symbols\Source\ExplicitInterfaceHelpers.cs (1)
370diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportStaticAbstractMembersInInterfaces, implementingMember.GetFirstLocation());
Symbols\Source\LambdaSymbol.cs (1)
298addTo.Add(ErrorCode.ERR_BuilderAttributeDisallowed, DiagnosticLocation);
Symbols\Source\LocalFunctionSymbol.cs (1)
215diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, arglistToken.GetLocation());
Symbols\Source\ModifierUtils.cs (4)
138diagnostics.Add(ErrorCode.ERR_PartialMisplaced, partialToken.GetLocation()); 143diagnostics.Add(ErrorCode.ERR_PartialMisplaced, errorLocation); 491diagnostics.Add(ErrorCode.ERR_BadMemberProtection, errorLocation); 507diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportProtectedAccessForInterfaceMember, errorLocation);
Symbols\Source\ParameterHelpers.cs (8)
273diagnostics.Add(ErrorCode.ERR_ThisInBadContext, thisKeyword.GetLocation()); 289diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, arglistToken.GetLocation()); 315diagnostics.Add(ErrorCode.ERR_IllegalRefParam, refnessKeyword.GetLocation()); 852diagnostics.Add(ErrorCode.ERR_IllegalParams, paramsKeyword.GetLocation()); 876diagnostics.Add(ErrorCode.ERR_DefaultValueBeforeRequiredValue, loc); 944diagnostics.Add(ErrorCode.ERR_RefOutDefaultValue, refnessKeyword.GetLocation()); 950diagnostics.Add(ErrorCode.ERR_DefaultValueForParamsParameter, paramsKeyword.GetLocation()); 960diagnostics.Add(ErrorCode.ERR_DefaultValueForExtensionParameter, thisKeyword.GetLocation());
Symbols\Source\SourceAssemblySymbol.cs (6)
599diagnostics.Add(ErrorCode.WRN_DelaySignButNoKey, NoLocation.Singleton); 606diagnostics.Add(ErrorCode.ERR_PublicSignNetModule, NoLocation.Singleton); 610diagnostics.Add(ErrorCode.ERR_PublicSignButNoKey, NoLocation.Singleton); 2213diagnostics.Add(ErrorCode.ERR_InvalidFwdType, GetAssemblyAttributeLocationForDiagnostic(arguments.AttributeSyntaxOpt)); 2244diagnostics.Add(ErrorCode.ERR_InvalidFwdType, GetAssemblyAttributeLocationForDiagnostic(arguments.AttributeSyntaxOpt)); 2282diagnostics.Add(ErrorCode.ERR_CannotPassNullForFriendAssembly, GetAssemblyAttributeLocationForDiagnostic(nodeOpt));
Symbols\Source\SourceComplexParameterSymbol.cs (5)
926diagnostics.Add(ErrorCode.ERR_ParamDefaultValueDiffersFromAttribute, syntax.Location); 1403diagnostics.Add(ErrorCode.ERR_OutAttrOnRefParam, this.GetFirstLocation()); 1410diagnostics.Add(ErrorCode.ERR_InAttrOnOutParam, this.GetFirstLocation()); 1417diagnostics.Add(ErrorCode.ERR_OutAttrOnInParam, this.GetFirstLocation()); 1424diagnostics.Add(ErrorCode.ERR_OutAttrOnRefReadonlyParam, this.GetFirstLocation());
Symbols\Source\SourceConstructorSymbol.cs (6)
51diagnostics.Add(ErrorCode.ERR_MemberNeedsType, location); 193diagnostics.Add(ErrorCode.ERR_ConstructorInStaticClass, location); 197diagnostics.Add(ErrorCode.ERR_PartialMemberOnlyInPartialClass, location); 300diagnostics.Add(ErrorCode.ERR_PartialMemberUnsafeDifference, implementation.GetFirstLocation()); 305diagnostics.Add(ErrorCode.ERR_PartialMemberParamsDifference, implementation.GetFirstLocation()); 311diagnostics.Add(ErrorCode.ERR_PartialMemberAccessibilityDifference, implementation.GetFirstLocation());
Symbols\Source\SourceConstructorSymbolBase.cs (1)
76diagnostics.Add(ErrorCode.ERR_BadVarargs, location);
Symbols\Source\SourceCustomEventSymbol.cs (2)
144diagnostics.Add(ErrorCode.ERR_ExplicitEventFieldImpl, this.GetFirstLocation()); 155diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportDefaultInterfaceImplementation, this.GetFirstLocation());
Symbols\Source\SourceDestructorSymbol.cs (2)
54diagnostics.Add(ErrorCode.ERR_DestructorInStaticClass, location); 58diagnostics.Add(ErrorCode.ERR_OnlyClassesCanContainDestructors, location);
Symbols\Source\SourceEventSymbol.cs (8)
614diagnostics.Add(ErrorCode.ERR_PartialMemberOnlyInPartialClass, location); 618diagnostics.Add(ErrorCode.ERR_PartialMemberNotExplicit, location); 622diagnostics.Add(ErrorCode.ERR_PartialMemberCannotBeAbstract, location); 869diagnostics.Add(ErrorCode.ERR_PartialMemberTypeDifference, implementation.GetFirstLocation()); 884diagnostics.Add(ErrorCode.ERR_PartialMemberStaticDifference, implementation.GetFirstLocation()); 889diagnostics.Add(ErrorCode.ERR_PartialMemberUnsafeDifference, implementation.GetFirstLocation()); 895diagnostics.Add(ErrorCode.ERR_PartialMemberAccessibilityDifference, implementation.GetFirstLocation()); 903diagnostics.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()); 115diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportDefaultInterfaceImplementation, this.GetFirstLocation());
Symbols\Source\SourceFieldSymbol.cs (1)
70diagnostics.Add(ErrorCode.ERR_FieldsInRoStruct, ErrorLocation);
Symbols\Source\SourceMemberContainerSymbol.cs (16)
1961diagnostics.Add(ErrorCode.ERR_CloneDisallowedInRecord, member.GetFirstLocation()); 2313diagnostics.Add(ErrorCode.ERR_InconsistentIndexerNames, indexer.GetFirstLocation()); 2962diagnostics.Add(ErrorCode.ERR_ScriptsAndSubmissionsCannotHaveRequiredMembers, member.GetFirstLocation()); 4143diagnostics.Add(ErrorCode.ERR_PartialMethodOnlyOneActual, currentMethod.GetFirstLocation()); 4149diagnostics.Add(ErrorCode.ERR_PartialMethodOnlyOneLatent, currentMethod.GetFirstLocation()); 4162diagnostics.Add(ErrorCode.ERR_PartialPropertyDuplicateImplementation, currentProperty.GetFirstLocation()); 4167diagnostics.Add(ErrorCode.ERR_PartialPropertyDuplicateDefinition, currentProperty.GetFirstLocation()); 4173diagnostics.Add(ErrorCode.ERR_PartialPropertyDuplicateInitializer, currentProperty.GetFirstLocation()); 4605diagnostics.Add(ErrorCode.ERR_InterfacesCantContainConstructors, member.GetFirstLocation()); 4612diagnostics.Add(ErrorCode.ERR_OnlyClassesCanContainDestructors, member.GetFirstLocation()); 4653diagnostics.Add(ErrorCode.ERR_ExtensionDisallowsMember, member.GetFirstLocation()); 4718diagnostics.Add(ErrorCode.ERR_EnumsCantContainDefaultConstructor, location); 4725diagnostics.Add(ErrorCode.ERR_NonPublicParameterlessStructConstructor, location); 4757diagnostics.Add(ErrorCode.ERR_StructHasInitializersAndNoDeclaredConstructor, GetFirstLocation()); 4974diagnostics.Add(ErrorCode.ERR_RecordAmbigCtor, copyCtor.GetFirstLocation()); 4983diagnostics.Add(ErrorCode.ERR_RecordAmbigCtor, this.GetFirstLocation());
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (3)
975(diagnostics, overriddenEvent, overridingEvent, location) => diagnostics.Add(ErrorCode.WRN_NullabilityMismatchInTypeOnOverride, location), 1027diagnostics.Add(ErrorCode.ERR_OverrideFinalizeDeprecated, overridingMemberLocation); 1223=> diagnostics.Add(topLevel ?
Symbols\Source\SourceMemberFieldSymbol.cs (7)
61diagnostics.Add(ErrorCode.ERR_FieldCantHaveVoidType, getTypeErrorLocation()); 378diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportDefaultInterfaceImplementation, ErrorLocation); 383diagnostics.Add(ErrorCode.ERR_InterfacesCantContainFields, ErrorLocation); 506diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportRefFields, ErrorLocation); 509diagnostics.Add(ErrorCode.ERR_RefFieldInNonRefStruct, ErrorLocation); 576diagnostics.Add(ErrorCode.ERR_FixedNotInStruct, ErrorLocation); 581diagnostics.Add(ErrorCode.ERR_FixedFieldMustNotBeRef, ErrorLocation);
Symbols\Source\SourceMemberMethodSymbol.cs (2)
1066diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportDefaultInterfaceImplementation, location); 1071diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportStaticAbstractMembersInInterfaces, location);
Symbols\Source\SourceMethodSymbol.cs (2)
73diagnostics.Add(ErrorCode.ERR_BadAsyncArgType, getLocation(parameter, location, isExtensionParameter)); 78diagnostics.Add(ErrorCode.ERR_UnsafeAsyncArgType, getLocation(parameter, location, isExtensionParameter));
Symbols\Source\SourceMethodSymbolWithAttributes.cs (10)
1138diagnostics.Add(ErrorCode.ERR_InterceptorGlobalNamespace, attributeLocation); 1158diagnostics.Add(ErrorCode.WRN_InterceptsLocationAttributeUnsupportedSignature, attributeLocation); 1358diagnostics.Add(ErrorCode.ERR_InterceptorMethodMustBeOrdinary, attributeLocation); 1366diagnostics.Add(ErrorCode.ERR_InterceptorCannotUseUnmanagedCallersOnly, attributeLocation); 1405diagnostics.Add(ErrorCode.ERR_CannotUseRefInUnmanagedCallersOnly, syntax.Location); 1480diagnostics.Add(ErrorCode.ERR_ComImportWithUserCtor, this.GetFirstLocation()); 1541diagnostics.Add(ErrorCode.ERR_BadAsyncReturn, errorLocation); 1561diagnostics.Add(ErrorCode.ERR_SecurityCriticalOrSecuritySafeCriticalOnAsyncInClassOrStruct, errorLocation); 1570diagnostics.Add(ErrorCode.ERR_SynchronizedAsyncMethod, errorLocation); 1596diagnostics.Add(ErrorCode.ERR_MultipleEnumeratorCancellationAttributes, errorLocation);
Symbols\Source\SourceNamedTypeSymbol.cs (10)
1877diagnostics.Add(ErrorCode.ERR_InvalidInlineArrayLayout, GetFirstLocation()); 1886diagnostics.Add(ErrorCode.ERR_InlineArrayUnsupportedElementFieldModifier, elementField.TryGetFirstLocation() ?? GetFirstLocation()); 1900diagnostics.Add(ErrorCode.WRN_InlineArrayIndexerNotUsed, indexer.TryGetFirstLocation() ?? GetFirstLocation()); 1908diagnostics.Add(ErrorCode.WRN_InlineArraySliceNotUsed, slice.TryGetFirstLocation() ?? GetFirstLocation()); 1931diagnostics.Add(ErrorCode.WRN_InlineArrayConversionOperatorNotUsed, conversion.TryGetFirstLocation() ?? GetFirstLocation()); 1940diagnostics.Add(ErrorCode.WRN_InlineArrayNotSupportedByLanguage, elementField.TryGetFirstLocation() ?? GetFirstLocation()); 1944diagnostics.Add(ErrorCode.WRN_InlineArrayNotSupportedByLanguage, GetFirstLocation()); 1950diagnostics.Add(ErrorCode.ERR_InvalidInlineArrayFields, GetFirstLocation()); 1955diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportInlineArrayTypes, GetFirstLocation()); 1982diagnostics.Add(ErrorCode.ERR_EmbeddedAttributeMustFollowPattern, GetFirstLocation());
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (2)
132diagnostics.Add(ErrorCode.ERR_BadRecordBase, baseLocation); 137diagnostics.Add(ErrorCode.ERR_BadInheritanceFromRecord, baseLocation);
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 (15)
243diagnostics.Add(ErrorCode.ERR_BadExtensionMeth, _location); 492diagnostics.Add(ErrorCode.ERR_PartialMethodReturnTypeDifference, implementation.GetFirstLocation()); 502diagnostics.Add(ErrorCode.ERR_PartialMemberRefReturnDifference, implementation.GetFirstLocation()); 507diagnostics.Add(ErrorCode.ERR_PartialMemberStaticDifference, implementation.GetFirstLocation()); 512diagnostics.Add(ErrorCode.ERR_PartialMemberReadOnlyDifference, implementation.GetFirstLocation()); 517diagnostics.Add(ErrorCode.ERR_PartialMethodExtensionDifference, implementation.GetFirstLocation()); 522diagnostics.Add(ErrorCode.ERR_PartialMemberUnsafeDifference, implementation.GetFirstLocation()); 527diagnostics.Add(ErrorCode.ERR_PartialMemberParamsDifference, implementation.GetFirstLocation()); 533diagnostics.Add(ErrorCode.ERR_PartialMemberAccessibilityDifference, implementation.GetFirstLocation()); 541diagnostics.Add(ErrorCode.ERR_PartialMemberExtendedModDifference, implementation.GetFirstLocation()); 569diagnostics.Add(ErrorCode.WRN_NullabilityMismatchInReturnTypeOnPartial, implementingMethod.GetFirstLocation()); 835diagnostics.Add(ErrorCode.ERR_PartialMemberCannotBeAbstract, location); 912diagnostics.Add(ErrorCode.ERR_BadAsyncLacksBody, location); 928diagnostics.Add(ErrorCode.ERR_BadVarargs, location); 932diagnostics.Add(ErrorCode.ERR_VarargsAsync, location);
Symbols\Source\SourcePropertyAccessorSymbol.cs (3)
575diagnostics.Add(ErrorCode.ERR_BadInitAccessor, location); 838diagnostics.Add(ErrorCode.ERR_PartialMemberAccessibilityDifference, implementationAccessor.GetFirstLocation()); 843diagnostics.Add(ErrorCode.ERR_PartialMemberReadOnlyDifference, implementationAccessor.GetFirstLocation());
Symbols\Source\SourcePropertySymbol.cs (13)
608diagnostics.Add(ErrorCode.ERR_IndexerCantHaveVoidType, Location); 642diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, arglistToken.GetLocation()); 699diagnostics.Add(ErrorCode.ERR_ValueParameterSameNameAsExtensionTypeParameter, setter.GetFirstLocationOrNone()); 704diagnostics.Add(ErrorCode.ERR_ValueParameterSameNameAsExtensionParameter, setter.GetFirstLocationOrNone()); 738diagnostics.Add(ErrorCode.ERR_PartialMemberTypeDifference, implementation.GetFirstLocation()); 749diagnostics.Add(ErrorCode.ERR_PartialMemberRefReturnDifference, implementation.GetFirstLocation()); 762diagnostics.Add(ErrorCode.ERR_PartialPropertyRequiredDifference, implementation.GetFirstLocation()); 767diagnostics.Add(ErrorCode.ERR_PartialMemberStaticDifference, implementation.GetFirstLocation()); 772diagnostics.Add(ErrorCode.ERR_PartialMemberReadOnlyDifference, implementation.GetFirstLocation()); 777diagnostics.Add(ErrorCode.ERR_PartialMemberUnsafeDifference, implementation.GetFirstLocation()); 782diagnostics.Add(ErrorCode.ERR_PartialMemberParamsDifference, implementation.GetFirstLocation()); 788diagnostics.Add(ErrorCode.ERR_PartialMemberAccessibilityDifference, implementation.GetFirstLocation()); 796diagnostics.Add(ErrorCode.ERR_PartialMemberExtendedModDifference, implementation.GetFirstLocation());
Symbols\Source\SourcePropertySymbolBase.cs (13)
309diagnostics.Add(ErrorCode.ERR_InstancePropertyInitializerInInterface, Location); 313diagnostics.Add(ErrorCode.ERR_InitializerOnNonAutoProperty, Location); 884diagnostics.Add(ErrorCode.ERR_RefReturningPropertiesCannotBeRequired, Location); 893diagnostics.Add(ErrorCode.ERR_AutoPropsInRoStruct, Location); 907diagnostics.Add(ErrorCode.ERR_AutoPropertyCannotBeRefReturning, Location); 917diagnostics.Add(ErrorCode.ERR_AutoPropertyMustOverrideSet, Location); 929diagnostics.Add(ErrorCode.ERR_InterfacesCantContainFields, Location); 944diagnostics.Add(ErrorCode.ERR_RefPropertyCannotHaveSetAccessor, _setMethod.GetFirstLocation()); 973diagnostics.Add(ErrorCode.ERR_RefPropertyMustHaveGetAccessor, Location); 981diagnostics.Add(ErrorCode.ERR_AutoPropertyMustHaveGetAccessor, _setMethod!.GetFirstLocation()); 1105diagnostics.Add(ErrorCode.ERR_PartialMemberOnlyInPartialClass, location); 1109diagnostics.Add(ErrorCode.ERR_PartialMemberNotExplicit, location); 1113diagnostics.Add(ErrorCode.ERR_PartialMemberCannotBeAbstract, location);
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (16)
67diagnostics.Add(ErrorCode.ERR_InterfacesCantContainConversionOrEqualityOperators, this.GetFirstLocation()); 83diagnostics.Add(ErrorCode.ERR_OperatorInExtensionOfStaticClass, location); 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 (1)
1513diagnostics.Add(ErrorCode.ERR_BlockBodyAndExpressionBody, syntax.GetLocation());
Symbols\VarianceSafety.cs (1)
95diagnostics.Add(ErrorCode.ERR_VarianceInterfaceNesting, member.GetFirstLocation());