| Index: pkg/analysis_server/lib/src/services/completion/dart_completion_cache.dart
|
| diff --git a/pkg/analysis_server/lib/src/services/completion/dart_completion_cache.dart b/pkg/analysis_server/lib/src/services/completion/dart_completion_cache.dart
|
| index ca9c75af65e6c471ad515c08355faa971a30fec0..9cc5f663d05dbc5a8e0636aa3ea9ac2eb5e78327 100644
|
| --- a/pkg/analysis_server/lib/src/services/completion/dart_completion_cache.dart
|
| +++ b/pkg/analysis_server/lib/src/services/completion/dart_completion_cache.dart
|
| @@ -198,6 +198,11 @@ class DartCompletionCache extends CompletionCache {
|
| void _addDartCoreSuggestions() {
|
| Source coreUri = context.sourceFactory.forUri('dart:core');
|
| LibraryElement coreLib = context.getLibraryElement(coreUri);
|
| + if (coreLib == null) {
|
| + // If the core library has not been analyzed yet, then we cannot add any
|
| + // suggestions from it.
|
| + return;
|
| + }
|
| Namespace coreNamespace =
|
| new NamespaceBuilder().createPublicNamespaceForLibrary(coreLib);
|
| coreNamespace.definedNames.forEach((String name, Element elem) {
|
|
|