Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/types/flat_type_mask.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/types/flat_type_mask.dart b/sdk/lib/_internal/compiler/implementation/types/flat_type_mask.dart |
| index 33cd88a2b64270805ed1c9a0a5ae3a6943f71ee2..3013586d3fce2c4586e5b05e341aa673fbf705c3 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/types/flat_type_mask.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/types/flat_type_mask.dart |
| @@ -429,11 +429,18 @@ class FlatTypeMask implements TypeMask { |
| || compiler.world.hasAnySubclassThatMixes(self, other); |
| } else { |
| assert(isSubtype); |
| - return hasElementIn(self, selector, element, compiler) |
| + bool result = hasElementIn(self, selector, element, compiler) |
| || other.implementsInterface(self) |
| - || other.isSubclassOf(self) |
| - || compiler.world.hasAnySubclassThatMixes(self, other) |
| || compiler.world.hasAnySubclassThatImplements(other, base); |
| + if (result) return true; |
| + // If the class is used as a mixin, we have to check if the element |
| + // can be hit from any of the mixin applications. |
| + Iterable<ClassElement> mixinUses = compiler.world.mixinUses[self]; |
| + if (mixinUses == null) return false; |
| + return mixinUses.any((mixinApplication) => |
| + hasElementIn(mixinApplication, selector, element, compiler) |
| + || other.isSubclassOf(mixinApplication) |
|
ngeoffray
2013/06/24 08:59:06
indent one more?
|
| + || compiler.world.hasAnySubclassThatMixes(mixinApplication, other)); |
|
ngeoffray
2013/06/24 08:59:06
ditto
|
| } |
| } |