We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e52a8be commit 5c1eee9Copy full SHA for 5c1eee9
pkg/analyzer/lib/src/error/best_practices_verifier.dart
@@ -1609,18 +1609,7 @@ class _InvalidAccessVerifier {
1609
if (element == null) {
1610
return false;
1611
}
1612
- if (element == superElement) {
1613
- return true;
1614
- }
1615
- // TODO(scheglov) `allSupertypes` is very expensive
1616
- var allSupertypes = element.allSupertypes;
1617
- for (var i = 0; i < allSupertypes.length; i++) {
1618
- var supertype = allSupertypes[i];
1619
- if (supertype.element == superElement) {
1620
1621
1622
1623
- return false;
+ return element.thisType.asInstanceOf(superElement) != null;
1624
1625
1626
bool _hasVisibleForTemplate(Element element) {
0 commit comments