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

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

Issue 3004023002: Revert "Fix forEachOverridePair in the case where the class in question is abstract." (Closed)
Patch Set: Created 3 years, 4 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 dc202c7b7d83c29dadf2fe9dc67f0e2cef39982b..b99956ee2a473d33c7955e4b90bb4e2dd2b96650 100644
--- a/pkg/kernel/lib/src/incremental_class_hierarchy.dart
+++ b/pkg/kernel/lib/src/incremental_class_hierarchy.dart
@@ -104,18 +104,20 @@ class IncrementalClassHierarchy implements ClassHierarchy {
_reportOverrides(info.declaredSetters, superSetters, callback,
isSetter: true, onlyAbstract: true);
}
- // If a class declares an abstract method M whose
- // implementation M' is inherited from the superclass, then the inherited
- // method M' overrides the declared method M.
- // This flies in the face of conventional override logic, but is necessary
- // because an instance of the class will contain the method M' which can
- // be invoked through the interface of M.
- // Note that [_reportOverrides] does not report self-overrides, so in
- // most cases these calls will just scan both lists and report nothing.
- _reportOverrides(info.implementedGettersAndCalls,
- info.declaredGettersAndCalls, callback);
- _reportOverrides(info.implementedSetters, info.declaredSetters, callback,
- isSetter: true);
+ if (!node.isAbstract) {
+ // If a non-abstract class declares an abstract method M whose
+ // implementation M' is inherited from the superclass, then the inherited
+ // method M' overrides the declared method M.
+ // This flies in the face of conventional override logic, but is necessary
+ // because an instance of the class will contain the method M' which can
+ // be invoked through the interface of M.
+ // Note that [_reportOverrides] does not report self-overrides, so in
+ // most cases these calls will just scan both lists and report nothing.
+ _reportOverrides(info.implementedGettersAndCalls,
+ info.declaredGettersAndCalls, callback);
+ _reportOverrides(info.implementedSetters, info.declaredSetters, callback,
+ isSetter: true);
+ }
}
@override
« 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