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

Unified Diff: pkg/analyzer/lib/src/error/codes.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
Index: pkg/analyzer/lib/src/error/codes.dart
diff --git a/pkg/analyzer/lib/src/error/codes.dart b/pkg/analyzer/lib/src/error/codes.dart
index 9a04fd2e9e8cffc3c647587e1e9c567c5863f9b8..92345331f86cc442be79a800b9edc509f0989821 100644
--- a/pkg/analyzer/lib/src/error/codes.dart
+++ b/pkg/analyzer/lib/src/error/codes.dart
@@ -4419,6 +4419,22 @@ class StaticWarningCode extends ErrorCode {
"Try including a different part, or "
"changing the name of the library in the part's part-of directive.");
+ /**
+ * Parts: It is a static warning if the referenced part declaration
+ * <i>p</i> names a library that does not have a library tag.
+ *
+ * Parameters:
+ * 0: the URI of the expected library
+ * 1: the non-matching actual library name from the "part of" declaration
+ */
+ static const StaticWarningCode PART_OF_UNNAMED_LIBRARY =
+ const StaticWarningCode(
+ 'PART_OF_UNNAMED_LIBRARY',
+ "Library is unnamed. Expected a URI not a library name '{0}' in the "
+ "part-of directive.",
+ "Try changing the part-of directive to a URI, or try including a"
+ " different part.");
+
/**
* 7.6.2 Factories: It is a static warning if the function type of <i>k'</i>
* is not a subtype of the type of <i>k</i>.

Powered by Google App Engine
This is Rietveld 408576698