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

Unified Diff: sdk/lib/_internal/compiler/implementation/compile_time_constants.dart

Issue 12079098: Revert "Take type arguments into account in interface type subtype check." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/dart_types.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/compile_time_constants.dart
diff --git a/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart b/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart
index ffd16cb12ed172993ed430b3fd8580439e60423c..691cbac7af90626a3cefc568083922309a361414 100644
--- a/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart
+++ b/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart
@@ -337,8 +337,7 @@ class CompileTimeConstantEvaluator extends Visitor {
arguments.add(evaluateConstant(link.head));
}
// TODO(floitsch): get type parameters.
- compiler.listClass.computeType(compiler);
- DartType type = compiler.listClass.rawType;
+ DartType type = new InterfaceType(compiler.listClass);
Constant constant = new ListConstant(type, arguments);
handler.registerCompileTimeConstant(constant);
return constant;
@@ -374,8 +373,7 @@ class CompileTimeConstantEvaluator extends Visitor {
}
bool hasProtoKey = (protoValue != null);
// TODO(floitsch): this should be a List<String> type.
- compiler.listClass.computeType(compiler);
- DartType keysType = compiler.listClass.rawType;
+ DartType keysType = new InterfaceType(compiler.listClass);
ListConstant keysList = new ListConstant(keysType, keys);
handler.registerCompileTimeConstant(keysList);
SourceString className = hasProtoKey
@@ -384,7 +382,7 @@ class CompileTimeConstantEvaluator extends Visitor {
ClassElement classElement = compiler.jsHelperLibrary.find(className);
classElement.ensureResolved(compiler);
// TODO(floitsch): copy over the generic type.
- DartType type = classElement.rawType;
+ DartType type = new InterfaceType(classElement);
handler.registerInstantiatedClass(classElement);
Constant constant = new MapConstant(type, keysList, values, protoValue);
handler.registerCompileTimeConstant(constant);
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/dart_types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698