]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: permit type cycles through type parameter lists
authorRobert Griesemer <gri@google.com>
Mon, 13 Oct 2025 19:47:42 +0000 (12:47 -0700)
committerRobert Griesemer <gri@google.com>
Mon, 13 Oct 2025 21:27:13 +0000 (14:27 -0700)
commit1abc6b0204ed231311c9bbc53cfab36dc546aa8e
tree20ede7baafe3ffff8bbf004e85499ab2d4d98bf6
parent9fdd6904da3d6ef2ed457fada1fb26130213f359
go/types, types2: permit type cycles through type parameter lists

Issue #49439 was about a deadlock during type inference inside
a type parameter list of a recursive constraint. As a remedy
we disallowed recursive type parameter lists.

In the meantime we have removed support for type inference for
type arguments to generic types; the Go 1.18 generic release
didn't support it.

As a consequence, the fix for #49439, CL 361922, is probably
not needed anymore: cycles through type parameter lists are ok.

Fixes #68162.
For #49439.

Change-Id: Ie9deb3274914d428e8e45071cee5e68abf8afe9c
Reviewed-on: https://go-review.googlesource.com/c/go/+/711420
Commit-Queue: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Mark Freeman <markfreeman@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
14 files changed:
src/cmd/compile/internal/types2/decl.go
src/go/types/decl.go
src/internal/types/testdata/fixedbugs/issue45550.go
src/internal/types/testdata/fixedbugs/issue46461.go
src/internal/types/testdata/fixedbugs/issue46461a.go
src/internal/types/testdata/fixedbugs/issue47796.go
src/internal/types/testdata/fixedbugs/issue48529.go
src/internal/types/testdata/fixedbugs/issue49439.go
src/internal/types/testdata/fixedbugs/issue68162.go [new file with mode: 0644]
test/typeparam/issue46461.go
test/typeparam/issue46461b.dir/a.go
test/typeparam/issue46461b.dir/b.go
test/typeparam/issue48280.dir/a.go
test/typeparam/issue48306.dir/a.go