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 d687703c61bc802168f2ba61dc82862b3361589b..baad8320645b41792e96db373f91258c656e98fd 100644 |
--- a/pkg/analyzer/lib/src/error/codes.dart |
+++ b/pkg/analyzer/lib/src/error/codes.dart |
@@ -4723,6 +4723,16 @@ class StaticWarningCode extends ErrorCode { |
"Try correcting the name to an existing setter, or " |
"defining the setter in a superclass of '{1}'."); |
+ /** |
+ * 7.2 Getters: It is a static warning if the return type of a getter is void. |
+ */ |
+ static const StaticWarningCode VOID_RETURN_FOR_GETTER = |
+ const StaticWarningCode( |
+ 'VOID_RETURN_FOR_GETTER', |
+ "The return type of a getter can't be 'void'.", |
+ "Try providing a return type for the getter.", |
+ false); |
+ |
/** |
* A flag indicating whether this warning is an error when running with strong |
* mode enabled. |