Binder\Binder_Expressions.cs (13)
358diagnostics.Add(ErrorCode.ERR_DefaultLiteralNoTargetType, defaultExpr.Syntax.GetLocation());
401diagnostics.Add(ErrorCode.ERR_CollectionExpressionNoTargetType, expr.Syntax.GetLocation());
427diagnostics.Add(ErrorCode.ERR_CannotInferDelegateType, syntax.GetLocation());
4936diagnostics.Add(ErrorCode.ERR_NoDynamicPhantomOnBaseCtor, errorLocation);
5080diagnostics.Add(ErrorCode.ERR_ChainingToSetsRequiredMembersRequiresSetsRequiredMembers, errorLocation);
5126diagnostics.Add(ErrorCode.ERR_CopyConstructorMustInvokeBaseCopyConstructor, errorLocation);
5135diagnostics.Add(ErrorCode.ERR_CopyConstructorMustInvokeBaseCopyConstructor, errorLocation);
5374diagnostics.Add(ErrorCode.ERR_MethodNameExpected, loc);
5450diagnostics.Add(ErrorCode.ERR_MethodNameExpected, argument.Syntax.Location);
5511diagnostics.Add(ErrorCode.ERR_MethodNameExpected, argument.Syntax.Location);
5979diagnostics.Add(ErrorCode.ERR_InterpolatedStringsReferencingInstanceCannotBeInObjectInitializers, argument.Syntax.Location);
8952diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportRefFields, node.Location);
10289diagnostics.Add(
Symbols\Source\SourceMemberContainerSymbol.cs (27)
2001diagnostics.Add(ErrorCode.ERR_CloneDisallowedInRecord, member.GetFirstLocation());
2352diagnostics.Add(ErrorCode.ERR_InconsistentIndexerNames, indexer.GetFirstLocation());
2952diagnostics.Add(ErrorCode.ERR_ScriptsAndSubmissionsCannotHaveRequiredMembers, member.GetFirstLocation());
4115diagnostics.Add(ErrorCode.ERR_PartialMethodOnlyOneActual, currentMethod.GetFirstLocation());
4121diagnostics.Add(ErrorCode.ERR_PartialMethodOnlyOneLatent, currentMethod.GetFirstLocation());
4134diagnostics.Add(ErrorCode.ERR_PartialPropertyDuplicateImplementation, currentProperty.GetFirstLocation());
4139diagnostics.Add(ErrorCode.ERR_PartialPropertyDuplicateDefinition, currentProperty.GetFirstLocation());
4145diagnostics.Add(ErrorCode.ERR_PartialPropertyDuplicateInitializer, currentProperty.GetFirstLocation());
4577diagnostics.Add(ErrorCode.ERR_InterfacesCantContainConstructors, member.GetFirstLocation());
4584diagnostics.Add(ErrorCode.ERR_OnlyClassesCanContainDestructors, member.GetFirstLocation());
4625diagnostics.Add(ErrorCode.ERR_ExtensionDisallowsMember, member.GetFirstLocation());
4690diagnostics.Add(ErrorCode.ERR_EnumsCantContainDefaultConstructor, location);
4697diagnostics.Add(ErrorCode.ERR_NonPublicParameterlessStructConstructor, location);
4729diagnostics.Add(ErrorCode.ERR_StructHasInitializersAndNoDeclaredConstructor, GetFirstLocation());
4946diagnostics.Add(ErrorCode.ERR_RecordAmbigCtor, copyCtor.GetFirstLocation());
4955diagnostics.Add(ErrorCode.ERR_RecordAmbigCtor, this.GetFirstLocation());
5515diagnostics.Add(ErrorCode.ERR_NamespaceUnexpected,
5559diagnostics.Add(ErrorCode.ERR_NamespaceUnexpected,
5573diagnostics.Add(ErrorCode.ERR_NamespaceUnexpected,
5592diagnostics.Add(ErrorCode.ERR_NamespaceUnexpected,
5610diagnostics.Add(ErrorCode.ERR_NamespaceUnexpected,
5661diagnostics.Add(
5715diagnostics.Add(ErrorCode.ERR_NamespaceUnexpected,
5735diagnostics.Add(ErrorCode.ERR_NamespaceUnexpected,
5752diagnostics.Add(ErrorCode.ERR_NamespaceUnexpected,
5767diagnostics.Add(ErrorCode.ERR_NamespaceUnexpected,
5828diagnostics.Add(ErrorCode.ERR_GlobalStatement, new SourceLocation(globalStatement));
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 (11)
1214diagnostics.Add(ErrorCode.ERR_InvalidInlineArrayLength, attribute.GetAttributeArgumentLocation(0));
1888diagnostics.Add(ErrorCode.ERR_InvalidInlineArrayLayout, GetFirstLocation());
1897diagnostics.Add(ErrorCode.ERR_InlineArrayUnsupportedElementFieldModifier, elementField.TryGetFirstLocation() ?? GetFirstLocation());
1911diagnostics.Add(ErrorCode.WRN_InlineArrayIndexerNotUsed, indexer.TryGetFirstLocation() ?? GetFirstLocation());
1919diagnostics.Add(ErrorCode.WRN_InlineArraySliceNotUsed, slice.TryGetFirstLocation() ?? GetFirstLocation());
1942diagnostics.Add(ErrorCode.WRN_InlineArrayConversionOperatorNotUsed, conversion.TryGetFirstLocation() ?? GetFirstLocation());
1951diagnostics.Add(ErrorCode.WRN_InlineArrayNotSupportedByLanguage, elementField.TryGetFirstLocation() ?? GetFirstLocation());
1955diagnostics.Add(ErrorCode.WRN_InlineArrayNotSupportedByLanguage, GetFirstLocation());
1961diagnostics.Add(ErrorCode.ERR_InvalidInlineArrayFields, GetFirstLocation());
1966diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportInlineArrayTypes, GetFirstLocation());
1993diagnostics.Add(ErrorCode.ERR_EmbeddedAttributeMustFollowPattern, GetFirstLocation());
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());
853diagnostics.Add(ErrorCode.ERR_PartialMemberCannotBeAbstract, location);
930diagnostics.Add(ErrorCode.ERR_BadAsyncLacksBody, location);
946diagnostics.Add(ErrorCode.ERR_BadVarargs, location);
950diagnostics.Add(ErrorCode.ERR_VarargsAsync, location);
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());
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() ?