Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: pkg/analysis_server/lib/src/services/refactoring/inline_local.dart

Issue 1164823003: Replace 'Element.node' with 'Element.computeNode()'. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/lib/src/services/refactoring/inline_local.dart
diff --git a/pkg/analysis_server/lib/src/services/refactoring/inline_local.dart b/pkg/analysis_server/lib/src/services/refactoring/inline_local.dart
index 8ae9b94a0488d997dfd1bd4af62d88543b675bed..f0a345a52404c91d27ed0b82582f4e91252470e3 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/inline_local.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/inline_local.dart
@@ -74,7 +74,7 @@ class InlineLocalRefactoringImpl extends RefactoringImpl
Element element = offsetNode.staticElement;
if (element is LocalVariableElement) {
_variableElement = element;
- _variableNode = element.node;
+ _variableNode = element.computeNode();
}
}
}
@@ -100,9 +100,8 @@ class InlineLocalRefactoringImpl extends RefactoringImpl
for (SearchMatch reference in _references) {
if (reference.kind != MatchKind.READ) {
String message = format(
- "Local variable '{0}' is assigned more than once.", [
- _variableElement.displayName
- ]);
+ "Local variable '{0}' is assigned more than once.",
+ [_variableElement.displayName]);
return new RefactoringStatus.fatal(
message, newLocation_fromMatch(reference));
}

Powered by Google App Engine
This is Rietveld 408576698