Binder\Binder_Expressions.cs (11)
353diagnostics.Add(ErrorCode.ERR_DefaultLiteralNoTargetType, defaultExpr.Syntax.GetLocation());
396diagnostics.Add(ErrorCode.ERR_CollectionExpressionNoTargetType, expr.Syntax.GetLocation());
422diagnostics.Add(ErrorCode.ERR_CannotInferDelegateType, syntax.GetLocation());
4874diagnostics.Add(ErrorCode.ERR_NoDynamicPhantomOnBaseCtor, errorLocation);
5018diagnostics.Add(ErrorCode.ERR_ChainingToSetsRequiredMembersRequiresSetsRequiredMembers, errorLocation);
5064diagnostics.Add(ErrorCode.ERR_CopyConstructorMustInvokeBaseCopyConstructor, errorLocation);
5073diagnostics.Add(ErrorCode.ERR_CopyConstructorMustInvokeBaseCopyConstructor, errorLocation);
5390diagnostics.Add(ErrorCode.ERR_MethodNameExpected, argument.Syntax.Location);
5451diagnostics.Add(ErrorCode.ERR_MethodNameExpected, argument.Syntax.Location);
5919diagnostics.Add(ErrorCode.ERR_InterpolatedStringsReferencingInstanceCannotBeInObjectInitializers, argument.Syntax.Location);
8611diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportRefFields, node.Location);
Symbols\Source\SourceMemberContainerSymbol.cs (14)
1936diagnostics.Add(ErrorCode.ERR_CloneDisallowedInRecord, member.GetFirstLocation());
2246diagnostics.Add(ErrorCode.ERR_InconsistentIndexerNames, indexer.GetFirstLocation());
2672diagnostics.Add(ErrorCode.ERR_ScriptsAndSubmissionsCannotHaveRequiredMembers, member.GetFirstLocation());
3702diagnostics.Add(ErrorCode.ERR_PartialMethodOnlyOneActual, currentMethod.GetFirstLocation());
3708diagnostics.Add(ErrorCode.ERR_PartialMethodOnlyOneLatent, currentMethod.GetFirstLocation());
3722diagnostics.Add(ErrorCode.ERR_PartialPropertyDuplicateImplementation, currentProperty.GetFirstLocation());
3727diagnostics.Add(ErrorCode.ERR_PartialPropertyDuplicateDefinition, currentProperty.GetFirstLocation());
3733diagnostics.Add(ErrorCode.ERR_PartialPropertyDuplicateInitializer, currentProperty.GetFirstLocation());
4071diagnostics.Add(ErrorCode.ERR_InterfacesCantContainConstructors, member.GetFirstLocation());
4078diagnostics.Add(ErrorCode.ERR_OnlyClassesCanContainDestructors, member.GetFirstLocation());
4121diagnostics.Add(ErrorCode.ERR_EnumsCantContainDefaultConstructor, location);
4128diagnostics.Add(ErrorCode.ERR_NonPublicParameterlessStructConstructor, location);
4160diagnostics.Add(ErrorCode.ERR_StructHasInitializersAndNoDeclaredConstructor, GetFirstLocation());
4372diagnostics.Add(ErrorCode.ERR_RecordAmbigCtor, copyCtor.GetFirstLocation());
Symbols\Source\SourceMethodSymbolWithAttributes.cs (10)
1153diagnostics.Add(ErrorCode.ERR_InterceptorGlobalNamespace, attributeLocation);
1173diagnostics.Add(ErrorCode.WRN_InterceptsLocationAttributeUnsupportedSignature, attributeLocation);
1205diagnostics.Add(ErrorCode.ERR_InterceptorMethodMustBeOrdinary, attributeLocation);
1213diagnostics.Add(ErrorCode.ERR_InterceptorCannotUseUnmanagedCallersOnly, attributeLocation);
1409diagnostics.Add(ErrorCode.ERR_CannotUseRefInUnmanagedCallersOnly, syntax.Location);
1484diagnostics.Add(ErrorCode.ERR_ComImportWithUserCtor, this.GetFirstLocation());
1545diagnostics.Add(ErrorCode.ERR_BadAsyncReturn, errorLocation);
1565diagnostics.Add(ErrorCode.ERR_SecurityCriticalOrSecuritySafeCriticalOnAsyncInClassOrStruct, errorLocation);
1574diagnostics.Add(ErrorCode.ERR_SynchronizedAsyncMethod, errorLocation);
1600diagnostics.Add(ErrorCode.ERR_MultipleEnumeratorCancellationAttributes, errorLocation);
Symbols\Source\SourceNamedTypeSymbol.cs (10)
1858diagnostics.Add(ErrorCode.ERR_InvalidInlineArrayLayout, GetFirstLocation());
1867diagnostics.Add(ErrorCode.ERR_InlineArrayUnsupportedElementFieldModifier, elementField.TryGetFirstLocation() ?? GetFirstLocation());
1881diagnostics.Add(ErrorCode.WRN_InlineArrayIndexerNotUsed, indexer.TryGetFirstLocation() ?? GetFirstLocation());
1889diagnostics.Add(ErrorCode.WRN_InlineArraySliceNotUsed, slice.TryGetFirstLocation() ?? GetFirstLocation());
1912diagnostics.Add(ErrorCode.WRN_InlineArrayConversionOperatorNotUsed, conversion.TryGetFirstLocation() ?? GetFirstLocation());
1921diagnostics.Add(ErrorCode.WRN_InlineArrayNotSupportedByLanguage, elementField.TryGetFirstLocation() ?? GetFirstLocation());
1925diagnostics.Add(ErrorCode.WRN_InlineArrayNotSupportedByLanguage, GetFirstLocation());
1931diagnostics.Add(ErrorCode.ERR_InvalidInlineArrayFields, GetFirstLocation());
1936diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportInlineArrayTypes, GetFirstLocation());
1963diagnostics.Add(ErrorCode.ERR_EmbeddedAttributeMustFollowPattern, GetFirstLocation());
Symbols\Source\SourceOrdinaryMethodSymbol.cs (15)
241diagnostics.Add(ErrorCode.ERR_BadExtensionMeth, _location);
482diagnostics.Add(ErrorCode.ERR_PartialMethodReturnTypeDifference, implementation.GetFirstLocation());
492diagnostics.Add(ErrorCode.ERR_PartialMemberRefReturnDifference, implementation.GetFirstLocation());
497diagnostics.Add(ErrorCode.ERR_PartialMemberStaticDifference, implementation.GetFirstLocation());
502diagnostics.Add(ErrorCode.ERR_PartialMemberReadOnlyDifference, implementation.GetFirstLocation());
507diagnostics.Add(ErrorCode.ERR_PartialMethodExtensionDifference, implementation.GetFirstLocation());
512diagnostics.Add(ErrorCode.ERR_PartialMemberUnsafeDifference, implementation.GetFirstLocation());
517diagnostics.Add(ErrorCode.ERR_PartialMemberParamsDifference, implementation.GetFirstLocation());
523diagnostics.Add(ErrorCode.ERR_PartialMemberAccessibilityDifference, implementation.GetFirstLocation());
531diagnostics.Add(ErrorCode.ERR_PartialMemberExtendedModDifference, implementation.GetFirstLocation());
559diagnostics.Add(ErrorCode.WRN_NullabilityMismatchInReturnTypeOnPartial, implementingMethod.GetFirstLocation());
809diagnostics.Add(ErrorCode.ERR_PartialMemberCannotBeAbstract, location);
886diagnostics.Add(ErrorCode.ERR_BadAsyncLacksBody, location);
902diagnostics.Add(ErrorCode.ERR_BadVarargs, location);
906diagnostics.Add(ErrorCode.ERR_VarargsAsync, location);
Symbols\Source\SourcePropertySymbol.cs (11)
588diagnostics.Add(ErrorCode.ERR_IndexerCantHaveVoidType, Location);
622diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, arglistToken.GetLocation());
693diagnostics.Add(ErrorCode.ERR_PartialPropertyTypeDifference, implementation.GetFirstLocation());
704diagnostics.Add(ErrorCode.ERR_PartialMemberRefReturnDifference, implementation.GetFirstLocation());
717diagnostics.Add(ErrorCode.ERR_PartialPropertyRequiredDifference, implementation.GetFirstLocation());
722diagnostics.Add(ErrorCode.ERR_PartialMemberStaticDifference, implementation.GetFirstLocation());
727diagnostics.Add(ErrorCode.ERR_PartialMemberReadOnlyDifference, implementation.GetFirstLocation());
732diagnostics.Add(ErrorCode.ERR_PartialMemberUnsafeDifference, implementation.GetFirstLocation());
737diagnostics.Add(ErrorCode.ERR_PartialMemberParamsDifference, implementation.GetFirstLocation());
743diagnostics.Add(ErrorCode.ERR_PartialMemberAccessibilityDifference, implementation.GetFirstLocation());
751diagnostics.Add(ErrorCode.ERR_PartialMemberExtendedModDifference, implementation.GetFirstLocation());
Symbols\Source\SourcePropertySymbolBase.cs (13)
307diagnostics.Add(ErrorCode.ERR_InstancePropertyInitializerInInterface, Location);
311diagnostics.Add(ErrorCode.ERR_InitializerOnNonAutoProperty, Location);
868diagnostics.Add(ErrorCode.ERR_RefReturningPropertiesCannotBeRequired, Location);
877diagnostics.Add(ErrorCode.ERR_AutoPropsInRoStruct, Location);
891diagnostics.Add(ErrorCode.ERR_AutoPropertyCannotBeRefReturning, Location);
901diagnostics.Add(ErrorCode.ERR_AutoPropertyMustOverrideSet, Location);
913diagnostics.Add(ErrorCode.ERR_InterfacesCantContainFields, Location);
928diagnostics.Add(ErrorCode.ERR_RefPropertyCannotHaveSetAccessor, _setMethod.GetFirstLocation());
957diagnostics.Add(ErrorCode.ERR_RefPropertyMustHaveGetAccessor, Location);
965diagnostics.Add(ErrorCode.ERR_AutoPropertyMustHaveGetAccessor, _setMethod!.GetFirstLocation());
1084diagnostics.Add(ErrorCode.ERR_PartialMemberOnlyInPartialClass, location);
1088diagnostics.Add(ErrorCode.ERR_PartialMemberNotExplicit, location);
1092diagnostics.Add(ErrorCode.ERR_PartialMemberCannotBeAbstract, location);
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (12)
59diagnostics.Add(ErrorCode.ERR_InterfacesCantContainConversionOrEqualityOperators, this.GetFirstLocation());
336diagnostics.Add(ErrorCode.ERR_IllegalRefParam, this.GetFirstLocation());
470diagnostics.Add(IsAbstract || IsVirtual ? ErrorCode.ERR_AbstractConversionNotInvolvingContainedType : ErrorCode.ERR_ConversionNotInvolvingContainedType, this.GetFirstLocation());
481diagnostics.Add(ErrorCode.ERR_IdentityConversion, this.GetFirstLocation());
594diagnostics.Add(ErrorCode.ERR_OperatorCantReturnVoid, this.GetFirstLocation());
606diagnostics.Add((IsAbstract || IsVirtual) ? ErrorCode.ERR_BadAbstractUnaryOperatorSignature : ErrorCode.ERR_BadUnaryOperatorSignature, this.GetFirstLocation());
620diagnostics.Add(ErrorCode.ERR_OpTFRetType, this.GetFirstLocation());
626diagnostics.Add((IsAbstract || IsVirtual) ? ErrorCode.ERR_BadAbstractUnaryOperatorSignature : ErrorCode.ERR_BadUnaryOperatorSignature, this.GetFirstLocation());
676diagnostics.Add((IsAbstract || IsVirtual) ? ErrorCode.ERR_BadAbstractIncDecSignature : ErrorCode.ERR_BadIncDecSignature, this.GetFirstLocation());
685diagnostics.Add((IsAbstract || IsVirtual) ? ErrorCode.ERR_BadAbstractIncDecRetType : ErrorCode.ERR_BadIncDecRetType, this.GetFirstLocation());
725diagnostics.Add((IsAbstract || IsVirtual) ? ErrorCode.ERR_BadAbstractShiftOperatorSignature : ErrorCode.ERR_BadShiftOperatorSignature, this.GetFirstLocation());
744diagnostics.Add((IsAbstract || IsVirtual) ? ErrorCode.ERR_BadAbstractBinaryOperatorSignature : ErrorCode.ERR_BadBinaryOperatorSignature, this.GetFirstLocation());