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());
875diagnostics.Add(ErrorCode.ERR_InternalError, node.Location);
918diagnostics.Add(ErrorCode.ERR_ThrowMisplaced, node.ThrowKeyword.GetLocation());
1078diagnostics.Add(ErrorCode.ERR_VoidInTuple, argumentSyntax.Location);
1421diagnostics.Add(ErrorCode.ERR_BadDynamicTypeof, node.Location);
1427diagnostics.Add(ErrorCode.ERR_BadNullableTypeof, node.Location);
3239diagnostics.Add(ErrorCode.ERR_ScopedDiscard, scopedType.ScopedKeyword.GetLocation());
3245diagnostics.Add(ErrorCode.ERR_OutVariableCannotBeByRef, refType.Location);
3289diagnostics.Add(ErrorCode.ERR_OutVariableCannotBeByRef, refType.Location);
3314diagnostics.Add(ErrorCode.ERR_ScopedRefAndRefStructOnly, typeSyntax.Location);
5014diagnostics.Add(ErrorCode.ERR_NoDynamicPhantomOnBaseCtor, errorLocation);
5160diagnostics.Add(ErrorCode.ERR_ChainingToSetsRequiredMembersRequiresSetsRequiredMembers, errorLocation);
5207diagnostics.Add(ErrorCode.ERR_CopyConstructorMustInvokeBaseCopyConstructor, errorLocation);
5216diagnostics.Add(ErrorCode.ERR_CopyConstructorMustInvokeBaseCopyConstructor, errorLocation);
5291diagnostics.Add(ErrorCode.ERR_AnnotationDisallowedInObjectCreation, node.Location);
5324diagnostics.Add(ErrorCode.ERR_InvalidObjectCreation, node.Type.Location));
5340diagnostics.Add(ErrorCode.ERR_InsufficientStack, syntax.Location);
5537diagnostics.Add(ErrorCode.ERR_MethodNameExpected, loc);
5613diagnostics.Add(ErrorCode.ERR_MethodNameExpected, argument.Syntax.Location);
5674diagnostics.Add(ErrorCode.ERR_MethodNameExpected, argument.Syntax.Location);
5700diagnostics.Add(ErrorCode.ERR_NewWithTupleTypeSyntax, node.Type.GetLocation());
6120diagnostics.Add(ErrorCode.ERR_InterpolatedStringsReferencingInstanceCannotBeInObjectInitializers, argument.Syntax.Location);
9218diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportRefFields, node.Location);
10600diagnostics.Add(
Binder\Binder_Patterns.cs (16)
533diagnostics.Add(ErrorCode.WRN_GivenExpressionNeverMatchesPattern, node.Location);
541diagnostics.Add(ErrorCode.WRN_GivenExpressionAlwaysMatchesConstant, node.Location);
549diagnostics.Add(ErrorCode.WRN_GivenExpressionAlwaysMatchesPattern, node.Location);
655diagnostics.Add(ErrorCode.ERR_MisplacedSlicePattern, node.Location);
970diagnostics.Add(ErrorCode.ERR_DefaultPattern, e.Location);
977diagnostics.Add(ErrorCode.ERR_IllegalSuppression, e.Location);
1067diagnostics.Add(ErrorCode.ERR_ConstantExpected, patternExpression.Location);
1284diagnostics.Add(ErrorCode.ERR_PointerTypeInPatternMatching, typeSyntax.Location);
1489diagnostics.Add(ErrorCode.ERR_DesignatorBeneathPatternCombinator, identifier.GetLocation());
1581diagnostics.Add(ErrorCode.ERR_PointerTypeInPatternMatching, node.Location);
1714diagnostics.Add(ErrorCode.ERR_IdentifierExpected, subPattern.ExpressionColon.Expression.Location);
1745diagnostics.Add(ErrorCode.ERR_ArgumentNameInITuplePattern, subpatternSyntax.NameColon.Location);
1749diagnostics.Add(ErrorCode.ERR_IdentifierExpected, subpatternSyntax.ExpressionColon.Expression.Location);
1794diagnostics.Add(ErrorCode.ERR_IdentifierExpected, subpatternSyntax.ExpressionColon.Expression.Location);
1945diagnostics.Add(ErrorCode.ERR_PointerTypeInPatternMatching, node.Location);
2352diagnostics.Add(ErrorCode.ERR_RelationalPatternWithNaN, node.Expression.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);
2270diagnostics.Add(ErrorCode.ERR_InternalError, syntax.Location);
3062diagnostics.Add(ErrorCode.ERR_ReturnInIterator, syntax.ReturnKeyword.GetLocation());
3070diagnostics.Add(ErrorCode.ERR_MustNotHaveRefReturn, syntax.ReturnKeyword.GetLocation());
3075diagnostics.Add(ErrorCode.ERR_ReturnInIterator, syntax.ReturnKeyword.GetLocation());
3084diagnostics.Add(errorCode, syntax.ReturnKeyword.GetLocation());
3290diagnostics.Add(ErrorCode.ERR_TooManyCatches, catchSyntax.CatchKeyword.GetLocation());
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\SourceEventSymbol.cs (13)
355diagnostics.Add(ErrorCode.ERR_RequiresUnsafeAttributeInSource, arguments.AttributeSyntaxOpt!.Location);
382diagnostics.Add(ErrorCode.ERR_UnscopedRefAttributeUnsupportedMemberTarget, arguments.AttributeSyntaxOpt!.Location);
659diagnostics.Add(ErrorCode.ERR_PartialMemberOnlyInPartialClass, location);
663diagnostics.Add(ErrorCode.ERR_PartialMemberNotExplicit, location);
667diagnostics.Add(ErrorCode.ERR_PartialMemberCannotBeAbstract, location);
892diagnostics.Add(ErrorCode.ERR_ExternMemberRequiresUnsafeOrSafe,
905diagnostics.Add(ErrorCode.ERR_SafeModifierUnsupportedTarget,
939diagnostics.Add(ErrorCode.ERR_PartialMemberTypeDifference, implementation.GetFirstLocation());
954diagnostics.Add(ErrorCode.ERR_PartialMemberStaticDifference, implementation.GetFirstLocation());
959diagnostics.Add(ErrorCode.ERR_PartialMemberUnsafeDifference, implementation.GetFirstLocation());
964diagnostics.Add(ErrorCode.ERR_PartialMemberSafeDifference, implementation.GetFirstLocation());
970diagnostics.Add(ErrorCode.ERR_PartialMemberAccessibilityDifference, implementation.GetFirstLocation());
978diagnostics.Add(ErrorCode.ERR_PartialMemberExtendedModDifference, implementation.GetFirstLocation());
Symbols\Source\SourceMemberContainerSymbol.cs (28)
394diagnostics.Add(ErrorCode.WRN_UnsafeMeaningless, GetFirstLocation());
2066diagnostics.Add(ErrorCode.ERR_InstanceFieldInUnion, field.GetFirstLocation());
2074diagnostics.Add(ErrorCode.ERR_InstanceCtorWithOneParameterInUnion, ctor.GetFirstLocation());
2080diagnostics.Add(ErrorCode.ERR_MemberProviderInUnionDeclaration, location);
2087diagnostics.Add(ErrorCode.ERR_MissingUnionCaseTypes, location);
2092diagnostics.Add(ErrorCode.ERR_MissingUnionValueProperty, location);
2140diagnostics.Add(ErrorCode.ERR_CloneDisallowedInRecord, member.GetFirstLocation());
2491diagnostics.Add(ErrorCode.ERR_InconsistentIndexerNames, indexer.GetFirstLocation());
3091diagnostics.Add(ErrorCode.ERR_ScriptsAndSubmissionsCannotHaveRequiredMembers, member.GetFirstLocation());
4107diagnostics.Add(ErrorCode.ERR_ConstructorInStaticClass, syntax.Identifier.GetLocation());
4122diagnostics.Add(ErrorCode.ERR_MultipleRecordParameterLists, parameterList.Location);
4288diagnostics.Add(ErrorCode.ERR_PartialMethodOnlyOneActual, currentMethod.GetFirstLocation());
4294diagnostics.Add(ErrorCode.ERR_PartialMethodOnlyOneLatent, currentMethod.GetFirstLocation());
4307diagnostics.Add(ErrorCode.ERR_PartialPropertyDuplicateImplementation, currentProperty.GetFirstLocation());
4312diagnostics.Add(ErrorCode.ERR_PartialPropertyDuplicateDefinition, currentProperty.GetFirstLocation());
4318diagnostics.Add(ErrorCode.ERR_PartialPropertyDuplicateInitializer, currentProperty.GetFirstLocation());
4750diagnostics.Add(ErrorCode.ERR_InterfacesCantContainConstructors, member.GetFirstLocation());
4757diagnostics.Add(ErrorCode.ERR_OnlyClassesCanContainDestructors, member.GetFirstLocation());
4798diagnostics.Add(ErrorCode.ERR_ExtensionDisallowsMember, member.GetFirstLocation());
4863diagnostics.Add(ErrorCode.ERR_EnumsCantContainDefaultConstructor, location);
4870diagnostics.Add(ErrorCode.ERR_NonPublicParameterlessStructConstructor, location);
4902diagnostics.Add(ErrorCode.ERR_StructHasInitializersAndNoDeclaredConstructor, GetFirstLocation());
4976diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, parameterSyntax.Identifier.GetLocation());
5025diagnostics.Add(ErrorCode.ERR_UnionDeclarationNeedsCaseTypes, valuePropertySyntax.Identifier.GetLocation());
5211diagnostics.Add(ErrorCode.ERR_RecordAmbigCtor, copyCtor.GetFirstLocation());
5220diagnostics.Add(ErrorCode.ERR_RecordAmbigCtor, this.GetFirstLocation());
6083diagnostics.Add(ErrorCode.ERR_GlobalStatement, new SourceLocation(globalStatement));
6109diagnostics.Add(errorCode, new SourceLocation(locationSyntax));
Symbols\Source\SourceMemberFieldSymbol.cs (11)
61diagnostics.Add(ErrorCode.ERR_FieldCantHaveVoidType, getTypeErrorLocation());
236diagnostics.Add(ErrorCode.ERR_AbstractField, errorLocation);
418diagnostics.Add(ErrorCode.ERR_InterfacesCantContainFields, ErrorLocation);
541diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportRefFields, ErrorLocation);
544diagnostics.Add(ErrorCode.ERR_RefFieldInNonRefStruct, ErrorLocation);
547diagnostics.Add(ErrorCode.ERR_RefFieldCannotReferToRefStruct, typeSyntax.SkipScoped(out _).Location);
561diagnosticsForFirstDeclarator.Add(ErrorCode.ERR_ImplicitlyTypedVariableCannotBeConst, typeSyntax.Location);
571diagnosticsForFirstDeclarator.Add(ErrorCode.ERR_ImplicitlyTypedVariableMultipleDeclarator, typeSyntax.Location);
611diagnostics.Add(ErrorCode.ERR_FixedNotInStruct, ErrorLocation);
616diagnostics.Add(ErrorCode.ERR_FixedFieldMustNotBeRef, ErrorLocation);
624diagnostics.Add(ErrorCode.ERR_IllegalFixedType, loc);
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.cs (20)
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);
1967diagnostics.Add(ErrorCode.ERR_StructLayoutAndExtendedLayout, GetFirstLocation());
1974diagnostics.Add(ErrorCode.ERR_InvalidInlineArrayLayout, GetFirstLocation());
1983diagnostics.Add(ErrorCode.ERR_InlineArrayUnsupportedElementFieldModifier, elementField.TryGetFirstLocation() ?? GetFirstLocation());
1997diagnostics.Add(ErrorCode.WRN_InlineArrayIndexerNotUsed, indexer.TryGetFirstLocation() ?? GetFirstLocation());
2005diagnostics.Add(ErrorCode.WRN_InlineArraySliceNotUsed, slice.TryGetFirstLocation() ?? GetFirstLocation());
2028diagnostics.Add(ErrorCode.WRN_InlineArrayConversionOperatorNotUsed, conversion.TryGetFirstLocation() ?? GetFirstLocation());
2037diagnostics.Add(ErrorCode.WRN_InlineArrayNotSupportedByLanguage, elementField.TryGetFirstLocation() ?? GetFirstLocation());
2041diagnostics.Add(ErrorCode.WRN_InlineArrayNotSupportedByLanguage, GetFirstLocation());
2047diagnostics.Add(ErrorCode.ERR_InvalidInlineArrayFields, GetFirstLocation());
2052diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportInlineArrayTypes, GetFirstLocation());
2060diagnostics.Add(ErrorCode.ERR_RuntimeDoesNotSupportExtendedLayoutTypes, GetFirstLocation());
2089diagnostics.Add(ErrorCode.ERR_EmbeddedAttributeMustFollowPattern, GetFirstLocation());
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\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 (20)
309diagnostics.Add(ErrorCode.ERR_InstancePropertyInitializerInInterface, Location);
313diagnostics.Add(ErrorCode.ERR_InitializerOnNonAutoProperty, Location);
891diagnostics.Add(ErrorCode.ERR_RefReturningPropertiesCannotBeRequired, Location);
900diagnostics.Add(ErrorCode.ERR_AutoPropsInRoStruct, Location);
914diagnostics.Add(ErrorCode.ERR_AutoPropertyCannotBeRefReturning, Location);
924diagnostics.Add(ErrorCode.ERR_AutoPropertyMustOverrideSet, Location);
936diagnostics.Add(ErrorCode.ERR_InterfacesCantContainFields, Location);
951diagnostics.Add(ErrorCode.ERR_RefPropertyCannotHaveSetAccessor, _setMethod.GetFirstLocation());
980diagnostics.Add(ErrorCode.ERR_RefPropertyMustHaveGetAccessor, Location);
988diagnostics.Add(ErrorCode.ERR_AutoPropertyMustHaveGetAccessor, _setMethod!.GetFirstLocation());
1055diagnostics.Add(ErrorCode.ERR_ExternMemberRequiresUnsafeOrSafe,
1068diagnostics.Add(ErrorCode.ERR_SafeModifierUnsupportedTarget,
1133diagnostics.Add(ErrorCode.ERR_PartialMemberOnlyInPartialClass, location);
1137diagnostics.Add(ErrorCode.ERR_PartialMemberNotExplicit, location);
1141diagnostics.Add(ErrorCode.ERR_PartialMemberCannotBeAbstract, location);
1592diagnostics.Add(ErrorCode.ERR_ExplicitDynamicAttr, arguments.AttributeSyntaxOpt.Location);
1596diagnostics.Add(ErrorCode.ERR_RequiresUnsafeAttributeInSource, arguments.AttributeSyntaxOpt.Location);
1636diagnostics.Add(ErrorCode.WRN_UnscopedRefAttributeOldRules, arguments.AttributeSyntaxOpt.Location);
1650diagnostics.Add(ErrorCode.ERR_UnscopedRefAttributeUnsupportedMemberTarget, arguments.AttributeSyntaxOpt.Location);
1775diagnostics.Add(ErrorCode.ERR_InsufficientStack, node.ArgumentList.Arguments[0].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() ?