| Index: sdk/lib/_internal/compiler/implementation/ordered_typeset.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/ordered_typeset.dart b/sdk/lib/_internal/compiler/implementation/ordered_typeset.dart
|
| index 98cc60ac4e8c75f80cec7ba90bd2d8fc6fab749a..1ec9ff337306f58a08a0fb08e058388434cc4a12 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/ordered_typeset.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/ordered_typeset.dart
|
| @@ -87,6 +87,22 @@ class OrderedTypeSet {
|
| }
|
| }
|
|
|
| + InterfaceType asInstanceOf(ClassElement cls) {
|
| + int level = cls.hierarchyDepth;
|
| + if (level < levels) {
|
| + Link<DartType> pointer = _levels[level];
|
| + Link<DartType> end =
|
| + level > 0 ? _levels[level - 1] : const Link<DartType>();
|
| + while (!identical(pointer, end)) {
|
| + if (cls == pointer.head.element) {
|
| + return pointer.head;
|
| + }
|
| + pointer = pointer.tail;
|
| + }
|
| + }
|
| + return null;
|
| + }
|
| +
|
| String toString() => types.toString();
|
| }
|
|
|
|
|