summaryrefslogtreecommitdiff
path: root/types.c
diff options
context:
space:
mode:
Diffstat (limited to 'types.c')
-rw-r--r--types.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/types.c b/types.c
index 9bde9e1..075c8de 100644
--- a/types.c
+++ b/types.c
@@ -2022,9 +2022,11 @@ static bool types_decl(Typer *tr, Declaration *d) {
/* pretend we found the type even if we didn't to prevent too many errors */
d->flags |= DECL_FOUND_TYPE;
if (success) {
- /* export it! */
- if (!export_decl(tr->exptr, d))
- success = false;
+ if (d->flags & DECL_EXPORT) {
+ /* export it! */
+ if (!export_decl(tr->exptr, d))
+ success = false;
+ }
} else {
/* use unknown type if we didn't get the type */
d->type.flags = TYPE_IS_RESOLVED;