What version of Go are you using (go version)?
$ go version
go version go1.17beta1 linux/amd64
What did you do?
package main
func SumPointer(b []byte) []byte {
return (*[32]byte)(b[:32])[:]
}
func main() {
}
What did you expect to see?
Compiles okay.
What did you see instead?
Compiler crashes.
# command-line-arguments
./main.go:4:28: internal compiler error: 'SumPointer': bad type in slice int
Please file a bug report including a short program that triggers the error.
https://golang.org/issue/new
What version of Go are you using (
go version)?What did you do?
What did you expect to see?
Compiles okay.
What did you see instead?
Compiler crashes.