Index: pkg/analyzer/lib/src/dart/analysis/file_state.dart |
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_state.dart b/pkg/analyzer/lib/src/dart/analysis/file_state.dart |
index 619a0350b48fe0d307c4d2003a48e2d1b197dc47..facf11f3a5912bfeab5009df057429bfb36ab812 100644 |
--- a/pkg/analyzer/lib/src/dart/analysis/file_state.dart |
+++ b/pkg/analyzer/lib/src/dart/analysis/file_state.dart |
@@ -191,9 +191,10 @@ class FileState { |
List<FileState> get importedFiles => _importedFiles; |
/** |
- * Return `true` if the file has a `part of` directive, so is probably a part. |
+ * Return `true` if the file does not have a `library` directive, and has a |
+ * `part of` directive, so is probably a part. |
*/ |
- bool get isPart => _unlinked.isPartOf; |
+ bool get isPart => _unlinked.libraryNameOffset == 0 && _unlinked.isPartOf; |
Brian Wilkerson
2017/01/31 20:33:00
I'm concerned about this because it appears that u
|
/** |
* If the file [isPart], return a currently know library the file is a part |