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

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

Issue 18051016: Do report StaticWarningCode.FINAL_NOT_INITIALIZED (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Don't report for native classes 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
« 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 ed85d7bae60eba4851358214bf573e45bfda4837..ef9e2ad3fc14e6b6e2c664f11de1cfd3e26fff40 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
@@ -233,11 +233,18 @@ public enum StaticWarningCode implements ErrorCode {
/**
* 5 Variables: It is a static warning if a library, static or local variable <i>v</i> is final
* and <i>v</i> is not initialized at its point of declaration.
+ * <p>
+ * 7.6.1 Generative Constructors: Each final instance variable <i>f</i> declared in the
+ * immediately enclosing class must have an initializer in <i>k</i>'s initializer list unless it
+ * has already been initialized by one of the following means:
+ * <ul>
+ * <li>Initialization at the declaration of <i>f</i>.</li>
+ * <li>Initialization by means of an initializing formal of <i>k</i>.</li>
+ * </ul>
+ * or a static warning occurs.
*
* @param name the name of the uninitialized final variable
*/
- // TODO(jwren) not yet being created,
- // see ErrorVerifier.checkForAllFinalInitializedErrorCodes(ConstructorDeclaration)
FINAL_NOT_INITIALIZED("The final variable '%s' must be initialized"),
/**
« 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