summaryrefslogtreecommitdiff
path: root/parse/use.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse/use.c')
-rw-r--r--parse/use.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/parse/use.c b/parse/use.c
index 9de82a4..7c7d48b 100644
--- a/parse/use.c
+++ b/parse/use.c
@@ -852,11 +852,16 @@ protomap(Trait *tr, Type *ty, Node *dcl)
{
size_t i, len;
char *protoname, *dclname, *p;
- Node *proto;
+ Node *proto, *n;
+ Stab *st;
dclname = declname(dcl);
for (i = 0; i < tr->nproto; i++) {
- proto = getdcl(curstab(), tr->proto[i]->decl.name);
+ n = tr->proto[i]->decl.name;
+ st = file->file.globls;
+ if (n->name.ns)
+ st = getns(n->name.ns);
+ proto = getdcl(st, n);
if (!proto)
proto = tr->proto[i];
protoname = declname(proto);