-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: restore nested.go test case #54512
Comments
Confirmed that changing this line: go/src/cmd/compile/internal/noder/writer.go Line 793 in 6dc7b06
to We can make that change as soon as the compiler no longer needs to support:
(We don't need to have necessarily removed |
Change https://go.dev/cl/424854 mentions this issue: |
We reverted the fix. |
Change https://go.dev/cl/426335 mentions this issue: |
Change https://go.dev/cl/455279 mentions this issue: |
[Re-land of CL 424854, which was reverted as CL 425214.] When handling a type declaration like: ``` type B A ``` unified IR has been writing out that B's underlying type is A, rather than the underlying type of A. This is a bit awkward to implement and adds complexity to importers, who need to handle resolving the underlying type themselves. But it was necessary to handle when A was declared like: ``` //go:notinheap type A int ``` Because we expected A's not-in-heap'ness to be conferred to B, which required knowing that A was on the path from B to its actual underlying type int. However, since #46731 was accepted, we no longer need to support this case. Instead we can write out B's actual underlying type. One stumbling point though is the existing code for exporting interfaces doesn't work for the underlying type of `comparable`, which is now needed to implement `type C comparable`. As a bit of a hack, we we instead export its underlying type as `interface{ comparable }`. Fixes #54512. Change-Id: I9aa087e0a277527003195ebc7f4fbba6922e788c Reviewed-on: https://go-review.googlesource.com/c/go/+/455279 Run-TryBot: Matthew Dempsky <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Robert Griesemer <[email protected]>
In CL 421821, I've commented out part of the test in nested.go, because it's incredibly contrived and runs into an awkward reentrancy issue with unified IR and shape types. I expect the issue will go away once #46731 is implemented, and unified IR updated to take advantage of it. This is a reminder issue to make sure that happens before Go 1.20.
The text was updated successfully, but these errors were encountered: