summaryrefslogtreecommitdiff
path: root/parse/specialize.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2019-04-12 22:48:43 -0700
committerOri Bernstein <ori@eigenstate.org>2019-04-12 22:48:43 -0700
commit537313ee9a2179cc6e869c6e8c70da4af1f07f28 (patch)
tree6cc091ad8c73b5e71755c6f4977de8d0e1d98fd1 /parse/specialize.c
parent6940a02fd47d73ba5dd0ad3a82b1945b639a23dc (diff)
downloadmc-537313ee9a2179cc6e869c6e8c70da4af1f07f28.tar.gz
Rename traits correctly.
Diffstat (limited to 'parse/specialize.c')
-rw-r--r--parse/specialize.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/parse/specialize.c b/parse/specialize.c
index 9cec3c3..77cb872 100644
--- a/parse/specialize.c
+++ b/parse/specialize.c
@@ -566,10 +566,8 @@ specializedcl(Node *gnode, Type *param, Type *to, Node **name)
if (debugopt['S'])
printf("specializing [%d]%s => %s\n", g->loc.line,
namestr(g->decl.name), namestr(n));
- /* namespaced names need to be looked up in their correct
- * context. */
- if (n->name.ns)
- pushstab(st);
+ /* namespaced names need to be looked up in context. */
+ pushstab(st);
/* specialize */
tsmap = mksubst();
@@ -585,9 +583,8 @@ specializedcl(Node *gnode, Type *param, Type *to, Node **name)
fixup(d);
lappend(&file.stmts, &file.nstmts, d);
- if (d->decl.name->name.ns)
- popstab();
substfree(tsmap);
+ popstab();
return d;
}