go version devel go1.18-b86e8dd0f3 Thu Sep 9 09:06:46 2021 +0000 linux/amd64
I see an unexpected error when I run go test on the following code:
-- p.go --
package p
type I[T I[T]] interface {
F() T
}
-- p_test.go --
package p
import "testing"
func TestP(t *testing.T) {}
The error that I see is:
# github.com/rogpeppe/generic/set-bug
vet: ./p.go:3:10: I is not a generic type
# github.com/rogpeppe/generic/set-bug.test
/tmp/go-build1456973644/b001/_testmain.go:13:8: could not import github.com/rogpeppe/generic/set-bug (cannot import "github.com/rogpeppe/generic/set-bug" (type parameter bound more than once), possibly version skew - reinstall package)
FAIL github.com/rogpeppe/generic/set-bug [build failed]
I see an unexpected error when I run
go teston the following code:The error that I see is: