Commit 06869eed authored by Russ Cox's avatar Russ Cox

disallow other package's names in struct field dot.

R=ken
OCL=22996
CL=22996
parent 03c40f51
......@@ -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 '$' '$'
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment