| 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 90389a73915ed49b31a37b4575f89d5a9d6a8d48..59b573accb48283c7de992babaa37bdd736204e8 100644
|
| --- a/pkg/compiler/lib/src/types/flat_type_mask.dart
|
| +++ b/pkg/compiler/lib/src/types/flat_type_mask.dart
|
| @@ -688,11 +688,13 @@ class FlatTypeMask implements TypeMask {
|
| if (targets.length != 1) return null;
|
| Element result = targets.first;
|
| ClassElement enclosing = result.enclosingClass;
|
| - // We only return the found element if it is guaranteed to be
|
| - // implemented on the exact receiver type. It could be found in a
|
| - // subclass or in an inheritance-wise unrelated class in case of
|
| - // subtype selectors.
|
| - return (base.isSubclassOf(enclosing)) ? result : null;
|
| + // We only return the found element if it is guaranteed to be implemented on
|
| + // all classes in the receiver type [this]. It could be found only in a
|
| + // subclass or in an inheritance-wise unrelated class in case of subtype
|
| + // selectors.
|
| + if (isSubtype) return null;
|
| + if (base.isSubclassOf(enclosing)) return result;
|
| + return null;
|
| }
|
|
|
| bool operator ==(var other) {
|
|
|