Index: pkg/compiler/lib/src/kernel/element_map.dart |
diff --git a/pkg/compiler/lib/src/kernel/element_map.dart b/pkg/compiler/lib/src/kernel/element_map.dart |
index 025838bb6b0f89d2866b8b14aa027487c1e65620..e06d3b3ab85338ccac615f072dbb6de6933518f8 100644 |
--- a/pkg/compiler/lib/src/kernel/element_map.dart |
+++ b/pkg/compiler/lib/src/kernel/element_map.dart |
@@ -424,6 +424,16 @@ class KernelToElementMap extends KernelElementAdapterMixin { |
return env.rawType; |
} |
+ InterfaceType _asInstanceOf(InterfaceType type, KClass cls) { |
+ OrderedTypeSet orderedTypeSet = _getOrderedTypeSet(type.element); |
+ InterfaceType supertype = |
+ orderedTypeSet.asInstanceOf(cls, _getHierarchyDepth(cls)); |
+ if (supertype != null) { |
+ supertype = _substByContext(supertype, type); |
+ } |
+ return supertype; |
+ } |
+ |
void _ensureSupertypes(KClass cls, _KClassEnv env) { |
if (env.orderedTypeSet == null) { |
_ensureThisAndRawType(cls, env); |
@@ -901,6 +911,11 @@ class KernelElementEnvironment implements ElementEnvironment { |
} |
@override |
+ bool isGenericClass(ClassEntity cls) { |
+ return getThisType(cls).typeArguments.isNotEmpty; |
+ } |
+ |
+ @override |
DartType getTypeVariableBound(TypeVariableEntity typeVariable) { |
throw new UnimplementedError( |
'KernelElementEnvironment.getTypeVariableBound'); |