提交 3c0ac0db 编写于 作者: B Balaji Soundrarajan

Merge pull request #4365 from basoundr/4240ReviewComment

Implement Review comment for issue #4240
......@@ -61,7 +61,7 @@ public static bool IsValidBracePair(this ValueTuple<SyntaxToken, SyntaxToken> br
return true;
}
public static bool IsOpenParenInParameterListOfAConversionOperator(this SyntaxToken token)
public static bool IsOpenParenInParameterListOfAConversionOperatorDeclaration(this SyntaxToken token)
{
return token.IsOpenParenInParameterList() && token.Parent.IsParentKind(SyntaxKind.ConversionOperatorDeclaration);
}
......
......@@ -32,7 +32,7 @@ public override AdjustSpacesOperation GetAdjustSpacesOperation(SyntaxToken previ
}
// Case: public static implicit operator string(Program p) { return null; }
if (previousToken.IsKeyword() && currentToken.IsOpenParenInParameterListOfAConversionOperator())
if (previousToken.IsKeyword() && currentToken.IsOpenParenInParameterListOfAConversionOperatorDeclaration())
{
return AdjustSpacesOperationZeroOrOne(optionSet, CSharpFormattingOptions.SpacingAfterMethodDeclarationName);
}
......
......@@ -6259,7 +6259,7 @@ public void VerifySpacingAfterMethodDeclarationName_NonDefault()
var code = @"class Program
{
public static Program operator + (Program p1, Program p2) { return null; }
public static implicit operator string (Program p) { return null; }
public static implicit operator string (Program p) { return null; }
public static void M () { }
}";
var expected = @"class Program
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册