]> Cypherpunks repositories - gostls13.git/commit
go/internal/gcimporter: call Complete on cloned Interfaces too
authorMatthew Dempsky <mdempsky@google.com>
Wed, 24 Aug 2022 20:47:48 +0000 (13:47 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Wed, 24 Aug 2022 21:09:24 +0000 (21:09 +0000)
commite4bed415ead32ece0acb396f025d3338fab5029d
treeef2cc65f91ec429eab7635d2a43bb4faaf7cbf6e
parentbdf2db7255565db3d7ca1ffb721203e6d9460ccc
go/internal/gcimporter: call Complete on cloned Interfaces too

For "type T interface{ M() }", go/types users expect T's underlying
interface type to specify T as the receiver parameter type (#49906).
The unified importer handles this by cloning the interface to rewrite
the receiver parameters before calling SetUnderlying.

I missed in CL 425360 that these interfaces would need to have
Complete called too.

Manually tested to confirm that this actually fixes "go test -race
golang.org/x/tools/go/analysis/internal/checker" now (when both CLs
are ported to the x/tools importer).

Updates #54653.

Change-Id: I51e6db925db56947cd39dbe880230f14734ca01c
Reviewed-on: https://go-review.googlesource.com/c/go/+/425365
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
src/go/internal/gcimporter/ureader.go