I found other 2 issues: 1. In golang.org/design/43651-type-parameters#element-constraint-example, the type SC must use an approximation element ~[]E for V2 and V3 to compile.
2. In the same section, the document should add a DoubleDefined2 function, to show the new syntax introduced in #48424. func DoubleDefined2(S ~[]E, E constraints.Integer) S { ... } Thanks Manlio On Wednesday, January 19, 2022 at 11:04:01 PM UTC+1 Ian Lance Taylor wrote: > On Wed, Jan 19, 2022 at 1:50 AM Manlio Perillo <manlio....@gmail.com> > wrote: > > > > I'm reading the Type Parameter Proposal to learn how to use type > parameters and I noted that one of the example in the "Element constraint > example" section uses the > > constraints.Number constraint. This constraint does not exist and > probably should be replaced with constraints.Integer. > > Thanks, fixed. > > Ian > -- 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/cbccd0f4-03f3-4861-b1c2-3bede400dc5cn%40googlegroups.com.