mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 22:59:47 +00:00
Fix the test to determine whether a library is in the SDK
Change-Id: I711daae49f27ca21fb4adce3c10ccb1bfc9d72a8 Reviewed-on: https://dart-review.googlesource.com/48760 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
parent
506ac7f953
commit
055dfad887
|
@ -6618,8 +6618,13 @@ class LibraryElementImpl extends ElementImpl implements LibraryElement {
|
|||
bool get isDartCore => name == "dart.core";
|
||||
|
||||
@override
|
||||
bool get isInSdk =>
|
||||
StringUtilities.startsWith5(name, 0, 0x64, 0x61, 0x72, 0x74, 0x2E);
|
||||
bool get isInSdk {
|
||||
Uri uri = definingCompilationUnit.source?.uri;
|
||||
if (uri != null) {
|
||||
return DartUriResolver.isDartUri(uri);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return `true` if the receiver directly or indirectly imports the
|
||||
|
|
Loading…
Reference in a new issue