提交 c16f2de7 编写于 作者: M manishv

Fix for bug 1019276: Extra set of parenthesis added when simplifying type name

Handle the trivial case of ((x)) -> (x) when only the inner parenthesized expression has Simplifier annotation. (changeset 1329157)
上级 af682941
......@@ -13,7 +13,8 @@ public static bool CanRemoveParentheses(this ParenthesizedExpressionSyntax node)
// Simplest cases:
// ((x)) -> (x)
if (expression.IsKind(SyntaxKind.ParenthesizedExpression))
if (expression.IsKind(SyntaxKind.ParenthesizedExpression) ||
parentExpression.IsKind(SyntaxKind.ParenthesizedExpression))
{
return true;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册