From: Russ Cox Date: Fri, 16 Jan 2009 23:35:07 +0000 (-0800) Subject: disallow other package's names in method calls X-Git-Tag: weekly.2009-11-06~2333 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=aec4d3194afaf29de1c30a7bf0528dec0a344879;p=gostls13.git disallow other package's names in method calls R=ken OCL=22999 CL=22999 --- diff --git a/src/cmd/gc/dcl.c b/src/cmd/gc/dcl.c index d5ca7c4d73..e9e8f51aba 100644 --- a/src/cmd/gc/dcl.c +++ b/src/cmd/gc/dcl.c @@ -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;