mirror of
https://github.com/golang/go.git
synced 2024-09-29 06:17:11 +00:00
disallow other package's names in method calls
R=ken OCL=22999 CL=22999
This commit is contained in:
parent
626d25065d
commit
aec4d3194a
@ -290,6 +290,9 @@ addmethod(Node *n, Type *t, int local)
|
|||||||
|
|
||||||
pa = f;
|
pa = f;
|
||||||
|
|
||||||
|
if(pkgimportname != S && !exportname(sf->name))
|
||||||
|
sf = pkglookup(sf->name, pkgimportname->name);
|
||||||
|
|
||||||
n = nod(ODCLFIELD, newname(sf), N);
|
n = nod(ODCLFIELD, newname(sf), N);
|
||||||
n->type = t;
|
n->type = t;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user