summaryrefslogtreecommitdiff
path: root/parse/use.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2017-11-03 10:49:27 -0700
committerOri Bernstein <ori@markovcorp.com>2017-11-14 13:50:39 -0800
commit2d00e8f657965583e906327bd4c0eff6953a71cd (patch)
tree18620db7cb82b25881675cbd1966f095399328b2 /parse/use.c
parent5d40b4ead1f20776f23bed271412af829bbe0e96 (diff)
downloadmc-2d00e8f657965583e906327bd4c0eff6953a71cd.tar.gz
Rename comparable => equatable
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);