github.com/traefik/yaegi@v0.15.1/_test/issue-1185.go (about) 1 package main 2 3 import "io" 4 5 type B []byte 6 7 func (b B) Write(p []byte) (n int, err error) { 8 b = p 9 return len(p), nil 10 } 11 12 func main() { 13 b := B{} 14 a := make([]io.Writer, 0) 15 a = append(a, b) 16 println(len(a)) 17 } 18 19 // Output: 20 // 1