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

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

Issue 272683002: Issue 16672. Report warning for assignment to a function. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/verifier/ErrorVerifier.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 beeb47bc8a75e3c805c2bb4826b8a9d35958c02c..0b24eabfebf754fc479ac2c06cce9d58c027ab24 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
@@ -82,8 +82,16 @@ public enum StaticWarningCode implements ErrorCode {
ASSIGNMENT_TO_FINAL("'%s' cannot be used as a setter, it is final"),
/**
+ * 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.
+ */
+ ASSIGNMENT_TO_FUNCTION("Functions cannot be assigned a value"),
+
+ /**
* 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>. It is a static type
- * warning if <i>T</i> does not have an accessible instance setter named <i>v =</i>.
+ * warning if <i>T</i> does not have an accessible instance setter named <i>v=</i>.
*/
ASSIGNMENT_TO_METHOD("Methods cannot be assigned a value"),
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/verifier/ErrorVerifier.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698