Debian Codegraph @

test/fixedbugs/issue65808.go

raw
1 // compile
2
3 // Copyright 2024 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.package main
6
7 package main
8
9 type Stringer interface {
10 String() string
11 }
12
13 type (
14 stringer struct{}
15 stringers [2]stringer
16 foo struct {
17 stringers
18 }
19 )
20
21 func (stringer) String() string { return "" }
22 func toString(s Stringer) string { return s.String() }
23
24 func (v stringers) toStrings() []string {
25 return []string{toString(v[0]), toString(v[1])}
26 }
27
28 func main() {
29 _ = stringers{}
30 }