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

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: test fixes 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
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/member.dart ('k') | pkg/analyzer/lib/src/generated/error_verifier.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 685788bfc6666287df6e5b0cad4f1150c7fd806f..f3947b43bc20b38a9773a44fbfbc42729cb3b480 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,
@@ -3585,6 +3586,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
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/member.dart ('k') | pkg/analyzer/lib/src/generated/error_verifier.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698