Index: pkg/compiler/lib/src/common_elements.dart |
diff --git a/pkg/compiler/lib/src/common_elements.dart b/pkg/compiler/lib/src/common_elements.dart |
index 4404b74645f2ea4cc826ce75fdd9cb346dbf6116..760f5d16c2dc7a90abdfcf26d468bf97fe1a9512 100644 |
--- a/pkg/compiler/lib/src/common_elements.dart |
+++ b/pkg/compiler/lib/src/common_elements.dart |
@@ -1254,9 +1254,29 @@ abstract class ElementEnvironment { |
/// Returns `true` if [cls] is generic. |
bool isGenericClass(ClassEntity cls); |
+ /// Returns `true` if [cls] is a mixin application (named or unnamed). |
+ bool isMixinApplication(ClassEntity cls); |
+ |
/// Returns `true` if [cls] is an unnamed mixin application. |
bool isUnnamedMixinApplication(ClassEntity cls); |
+ /// Returns the 'effective' mixin class if [cls] is a mixin application, and |
+ /// `null` otherwise. |
+ /// |
+ /// The 'effective' mixin class is the class from which members are mixed in. |
+ /// Normally this is the mixin class itself, but not if the mixin class itself |
+ /// is a mixin application. |
+ /// |
+ /// Consider this hierarchy: |
+ /// |
+ /// class A {} |
+ /// class B = Object with A {} |
+ /// class C = Object with B {} |
+ /// |
+ /// The mixin classes of `B` and `C` are `A` and `B`, respectively, but the |
+ /// _effective_ mixin class of both is `A`. |
+ ClassEntity getEffectiveMixinClass(ClassEntity cls); |
+ |
/// The upper bound on the [typeVariable]. If not explicitly declared, this is |
/// `Object`. |
DartType getTypeVariableBound(TypeVariableEntity typeVariable); |