harec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 3a9b10d508f212213c13d1e6aedd78a2c2488029
parent c8afc8da0a547f26eb954818faae78a27309e7f6
Author: Drew DeVault <sir@cmpwn.com>
Date:   Mon,  1 Feb 2021 19:13:43 -0500

Fix unwrapping of types in namespace

Diffstat:
Msrc/scope.c | 3++-
Msrc/type_store.c | 1+
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/scope.c b/src/scope.c @@ -86,7 +86,8 @@ scope_lookup(struct scope *scope, const struct identifier *ident) { struct scope_object *o = scope->objects; while (o) { - if (identifier_eq(&o->name, ident)) { + if (identifier_eq(&o->ident, ident) + || identifier_eq(&o->name, ident)) { return o; } o = o->next; diff --git a/src/type_store.c b/src/type_store.c @@ -373,6 +373,7 @@ type_init_from_atype(struct type_store *store, obj = scope_lookup(store->check_context->scope, ident); if (!obj) { + assert(!atype->unwrap); identifier_dup(&type->alias.ident, ident); type->alias.type = NULL; type->size = SIZE_UNDEFINED;