Index: pkg/analyzer/lib/src/dart/element/element.dart |
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart |
index eca92421262506b8fe548fb8c628d996599daf2c..308501bdca3d0589f6582d1b9c1507eefff8cf18 100644 |
--- a/pkg/analyzer/lib/src/dart/element/element.dart |
+++ b/pkg/analyzer/lib/src/dart/element/element.dart |
@@ -5536,7 +5536,18 @@ class LibraryElementImpl extends ElementImpl implements LibraryElement { |
} |
@override |
- bool get hasExtUri => hasModifier(Modifier.HAS_EXT_URI); |
+ bool get hasExtUri { |
+ if (_unlinkedDefiningUnit != null) { |
+ List<UnlinkedImport> unlinkedImports = _unlinkedDefiningUnit.imports; |
+ for (UnlinkedImport import in unlinkedImports) { |
+ if (DartUriResolver.isDartExtUri(import.uri)) { |
+ return true; |
+ } |
+ } |
+ return false; |
+ } |
+ return hasModifier(Modifier.HAS_EXT_URI); |
+ } |
/** |
* Set whether this library has an import of a "dart-ext" URI. |