mirror of https://github.com/golang/go.git
cmd/gc: do not report fields when looking for methods
Fixes #6395. R=ken2 CC=golang-dev https://golang.org/cl/13470046
This commit is contained in:
parent
70138a2108
commit
e9453e0545
|
|
@ -2183,7 +2183,7 @@ lookdot0(Sym *s, Type *t, Type **save, int ignorecase)
|
|||
c = 0;
|
||||
if(u->etype == TSTRUCT || u->etype == TINTER) {
|
||||
for(f=u->type; f!=T; f=f->down)
|
||||
if(f->sym == s || (ignorecase && ucistrcmp(f->sym->name, s->name) == 0)) {
|
||||
if(f->sym == s || (ignorecase && f->type->etype == TFUNC && f->type->thistuple > 0 && ucistrcmp(f->sym->name, s->name) == 0)) {
|
||||
if(save)
|
||||
*save = f;
|
||||
c++;
|
||||
|
|
|
|||
Loading…
Reference in New Issue