What version of Go are you using (go version)?
$ go version
go version go1.20.5 linux/amd64
Does this issue reproduce with the latest release?
Yes
What did you do?
package main
const S = "Go"
type T [S[0]]int // syntax error: type parameters must be named
func main() {}
What did you expect to see?
syntax error: array length must be a constant
or
syntax error: type constraint is incomplete
or
syntax error: either type constraint is incomplete or array length is not a constant
What did you see instead?
syntax error: type parameters must be named
What version of Go are you using (
go version)?Does this issue reproduce with the latest release?
Yes
What did you do?
What did you expect to see?
syntax error: array length must be a constant
or
syntax error: type constraint is incomplete
or
syntax error: either type constraint is incomplete or array length is not a constant
What did you see instead?
syntax error: type parameters must be named