]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.16] cmd/link: handle types as converted to interface when dynlink
authorCherry Zhang <cherryyz@google.com>
Fri, 26 Feb 2021 01:01:53 +0000 (20:01 -0500)
committerDmitri Shuralyov <dmitshur@golang.org>
Mon, 1 Mar 2021 22:31:33 +0000 (22:31 +0000)
commita9547ad8adc72d245dac4408eaaef33aa331478a
tree03d99781b4ae89cf02c912a3ac2a65de7ac940fc
parent292abd96ae8a9f857cc606a870c576a69b3e624e
[release-branch.go1.16] cmd/link: handle types as converted to interface when dynlink

When using plugins, a type (whose value) may be pass to a plugin
and get converted to interface there, or vice versa. We need to
treat the type as potentially converted to interface, and retain
its methods.

Updates #44586.
Fixes #44638.

Change-Id: I80dd35e68baedaa852a317543ccd78d94628d13b
Reviewed-on: https://go-review.googlesource.com/c/go/+/296709
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
(cherry picked from commit a655208c9ecd2fee4de6deff35a863b1c28a091c)
Reviewed-on: https://go-review.googlesource.com/c/go/+/296910
misc/cgo/testplugin/plugin_test.go
misc/cgo/testplugin/testdata/method2/main.go [new file with mode: 0644]
misc/cgo/testplugin/testdata/method2/p/p.go [new file with mode: 0644]
misc/cgo/testplugin/testdata/method2/plugin.go [new file with mode: 0644]
src/cmd/link/internal/ld/deadcode.go