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

Unified Diff: pkg/analyzer/lib/src/generated/error_verifier.dart

Issue 2708773002: Fix infinite loop when there is a cycle in the class hierarchy (issue 28837) (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c4ebab67fa4fec985c9ba87bdd0f472fc7953221..fe65b45d70304b688b7a85f752ef36e3adf91b0c 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -4908,6 +4908,9 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
}
void _checkForMustCallSuper(MethodDeclaration node) {
+ if (node.isStatic) {
+ return;
+ }
MethodElement element = _findOverriddenMemberThatMustCallSuper(node);
if (element != null) {
_InvocationCollector collector = new _InvocationCollector();
@@ -6408,7 +6411,8 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
}
String name = member.name;
ClassElement superclass = classElement.supertype?.element;
- while (superclass != null) {
+ Set<ClassElement> visitedClasses = new Set();
scheglov 2017/02/20 18:27:02 Type argument in creation?
Brian Wilkerson 2017/02/20 19:46:30 Done
+ while (superclass != null && visitedClasses.add(superclass)) {
ExecutableElement member = superclass.getMethod(name) ??
superclass.getGetter(name) ??
superclass.getSetter(name);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698