aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2022-05-11 19:26:14 -0700
committerGopher Robot <gobot@golang.org>2022-05-12 21:45:28 +0000
commit6365efb7dcfd6ab90ffe5541ca26bd8d875167a3 (patch)
treeb4574b41e13d8120064998504da4fefcac0d7441
parent2136e1551089bbac284980c2521d8b729f6a5c3e (diff)
downloadgo-6365efb7dcfd6ab90ffe5541ca26bd8d875167a3.tar.xz
test: add test case that caused a gofrontend crash
For #52841 Change-Id: If4723a70fba0dbedb5d1e70dab58f0b4612bf8b9 Reviewed-on: https://go-review.googlesource.com/c/go/+/405759 Auto-Submit: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
-rw-r--r--test/fixedbugs/issue52841.go30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/fixedbugs/issue52841.go b/test/fixedbugs/issue52841.go
new file mode 100644
index 0000000000..c8632aef77
--- /dev/null
+++ b/test/fixedbugs/issue52841.go
@@ -0,0 +1,30 @@
+// compile
+
+// Copyright 2022 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 52841: gofrontend crashed writing export data
+
+package p
+
+func F() {
+ x := ([17][1]interface {
+ Method9()
+ Method10()
+ }{
+ func() (V47 [1]interface {
+ Method9()
+ Method10()
+ }) {
+ return
+ }(),
+ func(V48 string) (V49 [1]interface {
+ Method9()
+ Method10()
+ }) {
+ return
+ }("440"),
+ })
+ _ = x
+}