Files
llgo/compiler/cl/_testgo/tprecurfn/in.go

12 lines
165 B
Go
Raw Normal View History

package main
type My[T any] struct {
fn func(n T)
next *My[T]
}
func main() {
m := &My[int]{next: &My[int]{fn: func(n int) { println(n) }}}
m.next.fn(100)
}