mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.typealias] cmd/compile: export/import test cases for type aliases
Plus a few minor changes. For #18130. Change-Id: Ica6503fe9c888cc05c15b46178423f620c087491 Reviewed-on: https://go-review.googlesource.com/35233 Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
parent
d7cabd40dd
commit
5802cfd900
6 changed files with 112 additions and 8 deletions
|
|
@ -1163,14 +1163,14 @@ bad:
|
|||
return nil
|
||||
}
|
||||
|
||||
func methodname(n *Node, t *Node) *Node {
|
||||
func methodname(n, recv *Node) *Node {
|
||||
star := false
|
||||
if t.Op == OIND {
|
||||
if recv.Op == OIND {
|
||||
star = true
|
||||
t = t.Left
|
||||
recv = recv.Left
|
||||
}
|
||||
|
||||
return methodname0(n.Sym, star, t.Sym)
|
||||
return methodname0(n.Sym, star, recv.Sym)
|
||||
}
|
||||
|
||||
func methodname0(s *Sym, star bool, tsym *Sym) *Node {
|
||||
|
|
@ -1198,7 +1198,6 @@ func methodname0(s *Sym, star bool, tsym *Sym) *Node {
|
|||
// - msym is the method symbol
|
||||
// - t is function type (with receiver)
|
||||
func addmethod(msym *Sym, t *Type, local, nointerface bool) {
|
||||
// get field sym
|
||||
if msym == nil {
|
||||
Fatalf("no method symbol")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue