提交 887b20b4 编写于 作者: C CyrusNajmabadi

Use patterns in more places.

上级 f922b886
......@@ -483,15 +483,13 @@ private bool ReplacementChangesSemanticsForNode(TSyntaxNode currentOriginalNode,
var newForEachStatement = (TForEachStatementSyntax)currentReplacedNode;
return ReplacementBreaksForEachStatement(originalForEachStatement, newForEachStatement);
}
else if (currentOriginalNode is TAttributeSyntax)
else if (currentOriginalNode is TAttributeSyntax originalAttribute)
{
var originalAttribute = (TAttributeSyntax)currentOriginalNode;
var newAttribute = (TAttributeSyntax)currentReplacedNode;
return ReplacementBreaksAttribute(originalAttribute, newAttribute);
}
else if (currentOriginalNode is TThrowStatementSyntax)
else if (currentOriginalNode is TThrowStatementSyntax originalThrowStatement)
{
var originalThrowStatement = (TThrowStatementSyntax)currentOriginalNode;
var newThrowStatement = (TThrowStatementSyntax)currentReplacedNode;
return ReplacementBreaksThrowStatement(originalThrowStatement, newThrowStatement);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册