-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
FixPendingIssues that have a fix which has not yet been reviewed or submitted.Issues that have a fix which has not yet been reviewed or submitted.FrozenDueToAgecompiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.genericsIssue is related to genericsIssue is related to generics
Milestone
Description
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
Metadata
Metadata
Assignees
Labels
FixPendingIssues that have a fix which has not yet been reviewed or submitted.Issues that have a fix which has not yet been reviewed or submitted.FrozenDueToAgecompiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.genericsIssue is related to genericsIssue is related to generics