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

Unified Diff: compiler/java/com/google/dart/compiler/ast/DartPropertyAccess.java

Issue 9113064: Issue 1330. Return actual Type from DartNewExpression. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweaks for comments 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
Index: compiler/java/com/google/dart/compiler/ast/DartPropertyAccess.java
diff --git a/compiler/java/com/google/dart/compiler/ast/DartPropertyAccess.java b/compiler/java/com/google/dart/compiler/ast/DartPropertyAccess.java
index f9e9f65a9e855c44472aaf238a512eb4857a3ecd..fddc51ca456036332ba5831f6cfa4095b25819fa 100644
--- a/compiler/java/com/google/dart/compiler/ast/DartPropertyAccess.java
+++ b/compiler/java/com/google/dart/compiler/ast/DartPropertyAccess.java
@@ -6,6 +6,8 @@ package com.google.dart.compiler.ast;
import com.google.dart.compiler.common.Symbol;
import com.google.dart.compiler.resolver.Element;
+import com.google.dart.compiler.type.Type;
+import com.google.dart.compiler.type.Types;
/**
* Represents a Dart property access expression (a.b).
@@ -16,6 +18,7 @@ public class DartPropertyAccess extends DartExpression implements ElementReferen
private DartIdentifier name;
private DartExpression normalizedNode = this;
private Element referencedElement;
+ private Type type;
public DartPropertyAccess(DartNode qualifier, DartIdentifier name) {
this.qualifier = becomeParentOf(qualifier);
@@ -63,6 +66,16 @@ public class DartPropertyAccess extends DartExpression implements ElementReferen
}
@Override
+ public void setType(Type type) {
+ this.type = type;
+ }
+
+ @Override
+ public Type getType() {
+ return type;
+ }
+
+ @Override
public void traverse(DartVisitor v, DartContext ctx) {
if (v.visit(this, ctx)) {
qualifier = becomeParentOf(v.accept(qualifier));

Powered by Google App Engine
This is Rietveld 408576698