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

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

Issue 23216006: Rules for finals were loosened, contradiction in spec was fixed. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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/error/StaticWarningCode.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/CompileTimeErrorCode.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/CompileTimeErrorCode.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/CompileTimeErrorCode.java
index 075e0a6a97e750f007c2d97421be22dfe77fe072..2fd8210abefd9f0d9169a552948c0934c52737ad 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/CompileTimeErrorCode.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/CompileTimeErrorCode.java
@@ -412,14 +412,6 @@ public enum CompileTimeErrorCode implements ErrorCode {
/**
* 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile time
- * error if <i>k</i>'s initializer list contains an initializer for a final variable <i>f</i>
- * whose declaration includes an initialization expression.
- */
- FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION(
- "Values cannot be set in the constructor if they are final, and have already been set"),
-
- /**
- * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile time
* error if <i>k</i>'s initializer list contains an initializer for a variable that is initialized
* by means of an initializing formal of <i>k</i>.
*/
@@ -427,16 +419,6 @@ public enum CompileTimeErrorCode implements ErrorCode {
"Fields cannot be initialized in both the parameter list and the initializers"),
/**
- * 5 Variables: It is a compile-time error if a final instance variable that has been initialized
- * at its point of declaration is also initialized in a constructor.
- *
- * @param name the name of the field in question
- */
- // TODO (jwren) only a subset of these are being caught
- FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR(
- "'%s' is final and was given a value when it was declared, so it cannot be set to a new value"),
-
- /**
* 5 Variables: It is a compile-time error if a final instance variable that has is initialized by
* means of an initializing formal of a constructor is also initialized elsewhere in the same
* constructor.
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/StaticWarningCode.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698