From: Brendan Hansen Date: Tue, 20 Jul 2021 03:38:27 +0000 (-0500) Subject: another type_info bugfix X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=16d921ecdcd688961e427e6ceb4182c4d6d41b6c;p=onyx.git another type_info bugfix --- diff --git a/bin/onyx b/bin/onyx index 320e82c9..b6eb5837 100755 Binary files a/bin/onyx and b/bin/onyx differ diff --git a/src/onyxtypes.c b/src/onyxtypes.c index 94bd3568..edd1c609 100644 --- a/src/onyxtypes.c +++ b/src/onyxtypes.c @@ -468,8 +468,11 @@ Type* type_build_from_ast(bh_allocator alloc, AstType* type_node) { return ((AstBasicType *) type_node)->basic_type; } - case Ast_Kind_Type_Alias: - return type_build_from_ast(alloc, ((AstTypeAlias *) type_node)->to); + case Ast_Kind_Type_Alias: { + Type* type = type_build_from_ast(alloc, ((AstTypeAlias *) type_node)->to); + if (type && type->ast_type) type_node->type_id = type->id; + return type; + } case Ast_Kind_Type_Raw_Alias: return ((AstTypeRawAlias *) type_node)->to;