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

Unified Diff: pkg/analyzer/lib/src/dart/element/element.dart

Issue 2657743002: Implement LibraryElement.hasExtUri for resynthesized. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/non_error_resolver_driver_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/non_error_resolver_driver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698