]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile/internal/types2: break cycles in invalid types
authorRobert Griesemer <gri@golang.org>
Wed, 6 Oct 2021 16:03:34 +0000 (09:03 -0700)
committerRobert Griesemer <gri@golang.org>
Wed, 6 Oct 2021 19:44:11 +0000 (19:44 +0000)
commit9062a5298bdee895dd9f4e9c07ffd3e261c0ac13
treee673951772bf71d09fab15867c165e4f215a131b
parentf05c67f18259800e4847e44c9ca34de2bf5ed198
cmd/compile/internal/types2: break cycles in invalid types

This CL reverses the change in CL 284254 (which was ported
to types2) which originated in CL 240901 to address a crash
in a test created by a fuzzer (that crash appears to be
avoided in other ways, now).

This exposed another bug in typeset.go where we don't look
for the underlying type when testing if a type is an interface
or not. Fixed that as well.

Adjusted a test case that now doesn't report an error anymore
(which is good).

Fixes #48819.

Change-Id: I611d68e053d6b8a2f7176d0cd5a44da2df28ad21
Reviewed-on: https://go-review.googlesource.com/c/go/+/354329
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
src/cmd/compile/internal/types2/decl.go
src/cmd/compile/internal/types2/testdata/fixedbugs/issue41124.go2
src/cmd/compile/internal/types2/testdata/fixedbugs/issue48819.src [new file with mode: 0644]
src/cmd/compile/internal/types2/typeset.go