-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.
Milestone
Description
There is a (known) ambiguity for type parameter lists. For
type T[P *int] struct{}
the parser cannot tell if this is a generic type declaration or an array type declaration with length P*int
. In general, people will write ~*int
and there is the work-around interface{*int}
; one just has to be aware of it.
But the parser also assumes that
type T[P *int, Q any] struct{}
is starting an array type declaration, yet this is clearly a valid type parameter list.
Should be fixed for 1.18 but is not a release blocker as there are work-arounds.
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.