Binder\Binder_Expressions.cs (13)
390diagnostics.Add(ErrorCode.ERR_DefaultLiteralNoTargetType, defaultExpr.Syntax.GetLocation());
433diagnostics.Add(ErrorCode.ERR_CollectionExpressionNoTargetType, expr.Syntax.GetLocation());
459diagnostics.Add(ErrorCode.ERR_CannotInferDelegateType, syntax.GetLocation());
5013diagnostics.Add(ErrorCode.ERR_NoDynamicPhantomOnBaseCtor, errorLocation);
5158diagnostics.Add(ErrorCode.ERR_ChainingToSetsRequiredMembersRequiresSetsRequiredMembers, errorLocation);
5205diagnostics.Add(ErrorCode.ERR_CopyConstructorMustInvokeBaseCopyConstructor, errorLocation);
5214diagnostics.Add(ErrorCode.ERR_CopyConstructorMustInvokeBaseCopyConstructor, errorLocation);
5533diagnostics.Add(ErrorCode.ERR_MethodNameExpected, loc);
5609diagnostics.Add(ErrorCode.ERR_MethodNameExpected, argument.Syntax.Location);
5670diagnostics.Add(ErrorCode.ERR_MethodNameExpected, argument.Syntax.Location);
6138diagnostics.Add(ErrorCode.ERR_InterpolatedStringsReferencingInstanceCannotBeInObjectInitializers, argument.Syntax.Location);
9213diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportRefFields, node.Location);
10570diagnostics.Add(
Symbols\Source\SourceMemberContainerSymbol.cs (18)
2002diagnostics.Add(ErrorCode.ERR_CloneDisallowedInRecord, member.GetFirstLocation());
2353diagnostics.Add(ErrorCode.ERR_InconsistentIndexerNames, indexer.GetFirstLocation());
2953diagnostics.Add(ErrorCode.ERR_ScriptsAndSubmissionsCannotHaveRequiredMembers, member.GetFirstLocation());
4122diagnostics.Add(ErrorCode.ERR_PartialMethodOnlyOneActual, currentMethod.GetFirstLocation());
4128diagnostics.Add(ErrorCode.ERR_PartialMethodOnlyOneLatent, currentMethod.GetFirstLocation());
4141diagnostics.Add(ErrorCode.ERR_PartialPropertyDuplicateImplementation, currentProperty.GetFirstLocation());
4146diagnostics.Add(ErrorCode.ERR_PartialPropertyDuplicateDefinition, currentProperty.GetFirstLocation());
4152diagnostics.Add(ErrorCode.ERR_PartialPropertyDuplicateInitializer, currentProperty.GetFirstLocation());
4584diagnostics.Add(ErrorCode.ERR_InterfacesCantContainConstructors, member.GetFirstLocation());
4591diagnostics.Add(ErrorCode.ERR_OnlyClassesCanContainDestructors, member.GetFirstLocation());
4632diagnostics.Add(ErrorCode.ERR_ExtensionDisallowsMember, member.GetFirstLocation());
4697diagnostics.Add(ErrorCode.ERR_EnumsCantContainDefaultConstructor, location);
4704diagnostics.Add(ErrorCode.ERR_NonPublicParameterlessStructConstructor, location);
4736diagnostics.Add(ErrorCode.ERR_StructHasInitializersAndNoDeclaredConstructor, GetFirstLocation());
4953diagnostics.Add(ErrorCode.ERR_RecordAmbigCtor, copyCtor.GetFirstLocation());
4962diagnostics.Add(ErrorCode.ERR_RecordAmbigCtor, this.GetFirstLocation());
5823diagnostics.Add(ErrorCode.ERR_GlobalStatement, new SourceLocation(globalStatement));
5849diagnostics.Add(errorCode, new SourceLocation(locationSyntax));
Symbols\Source\SourceMethodSymbolWithAttributes.cs (11)
1150diagnostics.Add(ErrorCode.ERR_InterceptorGlobalNamespace, attributeLocation);
1190diagnostics.Add(ErrorCode.ERR_InterceptorFilePathCannotBeNull, attributeData.GetAttributeArgumentLocation(filePathParameterIndex));
1258diagnostics.Add(ErrorCode.ERR_InterceptorLineCharacterMustBePositive, location);
1370diagnostics.Add(ErrorCode.ERR_InterceptorMethodMustBeOrdinary, attributeLocation);
1378diagnostics.Add(ErrorCode.ERR_InterceptorCannotUseUnmanagedCallersOnly, attributeLocation);
1417diagnostics.Add(ErrorCode.ERR_CannotUseRefInUnmanagedCallersOnly, syntax.Location);
1492diagnostics.Add(ErrorCode.ERR_ComImportWithUserCtor, this.GetFirstLocation());
1553diagnostics.Add(ErrorCode.ERR_BadAsyncReturn, errorLocation);
1573diagnostics.Add(ErrorCode.ERR_SecurityCriticalOrSecuritySafeCriticalOnAsyncInClassOrStruct, errorLocation);
1582diagnostics.Add(ErrorCode.ERR_SynchronizedAsyncMethod, errorLocation);
1608diagnostics.Add(ErrorCode.ERR_MultipleEnumeratorCancellationAttributes, errorLocation);
Symbols\Source\SourceNamedTypeSymbol.cs (13)
1215diagnostics.Add(ErrorCode.ERR_InvalidInlineArrayLength, attribute.GetAttributeArgumentLocation(0));
1912diagnostics.Add(ErrorCode.ERR_StructLayoutAndExtendedLayout, GetFirstLocation());
1919diagnostics.Add(ErrorCode.ERR_InvalidInlineArrayLayout, GetFirstLocation());
1928diagnostics.Add(ErrorCode.ERR_InlineArrayUnsupportedElementFieldModifier, elementField.TryGetFirstLocation() ?? GetFirstLocation());
1942diagnostics.Add(ErrorCode.WRN_InlineArrayIndexerNotUsed, indexer.TryGetFirstLocation() ?? GetFirstLocation());
1950diagnostics.Add(ErrorCode.WRN_InlineArraySliceNotUsed, slice.TryGetFirstLocation() ?? GetFirstLocation());
1973diagnostics.Add(ErrorCode.WRN_InlineArrayConversionOperatorNotUsed, conversion.TryGetFirstLocation() ?? GetFirstLocation());
1982diagnostics.Add(ErrorCode.WRN_InlineArrayNotSupportedByLanguage, elementField.TryGetFirstLocation() ?? GetFirstLocation());
1986diagnostics.Add(ErrorCode.WRN_InlineArrayNotSupportedByLanguage, GetFirstLocation());
1992diagnostics.Add(ErrorCode.ERR_InvalidInlineArrayFields, GetFirstLocation());
1997diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportInlineArrayTypes, GetFirstLocation());
2005diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportExtendedLayoutTypes, GetFirstLocation());
2034diagnostics.Add(ErrorCode.ERR_EmbeddedAttributeMustFollowPattern, GetFirstLocation());
Symbols\Source\SourceOrdinaryMethodSymbol.cs (15)
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);
Symbols\Source\SourcePropertySymbol.cs (13)
607diagnostics.Add(ErrorCode.ERR_IndexerCantHaveVoidType, Location);
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 (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());
1107diagnostics.Add(ErrorCode.ERR_PartialMemberOnlyInPartialClass, location);
1111diagnostics.Add(ErrorCode.ERR_PartialMemberNotExplicit, location);
1115diagnostics.Add(ErrorCode.ERR_PartialMemberCannotBeAbstract, location);
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() ?