commit 7d1f4cf5f3b34969dda64eeec345c1f21e58967b
parent 56359312644f76941de1878d33a1a0b840be8056
Author: Johann Freymuth <mail@jfreymuth.de>
Date: Wed, 17 Aug 2022 14:29:29 +0200
Fix exporting enum error type
Fixes: https://todo.sr.ht/~sircmpwn/hare/741
Signed-off-by: Johann Freymuth <mail@jfreymuth.de>
Diffstat:
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/type_store.c b/src/type_store.c
@@ -678,6 +678,7 @@ type_init_from_atype(struct type_store *store,
identifier_dup(&type->alias.ident, &obj->ident);
identifier_dup(&type->alias.name, &obj->name);
type->alias.type = obj->type->alias.type;
+ type->alias.exported = obj->type->alias.exported;
type->size = obj->type->size;
type->align = obj->type->align;
break;
diff --git a/testmod/testmod.ha b/testmod/testmod.ha
@@ -14,6 +14,7 @@ export type char_enum = enum char {
};
export type enum_alias = _enum;
+export type error_enum = !_enum;
export def val: int = 42;
export def val2: int = 90;