Commit e9453e05 authored by Russ Cox's avatar Russ Cox

cmd/gc: do not report fields when looking for methods

Fixes #6395.

R=ken2
CC=golang-dev
https://golang.org/cl/13470046
parent 70138a21
...@@ -2183,7 +2183,7 @@ lookdot0(Sym *s, Type *t, Type **save, int ignorecase) ...@@ -2183,7 +2183,7 @@ lookdot0(Sym *s, Type *t, Type **save, int ignorecase)
c = 0; c = 0;
if(u->etype == TSTRUCT || u->etype == TINTER) { if(u->etype == TSTRUCT || u->etype == TINTER) {
for(f=u->type; f!=T; f=f->down) 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) if(save)
*save = f; *save = f;
c++; c++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment