aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDave Cheney <dave@cheney.net>2017-08-10 01:28:10 +0000
committerDave Cheney <dave@cheney.net>2017-08-10 01:35:28 +0000
commitf612cd704a260cf362e5b6307b7ace4eb83f5f56 (patch)
tree2e22020597569fd38be787a7e971054768dd4b24 /src
parent6362fead876daa44ca7b9696da72a3d4db888ad0 (diff)
downloadgo-f612cd704a260cf362e5b6307b7ace4eb83f5f56.tar.xz
Revert "cmd/compile: discard duplicate inline method bodies"
This reverts commit f0b36269041eff3b8bbdd18e2ff41b06557235d1. Reason for revert: this change caused the runtime tests on all linux/amd64 and linux/386 builders to timeout Change-Id: Idf8cfdfc84540e21e8da403e74df5596a1d9327b Reviewed-on: https://go-review.googlesource.com/54490 Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/cmd/compile/internal/gc/bimport.go14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/cmd/compile/internal/gc/bimport.go b/src/cmd/compile/internal/gc/bimport.go
index ba542b4719..866b9a7525 100644
--- a/src/cmd/compile/internal/gc/bimport.go
+++ b/src/cmd/compile/internal/gc/bimport.go
@@ -484,7 +484,6 @@ func (p *importer) typ() *types.Type {
t = pkgtype(p.imp, tsym)
p.typList = append(p.typList, t)
- dup := !t.IsKind(types.TFORW) // type already imported
// read underlying type
t0 := p.typ()
@@ -515,19 +514,10 @@ func (p *importer) typ() *types.Type {
result := p.paramList()
nointerface := p.bool()
- mt := functypefield(recv[0], params, result)
- addmethod(sym, mt, false, nointerface)
-
- if dup {
- // An earlier import already declared this type and its methods.
- // Discard the duplicate method declaration.
- p.funcList = append(p.funcList, nil)
- continue
- }
-
n := newfuncname(methodname(sym, recv[0].Type))
- n.Type = mt
+ n.Type = functypefield(recv[0], params, result)
checkwidth(n.Type)
+ addmethod(sym, n.Type, false, nointerface)
p.funcList = append(p.funcList, n)
importlist = append(importlist, n)