]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.typeparams] cmd/compile/internal/types2: avoid endless recursion in Comparable...
authorRobert Griesemer <gri@golang.org>
Wed, 9 Dec 2020 00:58:00 +0000 (16:58 -0800)
committerRobert Griesemer <gri@golang.org>
Wed, 9 Dec 2020 16:56:16 +0000 (16:56 +0000)
commitc32566c336519f378c07575b0149507a261032e9
tree76d08c3212c7477c1ebe53a5f26464c84d9225eb
parent6015c4e543bcf07c01a4221ecf7692162653fa24
[dev.typeparams] cmd/compile/internal/types2: avoid endless recursion in Comparable predicate

Use a map to detect recursive types.
With this we can now typecheck fixedbugs/issue8501.go.

Updates #43088.

Change-Id: I7fad6ccf6c94268473ff72b09a3158e13a7f4cc3
Reviewed-on: https://go-review.googlesource.com/c/go/+/276374
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
src/cmd/compile/internal/types2/issues_test.go
src/cmd/compile/internal/types2/predicates.go
test/fixedbugs/issue8507.go
test/run.go