1
0
mirror of https://github.com/golang/go synced 2024-11-25 07:17:56 -07:00

disallow other package's names in method calls

R=ken
OCL=22999
CL=22999
This commit is contained in:
Russ Cox 2009-01-16 15:35:07 -08:00
parent 626d25065d
commit aec4d3194a

View File

@ -290,6 +290,9 @@ addmethod(Node *n, Type *t, int local)
pa = f;
if(pkgimportname != S && !exportname(sf->name))
sf = pkglookup(sf->name, pkgimportname->name);
n = nod(ODCLFIELD, newname(sf), N);
n->type = t;