]> Cypherpunks.ru repositories - gostls13.git/commit
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)
committerCherry Zhang <cherryyz@google.com>
Fri, 26 Feb 2021 16:27:08 +0000 (16:27 +0000)
commita655208c9ecd2fee4de6deff35a863b1c28a091c
tree3a175147b63495465a363aebd68a2b7d71d2fb67
parent23943a67378040340d835734a55dee7cb639e586
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.

Should fix #44586.

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>
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