fixed infinite loop bug with multiple declarations
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Tue, 12 Jan 2021 21:31:25 +0000 (15:31 -0600)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Tue, 12 Jan 2021 21:31:25 +0000 (15:31 -0600)
bin/onyx
onyx.exe
src/onyxparser.c

index fa138759c5940329f7bec9dcf00e2b74cd7f1cc2..edc6920523395906a88a6fd93e86c4f5a8968cd6 100755 (executable)
Binary files a/bin/onyx and b/bin/onyx differ
index 4613b4b08fc53e8493676c1537d264caab6e9033..9f716f7f34115eea1845752bafce3da4b29d8de1 100644 (file)
Binary files a/onyx.exe and b/onyx.exe differ
index 5d309d9861fb5bbc038c48157de98eeef76abbee..6703c88fc97dcfdb40c6fabbf5a5feedf114a359 100644 (file)
@@ -1077,8 +1077,9 @@ static i32 parse_possible_compound_symbol_declaration(OnyxParser* parser, AstNod
 
     } else {
         AstType* type_for_all = parse_type(parser);
-        bh_arr_each(AstTyped *, local, local_compound->exprs)
-            (*local)->type_node = type_for_all;
+        forll (AstLocal, local, first_local, next) {
+            local->type_node = type_for_all;
+        }
     }
 
     *ret = (AstNode *) first_local;