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

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

Issue 2487583002: Convert generic method errors to hints (Closed)
Patch Set: address comments 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
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 48702e6b268fba3c33cbb677c3664a9379ec106f..10c39cb2ac00cff925a23703233004472955b1f5 100644
--- a/pkg/analyzer/lib/src/error/codes.dart
+++ b/pkg/analyzer/lib/src/error/codes.dart
@@ -3086,6 +3086,22 @@ class StaticTypeWarningCode extends ErrorCode {
"Try adjusting the number of type arguments.");
/**
+ * It will be a static type warning if <i>m</i> is not a generic method with
+ * exactly <i>n</i> type parameters.
+ *
+ * Parameters:
+ * 0: the name of the method being referenced (<i>G</i>)
+ * 1: the number of type parameters that were declared
+ * 2: the number of type arguments provided
+ */
+ static const StaticTypeWarningCode WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD =
+ const StaticTypeWarningCode(
+ 'WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD',
+ "The method '{0}' is declared with {1} type parameters, "
+ "but {2} type arguments were given.",
+ "Try adjusting the number of type arguments.");
+
+ /**
* 17.16.1 Yield: Let T be the static type of e [the expression to the right
* of "yield"] and let f be the immediately enclosing function. It is a
* static type warning if either:
« no previous file with comments | « pkg/analyzer/lib/src/dart/error/hint_codes.dart ('k') | pkg/analyzer/lib/src/generated/element_resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698