-
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
cmd/compile: generics + constant cycle causes panic in type checker #52748
Comments
Huh, this reports an initialization cycle when type-checking. For example, after copying the above into
How does it get past type-checking? |
Aha, full stack is below. It's getting to
|
This is a compiler bug: The compiler supplies its own size computation function to the type checker, and this size computation function assumes that a type cannot be invalid, which it is in this case. In contrast, the types2 size computation function has a catch-all for cases like these. We just need to decide if a catch-all or adding the invalid case (adding an entry basicSizes in noder/sizes.go) to is the better solution. |
Change https://go.dev/cl/404894 mentions this issue: |
https://go.dev/play/p/xnY6OXjtKPT
The text was updated successfully, but these errors were encountered: