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

Unified Diff: pkg/compiler/lib/src/kernel/types.dart

Issue 2918913003: Handle list and map literals (Closed)
Patch Set: Updated cf. comments Created 3 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: pkg/compiler/lib/src/kernel/types.dart
diff --git a/pkg/compiler/lib/src/kernel/types.dart b/pkg/compiler/lib/src/kernel/types.dart
index 803302791c9a1556b7ac78a6cf16d559749c86f1..b57b79df09ce63e86961ba7cae8f303611c5bcbe 100644
--- a/pkg/compiler/lib/src/kernel/types.dart
+++ b/pkg/compiler/lib/src/kernel/types.dart
@@ -5,7 +5,7 @@
part of dart2js.kernel.element_map;
/// Support for subtype checks of kernel based [DartType]s.
-class _KernelDartTypes implements DartTypes {
+class _KernelDartTypes extends DartTypes {
final KernelToElementMapImpl elementMap;
final SubtypeVisitor subtypeVisitor;
final PotentialSubtypeVisitor potentialSubtypeVisitor;
@@ -31,6 +31,11 @@ class _KernelDartTypes implements DartTypes {
}
@override
+ InterfaceType getThisType(ClassEntity cls) {
+ return elementMap._getThisType(cls);
+ }
+
+ @override
InterfaceType getSupertype(ClassEntity cls) {
return elementMap._getSuperType(cls);
}
@@ -46,12 +51,25 @@ class _KernelDartTypes implements DartTypes {
}
@override
+ DartType substByContext(DartType base, InterfaceType context) {
+ return elementMap._substByContext(base, context);
+ }
+
+ @override
FunctionType getCallType(InterfaceType type) {
// TODO(johnniwinther): Compute the call type.
return null;
}
@override
+ void checkTypeVariableBounds(
+ InterfaceType type,
+ void checkTypeVariableBound(InterfaceType type, DartType typeArgument,
+ TypeVariableType typeVariable, DartType bound)) {
+ throw new UnimplementedError('_KernelDartTypes.checkTypeVariableBounds');
+ }
+
+ @override
CommonElements get commonElements => elementMap.commonElements;
}
« no previous file with comments | « pkg/compiler/lib/src/kernel/element_map_impl.dart ('k') | pkg/compiler/lib/src/resolution/class_members.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698