1
0
mirror of https://github.com/golang/go synced 2024-11-26 05:07:59 -07:00

[dev.typeparams] cmd/compile: fix -G=3 handling of blank methods

Fixes "GO_GCFLAGS=-G=3 go run run.go -- blank.go interface/fail.go".

Change-Id: I669ab06ae29366ce96e2948c89a5c1620afd53db
Reviewed-on: https://go-review.googlesource.com/c/go/+/286214
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Matthew Dempsky <mdempsky@google.com>
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
This commit is contained in:
Matthew Dempsky 2021-01-24 23:31:25 -08:00
parent 13f02018af
commit 493eb6e6ec

View File

@ -79,7 +79,10 @@ func (g *irgen) obj(obj types2.Object) *ir.Name {
}
typ = g.typ(sig)
} else {
sym = ir.MethodSym(g.typ(recv.Type()), g.selector(obj))
sym = g.selector(obj)
if !sym.IsBlank() {
sym = ir.MethodSym(g.typ(recv.Type()), sym)
}
typ = g.signature(g.param(recv), sig)
}
name = g.objCommon(pos, ir.ONAME, sym, ir.PFUNC, typ)