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

Unified Diff: pkg/analyzer/lib/src/generated/resolver.dart

Issue 2931893004: Report an error when a part-of refers to an unnamed library. (Closed)
Patch Set: Remove unnecessary test. 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/generated/resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index 76acec6f78f02f5a1898b208cfb0ffd40a7d9706..0f68b7355a242411780c3156d48a53339f032944 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -4955,6 +4955,22 @@ class ResolverErrorCode extends ErrorCode {
const ResolverErrorCode('MISSING_LIBRARY_DIRECTIVE_WITH_PART',
"Libraries that have parts must have a library 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 ResolverErrorCode PART_OF_UNNAMED_LIBRARY =
+ const ResolverErrorCode(
+ '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.");
+
/**
* Initialize a newly created error code to have the given [name]. The message
* associated with the error will be created from the given [message]
« no previous file with comments | « pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart ('k') | pkg/analyzer/test/src/dart/analysis/driver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698