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 = |