]> Cypherpunks repositories - gostls13.git/commit
go/types,types2: disallow illegal cycles through Unions
authorRobert Findley <rfindley@google.com>
Thu, 23 Sep 2021 16:19:05 +0000 (12:19 -0400)
committerRobert Findley <rfindley@google.com>
Thu, 23 Sep 2021 17:04:30 +0000 (17:04 +0000)
commit13f3c57cefef59e5d94f678483aff527807fb33b
tree029d0385d78b46efc4e39a097b1bbc082832bfcf
parent5961134fa5530e8e07b5536b9577e4755ac1e04a
go/types,types2: disallow illegal cycles through Unions

Checker.validType was not considering Unions when looking for illegal
cycles.

Fixes #48582

Change-Id: I11ad0279eeaaa56bb6d5731b0572c1c3a0c459eb
Reviewed-on: https://go-review.googlesource.com/c/go/+/351829
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/compile/internal/types2/decl.go
src/cmd/compile/internal/types2/testdata/fixedbugs/issue41124.go2
src/cmd/compile/internal/types2/testdata/fixedbugs/issue48582.go2 [new file with mode: 0644]
src/go/types/decl.go
src/go/types/testdata/fixedbugs/issue41124.go2
src/go/types/testdata/fixedbugs/issue48582.go2 [new file with mode: 0644]