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)); |
} |