]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: catch pointless recursion on function types
authorDavid Chase <drchase@google.com>
Mon, 16 May 2022 21:50:31 +0000 (17:50 -0400)
committerDavid Chase <drchase@google.com>
Tue, 24 May 2022 20:35:40 +0000 (20:35 +0000)
commitccf84a97501b1cc894536162479279df1e165fc5
tree114a4c22b0ee0950aead462d0a4b4bcf9801d95a
parent0a30cf9536f06d52a214370e9eeb03f8bcfc1e6a
cmd/compile: catch pointless recursion on function types

If a function type has no type parameters, note when it
is visited and do not recur.  (It must be visited
at least once because of closures and their associated
types occurring in a generic context).

Fixes #51832.

Change-Id: Iee20612ffd0a03b838b9e59615f4a0206fc8940b
Reviewed-on: https://go-review.googlesource.com/c/go/+/406714
Reviewed-by: Keith Randall <khr@google.com>
src/cmd/compile/internal/typecheck/subr.go
test/typeparam/issue51832.go [new file with mode: 0644]