]> Cypherpunks repositories - gostls13.git/commitdiff
test: add test that caused gofrontend crash
authorIan Lance Taylor <iant@golang.org>
Sun, 26 Jun 2022 22:17:23 +0000 (15:17 -0700)
committerIan Lance Taylor <iant@golang.org>
Mon, 27 Jun 2022 16:13:35 +0000 (16:13 +0000)
For #52871

Change-Id: Id6102222a8b1ec8a84b716425bed0e349c65dbc4
Reviewed-on: https://go-review.googlesource.com/c/go/+/414336
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
test/fixedbugs/issue52871.go [new file with mode: 0644]

diff --git a/test/fixedbugs/issue52871.go b/test/fixedbugs/issue52871.go
new file mode 100644 (file)
index 0000000..d3731a1
--- /dev/null
@@ -0,0 +1,17 @@
+// 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.
+
+// gofrontend crashed compiling this code.
+
+package p
+
+type S struct {}
+
+func (s *S) test(_ string) {}
+
+var T = [1]func(*S, string) {
+       (*S).test,
+}