You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The method Resolver.hasRedirectedConstructorCycle(ConstructorElement) contains a loop that will never terminate when there are cyclic references in constructor invocations. This was caught by .../dart/frog/tests/leg_only/src/CyclicConstructorTest.dart.
In this particular case, "next" oscillates between being the element for the constructor named "a" and the constructor named "b".
The text was updated successfully, but these errors were encountered:
I have a proposed fix for this bug. Replace the method with the following:
private boolean hasRedirectedConstructorCycle(ConstructorElement constructorElement) {
HashSet<ConstructorElement> visited = new HashSet<ConstructorElement>();
ConstructorElement next = getNextConstructorInvocation(constructorElement);
while (next != null) {
if (visited.contains(next)) {
return true;
}
if (constructorElement.getName().equals(next.getName())) {
return true;
}
visited.add(next);
next = getNextConstructorInvocation(next);
}
return false;
}
It's difficult for me to run the dartc tests and I'm not certain that this is the right fix, so I'll leave it to you to evaluate it. I believe that it fixes this particular issue, but there appear to be other issues with opening frog. Continuing to investigate the larger issue.
The method Resolver.hasRedirectedConstructorCycle(ConstructorElement) contains a loop that will never terminate when there are cyclic references in constructor invocations. This was caught by .../dart/frog/tests/leg_only/src/CyclicConstructorTest.dart.
In this particular case, "next" oscillates between being the element for the constructor named "a" and the constructor named "b".
The text was updated successfully, but these errors were encountered: