mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00: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:
parent
13f02018af
commit
493eb6e6ec
1 changed files with 4 additions and 1 deletions
|
|
@ -79,7 +79,10 @@ func (g *irgen) obj(obj types2.Object) *ir.Name {
|
||||||
}
|
}
|
||||||
typ = g.typ(sig)
|
typ = g.typ(sig)
|
||||||
} else {
|
} 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)
|
typ = g.signature(g.param(recv), sig)
|
||||||
}
|
}
|
||||||
name = g.objCommon(pos, ir.ONAME, sym, ir.PFUNC, typ)
|
name = g.objCommon(pos, ir.ONAME, sym, ir.PFUNC, typ)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue