aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/fixedbugs/issue65808.go30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/fixedbugs/issue65808.go b/test/fixedbugs/issue65808.go
new file mode 100644
index 0000000000..e6c4cf1ed0
--- /dev/null
+++ b/test/fixedbugs/issue65808.go
@@ -0,0 +1,30 @@
+// compile
+
+// Copyright 2024 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.package main
+
+package main
+
+type Stringer interface {
+ String() string
+}
+
+type (
+ stringer struct{}
+ stringers [2]stringer
+ foo struct {
+ stringers
+ }
+)
+
+func (stringer) String() string { return "" }
+func toString(s Stringer) string { return s.String() }
+
+func (v stringers) toStrings() []string {
+ return []string{toString(v[0]), toString(v[1])}
+}
+
+func main() {
+ _ = stringers{}
+}