-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
compiler crash on recursive interface #2745
Labels
Milestone
Comments
lvd has a fix nearly ready Owner changed to @lvdlvd. |
We can't fix everything but I think that for the compiler any actual crash should be addressed sooner rather than later. I would be fine with printing an error for this kind of code. In gccgo this code crashed because of an infinite recursion in some code trying to decide whether the types were the same. I guess that is the gccgo equivalent to eqtype. I fixed it by passing down a list of types "assumed to be equivalent." I just built the list on the stack as I went. Then when I start comparing two interface types, I first check the list; if both types are on it, return true. This shuts down the infinite recursion and treats the types as equal if nothing indicates otherwise. |
Nice fix. Owner changed to @rsc. Status changed to Started. |
This issue was closed by revision 427b5bd. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: