Index: pkg/compiler/lib/src/types/union_type_mask.dart |
diff --git a/pkg/compiler/lib/src/types/union_type_mask.dart b/pkg/compiler/lib/src/types/union_type_mask.dart |
index 8e4aa394c861653c438261542928a83902cba4b3..8ba9a6ad3fb02ce450f74c40f1dd51f9e116f6fe 100644 |
--- a/pkg/compiler/lib/src/types/union_type_mask.dart |
+++ b/pkg/compiler/lib/src/types/union_type_mask.dart |
@@ -94,15 +94,14 @@ class UnionTypeMask implements TypeMask { |
bool useSubclass = masks.every((e) => !e.isSubtype); |
bool isNullable = masks.any((e) => e.isNullable); |
- List<ClassElement> masksBases = masks.map((mask) => mask.base).toList(); |
- Iterable<ClassElement> candidates = |
- closedWorld.commonSupertypesOf(masksBases); |
+ List masksBases = masks.map((mask) => mask.base).toList(); |
+ Iterable<Entity> candidates = closedWorld.commonSupertypesOf(masksBases); |
// Compute the best candidate and its kind. |
- ClassElement bestElement; |
+ Entity bestElement; |
int bestKind; |
int bestSize; |
- for (ClassElement candidate in candidates) { |
+ for (Entity candidate in candidates) { |
bool isInstantiatedStrictSubclass(cls) => |
cls != candidate && |
closedWorld.isDirectlyInstantiated(cls) && |
@@ -231,14 +230,14 @@ class UnionTypeMask implements TypeMask { |
// Check we cover the base class. |
if (!contains(flat.base, closedWorld)) return false; |
// Check for other members. |
- Iterable<ClassElement> members; |
+ Iterable<Entity> members; |
if (flat.isSubclass) { |
members = closedWorld.strictSubclassesOf(flat.base); |
} else { |
assert(flat.isSubtype); |
members = closedWorld.strictSubtypesOf(flat.base); |
} |
- return members.every((ClassElement cls) => this.contains(cls, closedWorld)); |
+ return members.every((Entity cls) => this.contains(cls, closedWorld)); |
} |
bool isInMask(TypeMask other, ClosedWorld closedWorld) { |
@@ -306,23 +305,23 @@ class UnionTypeMask implements TypeMask { |
return disjointMasks.every((mask) => mask.containsOnlyString(closedWorld)); |
} |
- bool containsOnly(ClassElement element) { |
+ bool containsOnly(Entity element) { |
return disjointMasks.every((mask) => mask.containsOnly(element)); |
} |
- bool satisfies(ClassElement cls, ClosedWorld closedWorld) { |
+ bool satisfies(Entity cls, ClosedWorld closedWorld) { |
return disjointMasks.every((mask) => mask.satisfies(cls, closedWorld)); |
} |
- bool contains(ClassElement type, ClosedWorld closedWorld) { |
- return disjointMasks.any((e) => e.contains(type, closedWorld)); |
+ bool contains(Entity cls, ClosedWorld closedWorld) { |
+ return disjointMasks.any((e) => e.contains(cls, closedWorld)); |
} |
bool containsAll(ClosedWorld closedWorld) { |
return disjointMasks.any((mask) => mask.containsAll(closedWorld)); |
} |
- ClassElement singleClass(ClosedWorld closedWorld) => null; |
+ Entity singleClass(ClosedWorld closedWorld) => null; |
bool needsNoSuchMethodHandling(Selector selector, ClosedWorld closedWorld) { |
return disjointMasks |