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

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

Issue 2479293004: Add an error when a type parameter from a generic function is used in an is test (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | 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/error/codes.dart
diff --git a/pkg/analyzer/lib/src/error/codes.dart b/pkg/analyzer/lib/src/error/codes.dart
index 10c39cb2ac00cff925a23703233004472955b1f5..c73de060edbe6a6c0bf9b81cc8ea1a53e6e4d55c 100644
--- a/pkg/analyzer/lib/src/error/codes.dart
+++ b/pkg/analyzer/lib/src/error/codes.dart
@@ -4437,6 +4437,19 @@ class StaticWarningCode extends ErrorCode {
"changing the import to not be deferred.");
/**
+ * Not yet spec'd.
+ *
+ * Parameters:
+ * 0: the name of the generic function's type parameter that is being used in
+ * an `is` expression
+ */
+ static const StaticWarningCode TYPE_ANNOTATION_GENERIC_FUNCTION_PARAMETER =
+ const StaticWarningCode(
+ 'TYPE_ANNOTATION_GENERIC_FUNCTION_PARAMETER',
+ "The type parameter '{0}' can't be used in a type test.",
+ "Try using a different type.");
+
+ /**
* 12.31 Type Test: It is a static warning if <i>T</i> does not denote a type
* available in the current lexical scope.
*/
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/error_verifier.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698