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

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

Issue 2643073002: Deprecate the use of `Function` as a class. (Closed)
Patch Set: Created 3 years, 11 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/dart/error/hint_codes.dart
diff --git a/pkg/analyzer/lib/src/dart/error/hint_codes.dart b/pkg/analyzer/lib/src/dart/error/hint_codes.dart
index a81585b3bc2a7d2b0be427e78eb5712e9785a377..aa0f91a8a279d33d1608ce3ef36deed44f3118b0 100644
--- a/pkg/analyzer/lib/src/dart/error/hint_codes.dart
+++ b/pkg/analyzer/lib/src/dart/error/hint_codes.dart
@@ -95,6 +95,38 @@ class HintCode extends ErrorCode {
"Try replacing the use of the deprecated member with the replacement.");
/**
+ * Users should not create a class named `Function` anymore.
+ */
+ static const HintCode DEPRECATED_FUNCTION_CLASS_DECLARATION = const HintCode(
+ 'DEPRECATED_FUNCTION_CLASS_DECLARATION',
+ "Declaring a class named 'Function' is deprecated.",
+ "Try renaming the class.");
+
+ /**
+ * `Function` should not be extended anymore.
+ */
+ static const HintCode DEPRECATED_EXTENDS_FUNCTION = const HintCode(
+ 'DEPRECATED_EXTENDS_FUNCTION',
+ "Extending 'Function' is deprecated.",
+ "Try removing 'Function' from the 'extends' clause.");
+
+ /**
+ * `Function` should not be implemented anymore.
+ */
+ static const HintCode DEPRECATED_IMPLEMENTS_FUNCTION = const HintCode(
+ 'DEPRECATED_IMPLEMENTS_FUNCTION',
+ "Implementing 'Function' is deprecated.",
+ "Try removing 'Function' from the 'implements' clause.");
+
+ /**
+ * `Function` should not be mixed in anymore.
+ */
+ static const HintCode DEPRECATED_MIXIN_FUNCTION = const HintCode(
+ 'DEPRECATED_MIXIN_FUNCTION',
+ "Mixing in 'Function' is deprecated.",
+ "Try removing 'Function' from the 'with' clause.");
+
+ /**
* Hint to use the ~/ operator.
*/
static const HintCode DIVISION_OPTIMIZATION = const HintCode(

Powered by Google App Engine
This is Rietveld 408576698