(I'm not really sure if it's a bug or just an extension of the current type parameters mechanism that wasn't proposed or implemented yet, so please feel free to merge into other issues or close as duplicate.)
I've been playing around with the current type params implementation, and found that this code:
$ gotip run --gcflags '-G=3' ./go/typar/main.go
go/typar/main.go:69:7: interface is (or embeds) comparable
gotip version is go version devel go1.17-3e48c0381f Wed Jul 21 20:29:18 2021 +0000 linux/amd64.
The intention here is to have an interface, nullableMakeable, that is the interface of types that are nullable, have a length, and that can be instantiated with make. I haven't found anything prohibiting this in the draft design/proposal, although it's a rather big document, so I might have missed something.
The text was updated successfully, but these errors were encountered:
@ainar-g, I am not sure if you will get useful signal from building things with "gotip run --gcflags '-G=3' " -- gotip tracks the master branch, whereas active development of generics has moved (a while back) to the "dev.typeparams" branch.
Would also like to reiterate that we don't use the issue tracker for questions in Go, I think you would be better off bringing up your question about embedding "comparable" on the golang-dev mailing list.
Closing out this issue, please re-open if you disagree with the above. Thanks.