]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: ensure invalid generic types are marked as invalid
authorRobert Findley <rfindley@google.com>
Thu, 10 Nov 2022 00:16:39 +0000 (19:16 -0500)
committerRobert Findley <rfindley@google.com>
Wed, 16 Nov 2022 15:10:02 +0000 (15:10 +0000)
commit70f585f018bd534a15933eb80e2812387d2283f5
tree44d382913d54596c2a2f5b24dd694d918ca8119e
parent978ce7e252b0d6ff0a19f66206ed5f3eca281059
go/types, types2: ensure invalid generic types are marked as invalid

When detecting invalid types, we may detect cycles through instances.
Ensure that the uninstantiated origin type is also marked invalid.

Fixes #56665

Change-Id: Id67653bcb072ac80161dea07d0ced566e61564a8
Reviewed-on: https://go-review.googlesource.com/c/go/+/449275
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
src/cmd/compile/internal/types2/validtype.go
src/go/types/validtype.go
src/internal/types/testdata/fixedbugs/issue49043.go
src/internal/types/testdata/fixedbugs/issue56665.go [new file with mode: 0644]