diff options
| author | Matthew Dempsky <mdempsky@google.com> | 2022-08-23 18:55:12 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2022-08-23 19:37:34 +0000 |
| commit | 503de697cbb77581bb13dd6e596ac20a9a0d03e5 (patch) | |
| tree | 30e31d219a0ee7b36b6b34b4d113e98f9c563688 /test/typeparam | |
| parent | 7d1cab12c77a5fed788829b0566db9dfd7866ac9 (diff) | |
| download | go-503de697cbb77581bb13dd6e596ac20a9a0d03e5.tar.xz | |
Revert "cmd/compile: restore test/nested.go test cases"
This reverts CL 424854.
Reason for revert: broke misc/cgo/stdio.TestTestRun on several builders.
Will re-land after CL 421879 is submitted.
Change-Id: I2548c70d33d7c178cc71c1d491cd81c22660348f
Reviewed-on: https://go-review.googlesource.com/c/go/+/425214
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'test/typeparam')
| -rw-r--r-- | test/typeparam/nested.go | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/test/typeparam/nested.go b/test/typeparam/nested.go index cdb8bfb574..068e32be1d 100644 --- a/test/typeparam/nested.go +++ b/test/typeparam/nested.go @@ -104,11 +104,27 @@ func main() { F[V]() F[W]() - type X[A any] U[X[A]] - - F[X[int]]() - F[X[Int]]() - F[X[GlobalInt]]() + // TODO(go.dev/issue/54512): Restore these tests. They currently + // cause problems for shaping with unified IR. + // + // For example, instantiating X[int] requires instantiating shape + // type X[shapify(int)] == X[go.shape.int]. In turn, this requires + // instantiating U[shapify(X[go.shape.int])]. But we're still in the + // process of constructing X[go.shape.int], so we don't yet know its + // underlying type. + // + // Notably, this is a consequence of unified IR writing out type + // declarations with a reference to the full RHS expression (i.e., + // U[X[A]]) rather than its underlying type (i.e., int), which is + // necessary to support //go:notinheap. Once go.dev/issue/46731 is + // implemented and unified IR is updated, I expect this will just + // work. + // + // type X[A any] U[X[A]] + // + // F[X[int]]() + // F[X[Int]]() + // F[X[GlobalInt]]() for j, tj := range tests { for i, ti := range tests[:j+1] { |
