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

Unified Diff: compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java

Issue 10830145: Issue 3847. Allow non-constant instance variable initializers (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use different ErrorCode for using instance fields in instance field initializers Created 8 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: compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java b/compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java
index 4b1ac020777b9974d55082fac5dff3a684666f21..e5d03ab5c6f3df10fe1b72b6dfc8d4f39a41cee6 100644
--- a/compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java
+++ b/compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java
@@ -48,6 +48,9 @@ public enum ResolverErrorCode implements ErrorCode {
CANNOT_RESOLVE_SUPER_CONSTRUCTOR("cannot resolve method '%s'"),
CANNOT_RESOLVE_IMPLICIT_CALL_TO_SUPER_CONSTRUCTOR(
"super type %s does not have a default constructor"),
+ CANNOT_USE_INSTANCE_FIELD_IN_INSTANCE_FIELD_INITIALIZER(
+ "Cannot use instance field in instance field initializer"),
+ CANNOT_USE_THIS_IN_INSTANCE_FIELD_INITIALIZER("Cannot use 'this' in instance field initializer"),
CANNOT_USE_TYPE("Cannot reference the type '%s' in this context"),
// TODO(zundel): error message needs JUnit test (reachable code?)
CANNOT_USE_TYPE_VARIABLE("Cannot reference the type variable '%s' in this context"),

Powered by Google App Engine
This is Rietveld 408576698