mirror of
https://github.com/traefik/yaegi.git
synced 2026-06-01 18:37:56 +00:00
20 lines
175 B
Go
20 lines
175 B
Go
package main
|
|
|
|
type T struct {
|
|
t func(*T)
|
|
y *xxx
|
|
}
|
|
|
|
func f(t *T) { println("in f") }
|
|
|
|
type xxx struct{}
|
|
|
|
func main() {
|
|
x := &T{}
|
|
x.t = f
|
|
println("ok")
|
|
}
|
|
|
|
// Output:
|
|
// ok
|