summaryrefslogtreecommitdiff
path: root/types.c
diff options
context:
space:
mode:
Diffstat (limited to 'types.c')
-rw-r--r--types.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/types.c b/types.c
index 075c8de..ffebc1d 100644
--- a/types.c
+++ b/types.c
@@ -2024,8 +2024,12 @@ static bool types_decl(Typer *tr, Declaration *d) {
if (success) {
if (d->flags & DECL_EXPORT) {
/* export it! */
- if (!export_decl(tr->exptr, d))
+ if (!tr->exptr) {
+ err_print(d->where, "Declaration marked for exporting, but no package output was specified.");
success = false;
+ } else {
+ export_decl(tr->exptr, d);
+ }
}
} else {
/* use unknown type if we didn't get the type */