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

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/StaticWarningCode.java

Issue 21513005: Report ASSIGNMENT_TO_CONST. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/StaticWarningCode.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/StaticWarningCode.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/StaticWarningCode.java
index 0d0e9c7bad4b631ae23aa2ed06053380e8510537..e4a47a2a10aca5f25b3e83f6f19d6a9530ea5e7d 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/StaticWarningCode.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/StaticWarningCode.java
@@ -66,6 +66,15 @@ public enum StaticWarningCode implements ErrorCode {
* 5 Variables: Attempting to assign to a final variable elsewhere will cause a NoSuchMethodError
* to be thrown, because no setter is defined for it. The assignment will also give rise to a
* static warning for the same reason.
+ * <p>
+ * A constant variable is always implicitly final.
+ */
+ ASSIGNMENT_TO_CONST("Constant variables cannot be assigned a value"),
+
+ /**
+ * 5 Variables: Attempting to assign to a final variable elsewhere will cause a NoSuchMethodError
+ * to be thrown, because no setter is defined for it. The assignment will also give rise to a
+ * static warning for the same reason.
*/
ASSIGNMENT_TO_FINAL("Final variables cannot be assigned a value"),

Powered by Google App Engine
This is Rietveld 408576698