Index: pkg/analyzer/lib/src/generated/error_verifier.dart |
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart |
index 47a4979d56e5662fe2886d6bf6c088b20375fbc9..8d4786c76c2303091d911a225b37147d76818d55 100644 |
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart |
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart |
@@ -6361,16 +6361,24 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> { |
} |
ExecutableElement _getOverriddenMember(Element member) { |
- if (member == null || _inheritanceManager == null) { |
+ if (member == null) { |
return null; |
} |
- |
ClassElement classElement = |
member.getAncestor((element) => element is ClassElement); |
if (classElement == null) { |
return null; |
} |
- return _inheritanceManager.lookupInheritance(classElement, member.name); |
+ String name = member.name; |
+ ClassElement superclass = classElement.supertype?.element; |
+ while (superclass != null) { |
+ ExecutableElement member = superclass.getMethod(name) ?? superclass.getGetter(name) ?? superclass.getSetter(name); |
+ if (member != null) { |
+ return member; |
+ } |
+ superclass = superclass.supertype?.element; |
+ } |
+ return null; |
} |
/** |