Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(480)

Unified Diff: pkg/kernel/lib/src/incremental_class_hierarchy.dart

Issue 2941363002: Add the 'crossGettersSetters' flag to ClassHierarchy.forEachOverridePair(). (Closed)
Patch Set: Fixes for review comments. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/kernel/lib/class_hierarchy.dart ('k') | pkg/kernel/test/class_hierarchy_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/src/incremental_class_hierarchy.dart
diff --git a/pkg/kernel/lib/src/incremental_class_hierarchy.dart b/pkg/kernel/lib/src/incremental_class_hierarchy.dart
index 3fcf08e8c13c3afd3aa4d043c0f8399df645c066..ce13ecf920a1a26266853de87feee3e92ec959f4 100644
--- a/pkg/kernel/lib/src/incremental_class_hierarchy.dart
+++ b/pkg/kernel/lib/src/incremental_class_hierarchy.dart
@@ -86,22 +86,29 @@ class IncrementalClassHierarchy implements ClassHierarchy {
@override
void forEachOverridePair(Class node,
- callback(Member declaredMember, Member interfaceMember, bool isSetter)) {
+ callback(Member declaredMember, Member interfaceMember, bool isSetter),
+ {bool crossGettersSetters: false}) {
_ClassInfo info = _getInfo(node);
for (var supertype in node.supers) {
var superNode = supertype.classNode;
var superInfo = _getInfo(superNode);
var superGetters = superInfo.interfaceGettersAndCalls;
+ var superSetters = superInfo.interfaceSetters;
+
_reportOverrides(info.implementedGettersAndCalls, superGetters, callback);
_reportOverrides(info.declaredGettersAndCalls, superGetters, callback,
onlyAbstract: true);
- var superSetters = superInfo.interfaceSetters;
_reportOverrides(info.implementedSetters, superSetters, callback,
isSetter: true);
_reportOverrides(info.declaredSetters, superSetters, callback,
isSetter: true, onlyAbstract: true);
+
+ if (crossGettersSetters) {
+ _reportOverrides(info.declaredGettersAndCalls, superSetters, callback);
+ _reportOverrides(info.declaredSetters, superGetters, callback);
+ }
}
if (!node.isAbstract) {
// If a non-abstract class declares an abstract method M whose
« no previous file with comments | « pkg/kernel/lib/class_hierarchy.dart ('k') | pkg/kernel/test/class_hierarchy_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698