go issue6399 源码
golang issue6399 代码
文件路径:/test/fixedbugs/issue6399.go
// compile
package main
type Foo interface {
	Print()
}
type Bar struct{}
func (b Bar) Print() {}
func main() {
	b := make([]Bar, 20)
	f := make([]Foo, 20)
	for i := range f {
		f[i] = b[i]
	}
	T(f)
	_ = make([]struct{}, 1)
}
func T(f []Foo) {
	for i := range f {
		f[i].Print()
	}
}
相关信息
相关文章
                        
                            0
                        
                        
                             赞
                        
                    
                    
                热门推荐
- 
                        2、 - 优质文章
 - 
                        3、 gate.io
 - 
                        7、 openharmony
 - 
                        9、 golang