aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/fixedbugs/issue73716.go37
1 files changed, 37 insertions, 0 deletions
diff --git a/test/fixedbugs/issue73716.go b/test/fixedbugs/issue73716.go
new file mode 100644
index 0000000000..4680b362c6
--- /dev/null
+++ b/test/fixedbugs/issue73716.go
@@ -0,0 +1,37 @@
+// build
+
+// Copyright 2025 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 73716: cmd/compile: unnamed functions missing FuncInfo
+
+package main
+
+import "fmt"
+
+type EP func()
+type F func(EP) EP
+
+func main() {
+ eps := []EP{ep1, ep2}
+ var h EP
+
+ for _, ep := range eps {
+ h = F(func(e EP) EP {
+ return func() {
+ ep()
+ e()
+ }
+ })(h)
+ }
+ h()
+}
+
+func ep1() {
+ fmt.Printf("ep1\n")
+}
+
+func ep2() {
+ fmt.Printf("ep2\n")
+}