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

Unified Diff: compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java

Issue 10449038: Issue 3251. Fixes for node type (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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/type/TypeAnalyzer.java
diff --git a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
index 6fda7985128b52ca6db449561c0489cc26ff982b..5b76ac8d5c3e2b1b49af890c3ef50a4f2123c6de 100644
--- a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
+++ b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
@@ -1237,6 +1237,9 @@ public class TypeAnalyzer implements DartCompilationPhase {
@Override
public Type visitIdentifier(DartIdentifier node) {
+ if (node.getType() != null) {
+ return node.getType();
+ }
Element element = node.getElement();
Type type;
switch (ElementKind.of(element)) {
@@ -1579,10 +1582,10 @@ public class TypeAnalyzer implements DartCompilationPhase {
@Override
public Type visitPropertyAccess(DartPropertyAccess node) {
- Element element = node.getElement();
if (node.getType() != null) {
return node.getType();
}
+ Element element = node.getElement();
if (element != null) {
return element.getType();
}

Powered by Google App Engine
This is Rietveld 408576698