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

Unified Diff: pkg/analyzer/lib/src/summary/index_unit.dart

Issue 2235373003: Fix summary handling of unresolved imports, exports, and parts. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Simplify `allowMissingFiles` 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
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | pkg/analyzer/lib/src/summary/resynthesize.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/index_unit.dart
diff --git a/pkg/analyzer/lib/src/summary/index_unit.dart b/pkg/analyzer/lib/src/summary/index_unit.dart
index c1bbae530e9b5549611a956d616053fd21b2a403..5a9cb479fa000cae4ad9a4bb814e3b2c85056eab 100644
--- a/pkg/analyzer/lib/src/summary/index_unit.dart
+++ b/pkg/analyzer/lib/src/summary/index_unit.dart
@@ -23,7 +23,9 @@ class IndexElementInfo {
factory IndexElementInfo(Element element) {
IndexSyntheticElementKind kind = IndexSyntheticElementKind.notSynthetic;
- if (element.isSynthetic) {
+ if (element is LibraryElement || element is CompilationUnitElement) {
+ kind = IndexSyntheticElementKind.unit;
+ } else if (element.isSynthetic) {
if (element is ConstructorElement) {
kind = IndexSyntheticElementKind.constructor;
element = element.enclosingElement;
@@ -60,8 +62,6 @@ class IndexElementInfo {
throw new ArgumentError(
'Unsupported synthetic element ${element.runtimeType}');
}
- } else if (element is LibraryElement || element is CompilationUnitElement) {
- kind = IndexSyntheticElementKind.unit;
}
return new IndexElementInfo._(element, kind);
}
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | pkg/analyzer/lib/src/summary/resynthesize.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698