go/types, cmd/compile/internal/types2: stack overflow checking recursive generic type #45550
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
The type checker does not currently handle invalid recursive constraints very gracefully. Consider the following
https://go2goplay.golang.org/p/HRHfhFsortG
If the declaration for
myBuilder
is commented out, we get an error that Builder is not a generic type. If it is uncommented, we get a stack overflow in subst.We should instead emit an error that this recursive type declaration is invalid.
CC @griesemer
The text was updated successfully, but these errors were encountered: