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

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

Issue 10417044: Type inference in if, while, for and for-in statements (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Changes for review comments 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/resolver/Elements.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/Elements.java b/compiler/java/com/google/dart/compiler/resolver/Elements.java
index ee334ad2b34046aef4cefe71fb6d4c5e41be3df5..d0a14e99ee283865bcbfc257a816e5a8e168eec5 100644
--- a/compiler/java/com/google/dart/compiler/resolver/Elements.java
+++ b/compiler/java/com/google/dart/compiler/resolver/Elements.java
@@ -24,7 +24,6 @@ import com.google.dart.compiler.ast.DartMethodDefinition;
import com.google.dart.compiler.ast.DartNativeBlock;
import com.google.dart.compiler.ast.DartNode;
import com.google.dart.compiler.ast.DartParameter;
-import com.google.dart.compiler.ast.DartPropertyAccess;
import com.google.dart.compiler.ast.DartSuperExpression;
import com.google.dart.compiler.ast.DartTypeNode;
import com.google.dart.compiler.ast.DartTypeParameter;
@@ -196,8 +195,8 @@ public class Elements {
((AbstractNodeElement) element).setType(type);
}
- public static void setTypeInferred(VariableElement element) {
- ((VariableElementImplementation)element).setTypeInferred(true);
+ public static void setTypeInferred(VariableElement element, boolean inferred) {
+ ((VariableElementImplementation)element).setTypeInferred(inferred);
}
static FieldElementImplementation fieldFromNode(DartField node,
EnclosingElement holder,

Powered by Google App Engine
This is Rietveld 408576698