github.com/switchupcb/yaegi@v0.10.2/_test/method39.go (about) 1 package main 2 3 import ( 4 "fmt" 5 "sync" 6 7 "github.com/switchupcb/yaegi/_test/method38" 8 ) 9 10 func NewPool() Pool { return Pool{} } 11 12 type Buffer struct { 13 bs []byte 14 pool Pool 15 } 16 17 type Pool struct { 18 p *sync.Pool 19 } 20 21 var ( 22 _pool = NewPool() 23 Get = _pool.Get 24 ) 25 26 func main() { 27 fmt.Println(Get()) 28 } 29 30 // Error: 31 // 17:11: undefined selector Get