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

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

Issue 11293058: Issue 5157. Introduce TypeQuality. Try to find member in subclasses. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 9edadea0aac639b8ae2c4ed0094ce0f677dfc9f0..fb43f949ee5105e03a8488c9c3164ac1480b66fb 100644
--- a/compiler/java/com/google/dart/compiler/resolver/Resolver.java
+++ b/compiler/java/com/google/dart/compiler/resolver/Resolver.java
@@ -81,7 +81,9 @@ import com.google.dart.compiler.resolver.LabelElement.LabeledStatementType;
import com.google.dart.compiler.type.InterfaceType;
import com.google.dart.compiler.type.InterfaceType.Member;
import com.google.dart.compiler.type.Type;
+import com.google.dart.compiler.type.TypeAnalyzer;
import com.google.dart.compiler.type.TypeKind;
+import com.google.dart.compiler.type.TypeQuality;
import com.google.dart.compiler.type.TypeVariable;
import com.google.dart.compiler.type.Types;
@@ -726,7 +728,8 @@ public class Resolver {
Element element = node.getElement();
Type expressionType = expression.getType();
if (isFinal && expressionType != null && TypeKind.of(element.getType()) == TypeKind.DYNAMIC) {
- Type fieldType = Types.makeInferred(expressionType);
+ TypeQuality typeQuality = TypeAnalyzer.getTypeQuality(expression);
+ Type fieldType = Types.makeInferred(expressionType, typeQuality);
Elements.setType(element, fieldType);
}
} else if (isFinal) {

Powered by Google App Engine
This is Rietveld 408576698