Hello,
I didn't find in the latest draft design any mention of generics with
closure and I'm struggling in having something working:
type Foo(type T) struct {}
func bar(type T)() Foo(T) {
return func() Foo(T) {
return Foo(T){}
}()
}
In this example, how can I create a closure that
Hello all,
I'm working on implementing generics on a big container projet.
So far, everything was good except for this very case:
type Foo(type T) struct {
v int
}
func (_ *Foo(T)) bar() int {
elem := <-make(chan Foo(T))
return elem.v
}
*Foo* being a generic structure, I have a method