Closed
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.