Re: [go-nuts] Re: About struct fields in type parameters

2021-11-12 Thread tapi...@gmail.com
OK, I will try it several days later. On Saturday, November 13, 2021 at 1:21:08 AM UTC+8 axel.wa...@googlemail.com wrote: > Yes, the doc is outdated. Since then, several changes have been made to > the design, to accomodate issues that either came up during the discussion > or where

Re: [go-nuts] Re: About struct fields in type parameters

2021-11-12 Thread 'Axel Wagner' via golang-nuts
Yes, the doc is outdated. Since then, several changes have been made to the design, to accomodate issues that either came up during the discussion or where discovered after - one of the more significant is https://github.com/golang/go/issues/45346, but there are others. That's why I said we should

[go-nuts] Re: About struct fields in type parameters

2021-11-12 Thread tapi...@gmail.com
The SliceConstraint example also doesn't work. Is the doc I mentioned outdated? On Saturday, November 13, 2021 at 1:13:13 AM UTC+8 tapi...@gmail.com wrote: > And this fails to compile, although the docs says it is valid: > > // sliceOrMap is a type constraint for a slice or a map. >

[go-nuts] Re: About struct fields in type parameters

2021-11-12 Thread tapi...@gmail.com
And this fails to compile, although the docs says it is valid: // sliceOrMap is a type constraint for a slice or a map. type sliceOrMap interface { []int | map[int]int } // Entry returns the i'th entry in a slice or the value of a map // at key i. This is valid as the