Index: pkg/analyzer/lib/src/generated/resolver.dart |
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart |
index 9054cabe99869f5ada4ffebaf905bd9675017c72..d74e92556dc052cd46a05a82d54d74cd78e05994 100644 |
--- a/pkg/analyzer/lib/src/generated/resolver.dart |
+++ b/pkg/analyzer/lib/src/generated/resolver.dart |
@@ -986,12 +986,10 @@ class BestPracticesVerifier extends RecursiveAstVisitor<Object> { |
if (element == null) { |
return false; |
} |
- if (element.type == type) { |
- return true; |
- } |
ClassElement typeElement = type.element; |
- return element.allSupertypes |
- .any((InterfaceType t) => t.element == typeElement); |
+ return element == typeElement || |
+ element.allSupertypes |
+ .any((InterfaceType t) => t.element == typeElement); |
} |
/** |