[go] go/types, types2: set underlying for imported types

0 views
Skip to first unread message

Mark Freeman (Gerrit)

unread,
4:33 PM (2 hours ago) 4:33 PM
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Alan Donovan, Robert Griesemer, golang...@luci-project-accounts.iam.gserviceaccount.com, golang-co...@googlegroups.com

Mark Freeman submitted the change

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
Reviewed-by: Alan Donovan <adon...@google.com>
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
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I06ec71edbbd113743273f7c4be15b142e2f6938c
Gerrit-Change-Number: 797640
Gerrit-PatchSet: 2
Gerrit-Owner: Mark Freeman <markf...@google.com>
Gerrit-Reviewer: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Mark Freeman <markf...@google.com>
Gerrit-Reviewer: Robert Griesemer <g...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages