mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 15:47:08 +00:00
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:
parent
b8ab9b7e17
commit
9264c1191a
|
@ -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.
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue