Re: [go-nuts] [generics]: Pointer methods in interfaces used as constraints?

2020-08-15 Thread Ian Lance Taylor
On Fri, Aug 14, 2020 at 9:31 PM Patrick Smith wrote: > > https://go.googlesource.com/proposal/+/refs/heads/master/design/go2draft-type-parameters.md#pointer-method-example > has this example: > > // Setter2 is a type constraint that requires that the type > // implement a Set method that sets the

[go-nuts] [generics]: Pointer methods in interfaces used as constraints?

2020-08-14 Thread Patrick Smith
https://go.googlesource.com/proposal/+/refs/heads/master/design/go2draft-type-parameters.md#pointer-method-example has this example: // Setter2 is a type constraint that requires that the type // implement a Set method that sets the value from a string, // and also requires that the type be a poin