Index: pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart |
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart |
index 7630c71e5cf8096a63744be0fe88cd75a57bd228..cde2c48bfae47204ad694cbec904c1c40a0526c5 100644 |
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart |
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart |
@@ -182,6 +182,7 @@ abstract class KernelClassBuilder |
void checkOverrides(ClassHierarchy hierarchy) { |
hierarchy.forEachOverridePair(cls, checkOverride); |
+ hierarchy.forEachCrossOverridePair(cls, handleCrossOverride); |
} |
void checkOverride( |
@@ -208,6 +209,17 @@ abstract class KernelClassBuilder |
} |
} |
+ void handleCrossOverride( |
+ Member declaredMember, Member interfaceMember, bool isSetter) { |
+ // Record any cases where a field or getter/setter has a corresponding (but |
+ // opposite) getter/setter in a superclass, since this information will be |
+ // needed for type inference. |
+ if (declaredMember is KernelMember && |
+ identical(declaredMember.enclosingClass, cls)) { |
+ KernelMember.recordCrossOverride(declaredMember, interfaceMember); |
+ } |
+ } |
+ |
void checkMethodOverride( |
Procedure declaredMember, Procedure interfaceMember) { |
if (declaredMember.enclosingClass != cls) { |