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:
parent
626d25065d
commit
aec4d3194a
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user