| Index: pkg/compiler/lib/src/types/flat_type_mask.dart
|
| diff --git a/pkg/compiler/lib/src/types/flat_type_mask.dart b/pkg/compiler/lib/src/types/flat_type_mask.dart
|
| index 270271d1ae88de617b4665984313cbb0c8a5958c..914e6733ca5167cb3408230a254dedd7fc608e35 100644
|
| --- a/pkg/compiler/lib/src/types/flat_type_mask.dart
|
| +++ b/pkg/compiler/lib/src/types/flat_type_mask.dart
|
| @@ -367,25 +367,19 @@ class FlatTypeMask implements TypeMask {
|
| if (base == flatOther.base) return false;
|
| if (isExact && flatOther.isExact) return true;
|
|
|
| - // normalization guarantees that isExact === !isSubclass && !isSubtype
|
| - if (classWorld.isSubclassOf(flatOther.base, base)) return isExact;
|
| - if (classWorld.isSubclassOf(base, flatOther.base)) {
|
| - return flatOther.isExact;
|
| - }
|
| + if (isExact) return !flatOther.contains(base, classWorld);
|
| + if (flatOther.isExact) return !contains(flatOther.base, classWorld);
|
| +
|
| + // Normalization guarantees that isExact === !isSubclass && !isSubtype.
|
| + // Both are subclass or subtype masks, so if there is a subclass
|
| + // relationship, they are not disjoint.
|
| + if (classWorld.isSubclassOf(flatOther.base, base)) return false;
|
| + if (classWorld.isSubclassOf(base, flatOther.base)) return false;
|
|
|
| // Two different base classes have no common subclass unless one is a
|
| // subclass of the other (checked above).
|
| if (isSubclass && flatOther.isSubclass) return true;
|
|
|
| - if (classWorld.isSubtypeOf(flatOther.base, base)) return !isSubtype;
|
| - if (classWorld.isSubtypeOf(base, flatOther.base)) {
|
| - return !flatOther.isSubtype;
|
| - }
|
| -
|
| - // By now we know they are not subtypes of each other, so if either is
|
| - // exact, we are done.
|
| - if (isExact || flatOther.isExact) return true;
|
| -
|
| return _isDisjointHelper(this, flatOther, classWorld);
|
| }
|
|
|
|
|