What version of Go are you using (go version)?
$ go version
go version go1.18rc1 linux/amd64
What did you do?
type C1[T []T] struct{} // okay
type C2[T *T] struct{} // error: undefined: T
What did you expect to see?
Both compiles.
What did you see instead?
The second one doesn't compile.
Not sure if this is intended, just feel they should be consistent.
What version of Go are you using (
go version)?What did you do?
What did you expect to see?
Both compiles.
What did you see instead?
The second one doesn't compile.
Not sure if this is intended, just feel they should be consistent.