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

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

Issue 1042133002: Generate warnings for assignment to a type. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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/generated/error.dart
diff --git a/pkg/analyzer/lib/src/generated/error.dart b/pkg/analyzer/lib/src/generated/error.dart
index 512f5d48344fd81a1c5825234c4db24c4f3eb502..9a83ed4f0ded1d88561f7a6573a9ca6ee30969ec 100644
--- a/pkg/analyzer/lib/src/generated/error.dart
+++ b/pkg/analyzer/lib/src/generated/error.dart
@@ -3742,6 +3742,16 @@ class StaticWarningCode extends ErrorCode {
'ASSIGNMENT_TO_METHOD', "Methods cannot be assigned a value");
/**
+ * 12.18 Assignment: It is as static warning if an assignment of the form
+ * <i>v = e</i> occurs inside a top level or static function (be it function,
+ * method, getter, or setter) or variable initializer and there is neither a
+ * local variable declaration with name <i>v</i> nor setter declaration with
+ * name <i>v=</i> in the lexical scope enclosing the assignment.
+ */
+ static const StaticWarningCode ASSIGNMENT_TO_TYPE = const StaticWarningCode(
+ 'ASSIGNMENT_TO_TYPE', "Types cannot be assigned a value");
+
+ /**
* 13.9 Switch: It is a static warning if the last statement of the statement
* sequence <i>s<sub>k</sub></i> is not a break, continue, return or throw
* statement.
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/error_verifier.dart » ('j') | tests/language/assign_to_type_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698