summaryrefslogtreecommitdiff
path: root/parse/stab.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse/stab.c')
-rw-r--r--parse/stab.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/parse/stab.c b/parse/stab.c
index 023e9f7..49fc776 100644
--- a/parse/stab.c
+++ b/parse/stab.c
@@ -581,6 +581,9 @@ putimpl(Stab *st, Node *n)
fatal(n, "trait %s already implemented over %s at %s:%d",
namestr(n->impl.traitname), tystr(n->impl.type),
fname(n->loc), lnum(n->loc));
+ /* if this is not a duplicate, record it for later export */
+ if (!impl)
+ lappend(&file->file.impl, &file->file.nimpl, n);
/*
The impl is not defined in this file, so setting the
trait name would be a bug here.