summaryrefslogtreecommitdiff
path: root/parse/stab.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-06-17 23:05:06 -0700
committerOri Bernstein <ori@eigenstate.org>2016-06-17 23:05:06 -0700
commit1ed355447b8aa5aa8861651d5a657691fe939218 (patch)
tree12d099d11680c05e5c80b73d93b5f0999e52a7c4 /parse/stab.c
parent3d7695c257de8ea4d4c0b8999682de0b29ee3c20 (diff)
downloadmc-1ed355447b8aa5aa8861651d5a657691fe939218.tar.gz
Allow implementing traits from other namespaces.
Diffstat (limited to 'parse/stab.c')
-rw-r--r--parse/stab.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/parse/stab.c b/parse/stab.c
index c18f1d5..d3afa54 100644
--- a/parse/stab.c
+++ b/parse/stab.c
@@ -167,6 +167,8 @@ Node *getdcl(Stab *st, Node *n)
Stab *fn;
fn = NULL;
+ if (n->name.ns)
+ st = getns(file, n->name.ns);
do {
s = htget(st->dcl, n);
if (s) {
@@ -246,6 +248,8 @@ Trait *gettrait(Stab *st, Node *n)
{
Traitdefn *c;
+ if (n->name.ns)
+ st = getns(file, n->name.ns);
do {
if ((c = htget(st->tr, n)))
return c->trait;