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

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

Issue 2044383003: Issue 26639. Set source for mock 'dart:async' library. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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 | « pkg/analyzer/lib/src/context/context.dart ('k') | pkg/analyzer/test/generated/resolver_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/dart.dart
diff --git a/pkg/analyzer/lib/src/task/dart.dart b/pkg/analyzer/lib/src/task/dart.dart
index c898feb81ab3f63da05b044a77bbc2989424a7ba..4586fc03b1d0783cf40abe9a97a15fbbeacb0de0 100644
--- a/pkg/analyzer/lib/src/task/dart.dart
+++ b/pkg/analyzer/lib/src/task/dart.dart
@@ -1804,8 +1804,9 @@ class BuildTypeProviderTask extends SourceBasedAnalysisTask {
LibraryElement coreLibrary = getRequiredInput(CORE_INPUT);
LibraryElement asyncLibrary = getOptionalInput(ASYNC_INPUT);
if (asyncLibrary == null) {
- asyncLibrary =
- (context as AnalysisContextImpl).createMockAsyncLib(coreLibrary);
+ Source asyncSource = context.sourceFactory.forUri(DartSdk.DART_ASYNC);
+ asyncLibrary = (context as AnalysisContextImpl)
+ .createMockAsyncLib(coreLibrary, asyncSource);
}
Namespace coreNamespace = coreLibrary.publicNamespace;
Namespace asyncNamespace = asyncLibrary.publicNamespace;
@@ -1814,7 +1815,8 @@ class BuildTypeProviderTask extends SourceBasedAnalysisTask {
//
if (!context.analysisOptions.enableAsync) {
AnalysisContextImpl contextImpl = context;
- asyncLibrary = contextImpl.createMockAsyncLib(coreLibrary);
+ Source asyncSource = context.sourceFactory.forUri(DartSdk.DART_ASYNC);
+ asyncLibrary = contextImpl.createMockAsyncLib(coreLibrary, asyncSource);
asyncNamespace = asyncLibrary.publicNamespace;
}
TypeProvider typeProvider =
« no previous file with comments | « pkg/analyzer/lib/src/context/context.dart ('k') | pkg/analyzer/test/generated/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698