Index: pkg/compiler/lib/src/elements/types.dart |
diff --git a/pkg/compiler/lib/src/elements/types.dart b/pkg/compiler/lib/src/elements/types.dart |
index 6e84728e19da76f8102ac9f05b0203ba390667b4..4ddcef3227b853d01ed5b7a3318201b42f491327 100644 |
--- a/pkg/compiler/lib/src/elements/types.dart |
+++ b/pkg/compiler/lib/src/elements/types.dart |
@@ -736,4 +736,14 @@ abstract class DartTypes { |
/// Returns `true` if [t] might be a subtype of [s] for some values of |
/// type variables in [s] and [t]. |
bool isPotentialSubtype(DartType t, DartType s); |
+ |
+ /// Returns [type] as an instance of [cls] or `null` if [type] is not a |
+ /// subtype of [cls]. |
+ /// |
+ /// For instance `asInstanceOf(List<String>, Iterable) = Iterable<String>`. |
+ InterfaceType asInstanceOf(InterfaceType type, ClassEntity cls); |
+ |
+ /// Returns the supertype of [cls], i.e. the type in the `extends` clause of |
+ /// [cls]. |
+ InterfaceType getSupertype(ClassEntity cls); |
} |