| 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 362080afe059edbdee8fa5c63f0bdc7bb2c8ec76..74e1add2fc130bad3606b0c0cf425e6077a7d9b6 100644
|
| --- a/pkg/analysis_server/lib/src/services/refactoring/inline_local.dart
|
| +++ b/pkg/analysis_server/lib/src/services/refactoring/inline_local.dart
|
| @@ -37,7 +37,8 @@ class InlineLocalRefactoringImpl extends RefactoringImpl
|
| VariableDeclaration _variableNode;
|
| List<SearchMatch> _references;
|
|
|
| - InlineLocalRefactoringImpl(this.searchEngine, this.astProvider, this.unit, this.offset) {
|
| + InlineLocalRefactoringImpl(
|
| + this.searchEngine, this.astProvider, this.unit, this.offset) {
|
| unitElement = unit.element;
|
| utils = new CorrectionUtils(unit);
|
| }
|
| @@ -77,7 +78,8 @@ class InlineLocalRefactoringImpl extends RefactoringImpl
|
| Element element = offsetNode.staticElement;
|
| if (element is LocalVariableElement) {
|
| _variableElement = element;
|
| - _variableNode = await astProvider.getResolvedNodeForElement(element);
|
| + AstNode name = await astProvider.getResolvedNameForElement(element);
|
| + _variableNode = name.parent as VariableDeclaration;
|
| }
|
| }
|
| }
|
|
|