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

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

Issue 1871103002: Support for @JS() validation (#26225). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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/error.dart
diff --git a/pkg/analyzer/lib/src/generated/error.dart b/pkg/analyzer/lib/src/generated/error.dart
index b6ae9c74d08c08293ce358594c0ac440a7db04b3..a897b3f34931d55df83e14ea8e19d8d886db93db 100644
--- a/pkg/analyzer/lib/src/generated/error.dart
+++ b/pkg/analyzer/lib/src/generated/error.dart
@@ -2684,6 +2684,7 @@ abstract class ErrorCode {
HintCode.IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION,
HintCode.INVALID_ASSIGNMENT,
HintCode.INVALID_USE_OF_PROTECTED_MEMBER,
+ HintCode.MISSING_JS_LIB_ANNOTATION,
HintCode.MISSING_REQUIRED_PARAM,
HintCode.MISSING_RETURN,
HintCode.NULL_AWARE_IN_CONDITION,
@@ -3584,6 +3585,14 @@ class HintCode extends ErrorCode {
static const HintCode MISSING_REQUIRED_PARAM = const HintCode(
'MISSING_REQUIRED_PARAM', "The parameter '{0}' is required. {1}");
+ /**
+ * Generate a hint for an element that is annotated with `@JS(...)` whose
+ * library declaration is not similarly annotated.
+ */
+ static const HintCode MISSING_JS_LIB_ANNOTATION = const HintCode(
+ 'MISSING_JS_LIB_ANNOTATION',
+ "The @JS() annotation can only be used if it is also declared on the library directive.");
+
/**
* Generate a hint for methods or functions that have a return type, but do
* not have a non-void return statement on all branches. At the end of methods

Powered by Google App Engine
This is Rietveld 408576698