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

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

Issue 10827339: Issue 4460. Mark inferred type variable in for-in loop as inferred (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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/type/Types.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/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 05e70ddfc9a948b2d07a9b01c53ced37df283910..c8185f1675e0f95fa4756cb04110eedc844268c4 100644
--- a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
+++ b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
@@ -682,6 +682,7 @@ public class TypeAnalyzer implements DartCompilationPhase {
// if we fell back to Dynamic, keep it
} else {
Type unionType = getUnionType(currentType, inferredType);
+ unionType = Types.makeInferred(unionType);
Elements.setType(element, unionType);
}
}
@@ -705,7 +706,7 @@ public class TypeAnalyzer implements DartCompilationPhase {
return b;
}
// TODO(scheglov) return union of types, but this is not easy
- return Types.makeInferred(dynamicType);
+ return dynamicType;
}
void restore() {
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/type/Types.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698