another type_info bugfix
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Tue, 20 Jul 2021 03:38:27 +0000 (22:38 -0500)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Tue, 20 Jul 2021 03:38:27 +0000 (22:38 -0500)
bin/onyx
src/onyxtypes.c

index 320e82c9f9b8beb07f9924139a19e387012f63b4..b6eb58371979bdecd531b92fcde666f498fa5086 100755 (executable)
Binary files a/bin/onyx and b/bin/onyx differ
index 94bd3568da7925d1de17c99d17e6ad347d3df9a9..edd1c6095cff9eae4f73b5955c6a00e81903b767 100644 (file)
@@ -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;