cmd/compile: un-hide closure func in init function

Same as CL 492135, but for init function.

Fixes #62277

Change-Id: If5ff9bc2ce2a73193b1f7ee5f7f14045d1354f56
Reviewed-on: https://go-review.googlesource.com/c/go/+/522956
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
This commit is contained in:
Cuong Manh Le 2023-08-25 15:08:05 +07:00 committed by Gopher Robot
parent 59abd0e88b
commit 079c0441d5
4 changed files with 44 additions and 0 deletions

View file

@ -1159,6 +1159,12 @@ func TestIssue47873(t *testing.T) {
goCmd(t, "run", "-linkshared", "./issue47837/main")
}
func TestIssue62277(t *testing.T) {
globalSkip(t)
goCmd(t, "install", "-buildmode=shared", "-linkshared", "./issue62277/p")
goCmd(t, "test", "-linkshared", "./issue62277")
}
// Test that we can build std in shared mode.
func TestStd(t *testing.T) {
if testing.Short() {