gokart
gokart copied to clipboard
Generics support
When I scan a repo using Go 1.18 generics, gokart panics with the message: zeroConst: unexpected T
.
For reference, the only function in the repo using generics is as follows:
func mapSlice[T any, M any](a []T, f func(T) M) []M {
n := make([]M, len(a))
for i, e := range a {
n[i] = f(e)
}
return n
}
It looks like x/tools/go/ssa
is still waiting on generics support. I'm raising this here as a reference and reminder to check that analysis of generics works once that package is fixed.