summaryrefslogtreecommitdiff
path: root/package.c
diff options
context:
space:
mode:
Diffstat (limited to 'package.c')
-rw-r--r--package.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/package.c b/package.c
index 8c8ee77..de0ab43 100644
--- a/package.c
+++ b/package.c
@@ -261,6 +261,10 @@ static bool export_val_ptr(Exporter *ex, void *val, Type *type, Location where)
if (!export_fn_ptr(ex, *(FnExpr **)val, where))
return false;
break;
+ case TYPE_PKG: {
+ Package *pkg = *(Package **)val;
+ export_ident(ex, pkg->name);
+ } break;
case TYPE_UNKNOWN:
case TYPE_EXPR:
assert(0);
@@ -406,8 +410,7 @@ static bool export_expr(Exporter *ex, Expression *e) {
return false;
} break;
case EXPR_PKG:
- if (!export_expr(ex, e->pkg.name))
- return false;
+ export_ident(ex, e->pkg.name_ident);
break;
case EXPR_SLICE: {
SliceExpr *s = &e->slice;