https://go.dev/play/p/xnY6OXjtKPT
$ go version
go version go1.18.1 darwin/arm64
$ cat b.go
package main
import "unsafe"
type S[T any] struct{}
const c = unsafe.Sizeof(S[[c]byte]{})
$ go tool compile b.go
<unknown line number>: internal compiler error: panic: unimplemented basic: invalid type (kind 0)
Please file a bug report including a short program that triggers the error.
https://go.dev/issue/new
https://go.dev/play/p/xnY6OXjtKPT