Doing `var F = Foo` (where `Foo` is a generic function) fails with an error
like this: `prog.go2:21:9: cannot use generic function Foo (value of type
func(type T1, T2)(fst T1, snd T2) Bar(T1, T2)) without instantiation in
variable declaration`. Trying `var F = Foo[int,int]` fails with an error
like `prog.go2:21:9: expected expression`.

Personally, I think both of these should work (with the second being a
version of `Foo` that only accepts two ints), but the first one
definitely seems like an implementation error, as the first snippet works
fine if `Foo` is a non-generic function.

-- 
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/CAHtSCHLDZi7nTx_NtWHfOCGges0Y%3DQWTiCzdKWp4vpbVtmvAwQ%40mail.gmail.com.

Reply via email to