Index: pkg/compiler/lib/src/resolution/class_members.dart |
diff --git a/pkg/compiler/lib/src/resolution/class_members.dart b/pkg/compiler/lib/src/resolution/class_members.dart |
index 6cbbf70d45816eb103e181e3ba843ac089af9307..b385717b06ef1af660df421e4362fe36b87735f9 100644 |
--- a/pkg/compiler/lib/src/resolution/class_members.dart |
+++ b/pkg/compiler/lib/src/resolution/class_members.dart |
@@ -824,8 +824,30 @@ abstract class ClassMemberMixin implements ClassElement { |
/// includes `call`. |
Iterable<String> computedMemberNames; |
+ bool _interfaceMembersAreClassMembers; |
+ |
+ /// Compute value of the [_interfaceMembersAreClassMembers] for this class |
+ /// and its superclasses. |
+ void _ensureInterfaceMembersAreClassMembers(Resolution resolution) { |
Siggi Cherem (dart-lang)
2016/05/31 16:28:31
rename: change `ensure` to `compute`?
the current
Johnni Winther
2016/06/02 09:02:51
Done.
|
+ if (_interfaceMembersAreClassMembers == null) { |
+ ensureResolved(resolution); |
+ ClassMemberMixin superclass = this.superclass; |
+ if (superclass != null) { |
+ superclass._ensureInterfaceMembersAreClassMembers(resolution); |
+ } |
+ if ((superclass != null && |
+ (!superclass.interfaceMembersAreClassMembers || |
+ superclass.isMixinApplication)) || |
+ !interfaces.isEmpty) { |
+ _interfaceMembersAreClassMembers = false; |
+ } else { |
+ _interfaceMembersAreClassMembers = true; |
+ } |
+ } |
+ } |
+ |
/// If `true` interface members are the non-static class member. |
- bool interfaceMembersAreClassMembers = true; |
+ bool get interfaceMembersAreClassMembers => _interfaceMembersAreClassMembers; |
Map<Name, Member> classMembers; |
Map<Name, MemberSignature> interfaceMembers; |
@@ -834,18 +856,8 @@ abstract class ClassMemberMixin implements ClassElement { |
/// this class. |
MembersCreator _prepareCreator(Resolution resolution) { |
if (classMembers == null) { |
- ensureResolved(resolution); |
+ _ensureInterfaceMembersAreClassMembers(resolution); |
classMembers = new Map<Name, Member>(); |
- |
- if (interfaceMembersAreClassMembers) { |
- ClassMemberMixin superclass = this.superclass; |
- if ((superclass != null && |
- (!superclass.interfaceMembersAreClassMembers || |
- superclass.isMixinApplication)) || |
- !interfaces.isEmpty) { |
- interfaceMembersAreClassMembers = false; |
- } |
- } |
if (!interfaceMembersAreClassMembers) { |
interfaceMembers = new Map<Name, MemberSignature>(); |
} |