On Aug 21, 2020, at 00:56, Ian Lance Taylor <i...@golang.org> wrote: > > No, the intent is that you would switch on the type parameter itself, > not a value. > > func g[T C](v T) T { > switch T { > // the rest is the same > } > } > > Thanks for asking.
Oh, this clarifies my remaining murkiness about the type switches quite nicely. Thanks! - Dave -- 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/863C3CE1-E027-42C8-9200-2DEBF8D0B966%40gmail.com.