You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Checked out the latest version of decouple and ran go vet on it:
$ git clone https://github.com/bobg/decouple.git
$ cd decouple
$ go vet ./...
What did you expect to see?
No output.
What did you see instead?
../../../../pkg/mod/github.com/bobg/go-generics/v2@v2.2.1/slices/dropin.go:150:21: type func(a E, b E) bool of less does not match inferred type func(a E, b E) int for func(a E, b E) int
../../../../pkg/mod/github.com/bobg/go-generics/v2@v2.2.1/slices/dropin.go:156:27: type func(a E, b E) bool of less does not match inferred type func(a E, b E) int for func(a E, b E) int
../../../../pkg/mod/github.com/bobg/go-generics/v2@v2.2.1/slices/dropin.go:167:32: type func(a E, b E) bool of less does not match inferred type func(a E, b E) int for func(a E, b E) int
This refers to these lines in my go-generics module: 150, 156, 167.
These lines are meant to make my slices package be a drop-in replacement for the new Go 1.21 slices package. In each case, my less is declared to be func(a, b E) bool (with E a type parameter), and is passed to a corresponding function in Go's slices, also expecting a func(a, b E) bool. Not an int in sight.
Reproducible after go clean -modcache.
The text was updated successfully, but these errors were encountered:
Getting this error:
...for code that explicitly declares
less
asfunc(a, b E) bool
and uses it in afunc(a, b E) bool
context. Not anint
in sight. Details follow.What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Checked out the latest version of decouple and ran
go vet
on it:$ git clone https://github.com/bobg/decouple.git $ cd decouple $ go vet ./...
What did you expect to see?
No output.
What did you see instead?
This refers to these lines in my go-generics module: 150, 156, 167.
These lines are meant to make my
slices
package be a drop-in replacement for the new Go 1.21slices
package. In each case, myless
is declared to befunc(a, b E) bool
(withE
a type parameter), and is passed to a corresponding function in Go'sslices
, also expecting afunc(a, b E) bool
. Not anint
in sight.Reproducible after
go clean -modcache
.The text was updated successfully, but these errors were encountered: