Index: pkg/analysis_server/lib/src/services/correction/namespace.dart |
diff --git a/pkg/analysis_server/lib/src/services/correction/namespace.dart b/pkg/analysis_server/lib/src/services/correction/namespace.dart |
index 87c38dd1ab610244acaa94339870365814a7f5a8..341b67b2056893bd5b0c9d01e80f4e1d2899e6cc 100644 |
--- a/pkg/analysis_server/lib/src/services/correction/namespace.dart |
+++ b/pkg/analysis_server/lib/src/services/correction/namespace.dart |
@@ -5,6 +5,7 @@ |
library services.src.correction.namespace; |
import 'package:analyzer/dart/ast/ast.dart'; |
+import 'package:analyzer/dart/ast/standard_resolution_map.dart'; |
import 'package:analyzer/dart/element/element.dart'; |
import 'package:analyzer/src/dart/resolver/scope.dart'; |
@@ -141,7 +142,8 @@ ImportElementInfo internal_getImportElementInfo(SimpleIdentifier prefixNode) { |
AstNode parent = prefixNode.parent; |
CompilationUnit unit = |
prefixNode.getAncestor((node) => node is CompilationUnit); |
- LibraryElement libraryElement = unit.element.library; |
+ LibraryElement libraryElement = |
+ resolutionMap.elementForCompilationUnit(unit).library; |
// prepare used element |
Element usedElement = null; |
if (parent is PrefixedIdentifier) { |