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

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

Issue 9169013: Issue 1099: Compile time error for RHS this access in initializer (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Failing JUnit opt test Created 8 years, 11 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 | compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/java/com/google/dart/compiler/resolver/Resolver.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/Resolver.java b/compiler/java/com/google/dart/compiler/resolver/Resolver.java
index 745c0080484c74e2cfef17fef21b49f53645531d..3c741baea1092fd65f3f8472754089fb87325135 100644
--- a/compiler/java/com/google/dart/compiler/resolver/Resolver.java
+++ b/compiler/java/com/google/dart/compiler/resolver/Resolver.java
@@ -937,6 +937,8 @@ public class Resolver {
onError(x, ResolverErrorCode.THIS_IN_STATIC_METHOD);
} else if (currentMethod.getModifiers().isFactory()) {
onError(x, ResolverErrorCode.THIS_IN_FACTORY_CONSTRUCTOR);
+ } else if (inInitializer) {
+ onError(x, ResolverErrorCode.THIS_IN_INITIALIZER_AS_EXPRESSION);
}
return null;
}
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698