Change information
Commit message:
go/types, types2: set underlying for imported types
Importing generic methods with recursive bounds can currently deadlock.
This is because SetConstraint, which is called from a delayed function,
requires the underlying type. We already have this information handy,
so the fix is somewhat simple.
Credit goes to Lauro Santana for reporting this issue and contributing
a test case (attached here).
Fixes #80258
Change-Id: I06ec71edbbd113743273f7c4be15b142e2f6938c
Files:
- M src/cmd/compile/internal/types2/named.go
- A src/cmd/compile/testdata/script/issue80258.txt
- M src/go/types/named.go
Change size: M
Delta: 3 files changed, 45 insertions(+), 8 deletions(-)
Branch: refs/heads/master