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

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

Issue 10918260: Issue 5044. Keep FieldElement as Element for field access (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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/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 562d43a5b170365fc22c2eefe7d7169686ec18dc..5aad16edff76960def1fc0a93d249ce95795639a 100644
--- a/compiler/java/com/google/dart/compiler/resolver/Resolver.java
+++ b/compiler/java/com/google/dart/compiler/resolver/Resolver.java
@@ -10,6 +10,7 @@ import com.google.common.collect.Sets;
import com.google.dart.compiler.DartCompilationPhase;
import com.google.dart.compiler.DartCompilerContext;
import com.google.dart.compiler.ErrorCode;
+import com.google.dart.compiler.ast.ASTNodes;
import com.google.dart.compiler.ast.ASTVisitor;
import com.google.dart.compiler.ast.DartArrayLiteral;
import com.google.dart.compiler.ast.DartBinaryExpression;
@@ -1275,18 +1276,16 @@ public class Resolver {
onError(x.getName(), ResolverErrorCode.NOT_A_STATIC_FIELD,
x.getPropertyName());
}
- if (Elements.inSetterContext(x)) {
+ if (ASTNodes.inSetterContext(x)) {
if (field.getGetter() != null) {
- element = field.getSetter();
- if (element == null) {
+ if (field.getSetter() == null) {
onError(x.getName(), ResolverErrorCode.FIELD_DOES_NOT_HAVE_A_SETTER);
}
}
}
- if (Elements.inGetterContext(x)) {
+ if (ASTNodes.inGetterContext(x)) {
if (field.getSetter() != null) {
- element = field.getGetter();
- if (element == null) {
+ if (field.getGetter() == null) {
onError(x.getName(), ResolverErrorCode.FIELD_DOES_NOT_HAVE_A_GETTER);
}
}

Powered by Google App Engine
This is Rietveld 408576698