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

Unified Diff: pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart

Issue 2931893004: Report an error when a part-of refers to an unnamed library. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « pkg/analyzer/lib/error/error.dart ('k') | pkg/analyzer/lib/src/error/codes.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
diff --git a/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart b/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
index 9dbffe77c63e5bd20850d267b3e577a1571bea57..9a9eca481126406bc3fd214b34f587bae2f0f282 100644
--- a/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
@@ -484,6 +484,9 @@ class LibraryAnalyzer {
StaticWarningCode.PART_OF_DIFFERENT_LIBRARY,
partUri,
[libraryNameNode.name, name]);
+ } else if (libraryNameNode == null) {
+ libraryErrorReporter.reportErrorForNode(
+ StaticWarningCode.PART_OF_UNNAMED_LIBRARY, partUri, [name]);
Lasse Reichstein Nielsen 2017/06/08 19:31:19 Logic seems backwards. Put the second branch first
floitsch 2017/06/08 19:47:33 Done.
}
} else {
Source source = nameOrSource.source;
« no previous file with comments | « pkg/analyzer/lib/error/error.dart ('k') | pkg/analyzer/lib/src/error/codes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698