未验证 提交 2e23352c 编写于 作者: A AlekseyTs 提交者: GitHub

Move SourceOrdinaryMethodSymbol functionality that is not syntax specific into...

Move SourceOrdinaryMethodSymbol functionality that is not syntax specific into a new base class. (#45424)

This work is related to #45296.
上级 e75f8da4
......@@ -923,7 +923,7 @@ internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, r
/// Checks to see if a body is legal given the current modifiers.
/// If it is not, a diagnostic is added with the current type.
/// </summary>
protected void CheckModifiersForBody(SyntaxNode declarationSyntax, Location location, DiagnosticBag diagnostics)
protected void CheckModifiersForBody(Location location, DiagnosticBag diagnostics)
{
if (IsExtern && !IsAbstract)
{
......
......@@ -174,7 +174,7 @@ internal sealed override ImmutableArray<string> NotNullWhenFalseMembers
isMetadataVirtualIgnoringModifiers: explicitInterfaceImplementations.Any());
CheckFeatureAvailabilityAndRuntimeSupport(syntax, location, hasBody: true, diagnostics: diagnostics);
CheckModifiersForBody(syntax, location, diagnostics);
CheckModifiersForBody(location, diagnostics);
var info = ModifierUtils.CheckAccessibility(this.DeclarationModifiers, this, isExplicitInterfaceImplementation);
if (info != null)
......@@ -248,7 +248,7 @@ internal sealed override ImmutableArray<string> NotNullWhenFalseMembers
if (hasBody || hasExpressionBody)
{
CheckModifiersForBody(syntax, location, diagnostics);
CheckModifiersForBody(location, diagnostics);
}
var info = ModifierUtils.CheckAccessibility(this.DeclarationModifiers, this, isExplicitInterfaceImplementation);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册