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)
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++;
......
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