]> Cypherpunks.ru repositories - gostls13.git/commit
go/types, types2: better error for generic type decl. with missing constraint
authorRobert Griesemer <gri@golang.org>
Thu, 6 Oct 2022 20:17:53 +0000 (13:17 -0700)
committerGopher Robot <gobot@golang.org>
Mon, 10 Oct 2022 15:17:24 +0000 (15:17 +0000)
commit665992b5158c1c851f6e6a1ecb15a166f5ff611e
tree76e9a9751ab2c57db42c3963d98a40a466db4acb
parent213504e5431891e8421a92ab72ac08981ce07516
go/types, types2: better error for generic type decl. with missing constraint

If a generic type declaration is missing a constraint, syntactically
it is an array type declaration with an undefined array length.
Mention the possibility of a missing constraint in the error message
for the undefined array length.

For #56064.
For #55961.
For #51145.

Change-Id: Ic161aeda9ea44faa8aa3bf3e9d62b3b13a95d4c5
Reviewed-on: https://go-review.googlesource.com/c/go/+/439559
Run-TryBot: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
src/cmd/compile/internal/types2/typexpr.go
src/go/types/typexpr.go
src/internal/types/testdata/fixedbugs/issue43527.go