-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue with recursive type variable protections to fix #1390 #1391
Conversation
When a type variable is referenced multiple times it needs to resolve to the same value. Previously, the second attempt would abort resolution early in order to protect against infinite recursion.
The Codacy check is flagging existing code with a legitimate |
Neither |
Fair point. There were a couple points in the Cadacy is now happy. 😃 |
Could you please edit the description and include:
It appears otherwise GitHub does not understand that this pull request and the issue are related. |
Done. Hopefully this PR isn't too old as to be useless at this point. |
Thanks! There haven't been any other changes to |
Use two-space indentation for the new test. Use standard Google import style. Supply missing type argument for `TypeVariable`.
Adjust some minor details of #1391.
When a type variable is referenced multiple times it needs to resolve to the same value. Previously, the second attempt would abort resolution early in order to protect against infinite recursion.
NOTE: I could use some scrutiny on this as I don't fully understand the implications of all the code branches. This commit does resolve the issue but stylistically I'm not really sold on breaking out of the while loop in order to capture the final result for subsequent resolution attempts.
Fixes #1390