提交 db44ad3e 编写于 作者: A Allison Chou

rename variable

上级 e7265707
......@@ -198,9 +198,9 @@ private static SyntaxNode WithBlockBody(SyntaxNode node, BlockSyntax body)
declarationStatement = declarationStatement.WithAdditionalAnnotations(Formatter.Annotation);
// If we're within a local function, our scope for the new local declaration is expanded to include the enclosing member.
var oldOutermostNode = block.GetAncestor<LocalFunctionStatementSyntax>() == null ? block : (SyntaxNode)block.GetAncestor<MemberDeclarationSyntax>();
var scope = block.GetAncestor<LocalFunctionStatementSyntax>() == null ? block : (SyntaxNode)block.GetAncestor<MemberDeclarationSyntax>();
var matches = FindMatches(document, expression, document, oldOutermostNode, allOccurrences, cancellationToken);
var matches = FindMatches(document, expression, document, scope, allOccurrences, cancellationToken);
Debug.Assert(matches.Contains(expression));
(document, matches) = await ComplexifyParentingStatements(document, matches, cancellationToken).ConfigureAwait(false);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册