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

Unified Diff: pkg/analyzer/lib/src/dart/element/element.dart

Issue 3000183002: Fix ClassElement.allSupertypes to include interfaces of mixins (issue 29767) (Closed)
Patch Set: address comments 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
Index: pkg/analyzer/lib/src/dart/element/element.dart
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index 2379185a61a6ce8e5960b94b2c6268af82f45187..fdd058496ac117636aeaeadaae790fe8e6cc601a 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -1154,14 +1154,11 @@ class ClassElementImpl extends AbstractClassElementImpl
if (supertype != null) {
typesToVisit.add(supertype);
}
- for (InterfaceType type in currentElement.interfaces) {
+ for (InterfaceType type in currentType.interfaces) {
typesToVisit.add(type);
}
- for (InterfaceType type in currentElement.mixins) {
- ClassElement element = type.element;
- if (!visitedClasses.contains(element)) {
- supertypes.add(type);
- }
+ for (InterfaceType type in currentType.mixins) {
+ typesToVisit.add(type);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698