If the type of the argument to close is a type parameter, all types in its type set must be channels with the same element type.
But the code compiles (since 1.18):
func dig[T ~chan int | ~chan bool | ~chan<- string](x T) {
close(x)
}
So maybe it is a good idea to just remove the about quoted line from spec.