mirror of
https://github.com/golang/go.git
synced 2024-09-30 06:47:04 +00:00
disallow other package's names in struct field dot.
R=ken OCL=22996 CL=22996
This commit is contained in:
parent
03c40f5122
commit
06869eedf9
@ -512,6 +512,8 @@ loop:
|
||||
f->nname = n->left;
|
||||
f->embedded = n->embedded;
|
||||
f->sym = f->nname->sym;
|
||||
if(pkgimportname != S && !exportname(f->sym->name))
|
||||
f->sym = pkglookup(f->sym->name, pkgimportname->name);
|
||||
}
|
||||
|
||||
*t = f;
|
||||
|
@ -741,6 +741,7 @@ void constiter(Node*, Type*, Node*);
|
||||
*/
|
||||
void renamepkg(Node*);
|
||||
void autoexport(Sym*);
|
||||
int exportname(char*);
|
||||
void exportsym(Sym*);
|
||||
void packagesym(Sym*);
|
||||
void dumpe(Sym*);
|
||||
|
@ -160,6 +160,7 @@ import_there:
|
||||
{
|
||||
checkimports();
|
||||
unimportfile();
|
||||
pkgimportname = S;
|
||||
}
|
||||
| LIMPORT '$' '$' hidden_import_list '$' '$'
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user