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

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

Issue 1160873004: Only units with 'part of' and no other directives are parts. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
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 8809da3d8e0960276f1aadbe7917453ee5de3912..9aaa8c8c98be79290fedfa40184139109bdc7b5f 100644
--- a/pkg/analyzer/lib/src/task/dart.dart
+++ b/pkg/analyzer/lib/src/task/dart.dart
@@ -2681,16 +2681,8 @@ class ParseDartTask extends SourceBasedAnalysisTask {
SourceKind sourceKind = SourceKind.LIBRARY;
if (modificationTime == -1) {
sourceKind = SourceKind.UNKNOWN;
- } else if (hasNonPartOfDirective) {
- sourceKind = SourceKind.LIBRARY;
- } else if (hasPartOfDirective) {
+ } else if (hasPartOfDirective && !hasNonPartOfDirective) {
sourceKind = SourceKind.PART;
- } else {
- if (context.getLibrariesContaining(source).isEmpty) {
- sourceKind = SourceKind.LIBRARY;
- } else {
- sourceKind = SourceKind.PART;
- }
}
//
// Record outputs.
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/task/dart_work_manager.dart » ('j') | pkg/analyzer/lib/src/task/dart_work_manager.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698