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 would return a *Foo(T)*?

Here is the playground: https://go2goplay.golang.org/p/N-b10vSCois

Cheers

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/2083e7d6-95f4-4d34-b5c1-6f986d0d4c51o%40googlegroups.com.

Reply via email to