Closed
Description
This is a design question: Should it be possible to use a type parameter as a constraint? For instance, should this be accepted:
func _(type A interface{ type interface{} }, B A)()
A
is a type parameter, not an interface, but the constraint for A
ensures that A
eventually is an interface. This case even appears to satisfy the type-checker. More complex cases fail at the moment.
See also the 2nd example from #39711.
cc: @ianlancetaylor