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

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

Issue 2226613004: Suppress follow-on errors when a file is imported with either a prefix or a show clause (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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
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 4ff2448fed81fd5929db03745844d9fc6cb73db6..b3ec67ed25bf694ab5c7de1ab0c3640757743243 100644
--- a/pkg/analyzer/lib/src/task/dart.dart
+++ b/pkg/analyzer/lib/src/task/dart.dart
@@ -6545,8 +6545,10 @@ class _SourceClosureTaskInputBuilder implements TaskInputBuilder<List<Source>> {
int length = imports.length;
for (int i = 0; i < length; i++) {
ImportElement importElement = imports[i];
- Source importedSource = importElement.importedLibrary.source;
- _newSources.add(importedSource);
+ Source importedSource = importElement.importedLibrary?.source;
+ if (importedSource != null) {
+ _newSources.add(importedSource);
+ }
}
}
if (kind == _SourceClosureKind.EXPORT ||
@@ -6555,8 +6557,10 @@ class _SourceClosureTaskInputBuilder implements TaskInputBuilder<List<Source>> {
int length = exports.length;
for (int i = 0; i < length; i++) {
ExportElement exportElement = exports[i];
- Source exportedSource = exportElement.exportedLibrary.source;
- _newSources.add(exportedSource);
+ Source exportedSource = exportElement.exportedLibrary?.source;
+ if (exportedSource != null) {
+ _newSources.add(exportedSource);
+ }
}
}
}

Powered by Google App Engine
This is Rietveld 408576698