Skip to content

Commit 85cadff

Browse files
stereotype441commit-bot@chromium.org
authored andcommitted
Revert "Fix implementation of isDartCore and isDartAsync."
This reverts commit 0779751. Reason for revert: Broke test unittest-asserts-release-win:pkg/analyzer/test/generated/resolver_test (see https://ci.chromium.org/p/dart/builders/ci.sandbox/analyzer-win-release/5691) Original change's description: > Fix implementation of isDartCore and isDartAsync. > > It's not sufficient to check the name of the library, since a > user-provided library could always name itself `dart.core` or > `dart.async`. > > Change-Id: Id99cfc1ec89c5941e16b556e3c4dd175875a673f > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104580 > Reviewed-by: Brian Wilkerson <[email protected]> > Commit-Queue: Paul Berry <[email protected]> [email protected],[email protected] # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I7a27b46f4b2d1b3b43f9943933ec2a75b5a5b806 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105346 Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Paul Berry <[email protected]>
1 parent 40ef0c6 commit 85cadff

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

pkg/analyzer/lib/src/dart/element/element.dart

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6653,16 +6653,10 @@ class LibraryElementImpl extends ElementImpl implements LibraryElement {
66536653
entryPoint != null && isOrImportsBrowserLibrary;
66546654

66556655
@override
6656-
bool get isDartAsync {
6657-
var uri = definingCompilationUnit.source?.uri;
6658-
return uri != null && DartUriResolver.isDartUri(uri) && uri.path == 'async';
6659-
}
6656+
bool get isDartAsync => name == "dart.async";
66606657

66616658
@override
6662-
bool get isDartCore {
6663-
var uri = definingCompilationUnit.source?.uri;
6664-
return uri != null && DartUriResolver.isDartUri(uri) && uri.path == 'core';
6665-
}
6659+
bool get isDartCore => name == "dart.core";
66666660

66676661
@override
66686662
bool get isInSdk {

0 commit comments

Comments
 (0)