// expected: slice-to-array-pointer conversion is not allowed // // Slices replace arrays; there is no slice-to-array machinery. (*[N]T)(s) on a // slice would hand back a pointer into slice storage with a fixed length the // runtime does not track, so it must be rejected instead of silently // reinterpreting the slice header. package main func main() { s := []byte{1, 2, 3, 4} p := (*[4]byte)(s) println(int32(p[0])) }