From 503de697cbb77581bb13dd6e596ac20a9a0d03e5 Mon Sep 17 00:00:00 2001 From: Matthew Dempsky Date: Tue, 23 Aug 2022 18:55:12 +0000 Subject: 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 TryBot-Result: Gopher Robot Reviewed-by: Bryan Mills Auto-Submit: Matthew Dempsky --- test/typeparam/nested.go | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'test/typeparam/nested.go') 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] { -- cgit v1.3