Implement LibraryElement.hasExtUri for resynthesized.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2657743002 .
This commit is contained in:
Konstantin Shcheglov 2017-01-25 07:03:59 -08:00
parent b8ab9b7e17
commit 9264c1191a
2 changed files with 12 additions and 13 deletions

View file

@ -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.

View file

@ -16,16 +16,4 @@ main() {
class NonErrorResolverTest_Driver extends NonErrorResolverTest {
@override
bool get enableNewAnalysisDriver => true;
@failingTest
@override
test_nativeConstConstructor() {
return super.test_nativeConstConstructor();
}
@failingTest
@override
test_nativeFunctionBodyInNonSDKCode_function() {
return super.test_nativeFunctionBodyInNonSDKCode_function();
}
}