From: Brendan Hansen Date: Tue, 12 Jan 2021 21:31:25 +0000 (-0600) Subject: fixed infinite loop bug with multiple declarations X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=eef2249f6dc05a73f94e4c81d9f3e6a72a188964;p=onyx.git fixed infinite loop bug with multiple declarations --- diff --git a/bin/onyx b/bin/onyx index fa138759..edc69205 100755 Binary files a/bin/onyx and b/bin/onyx differ diff --git a/onyx.exe b/onyx.exe index 4613b4b0..9f716f7f 100644 Binary files a/onyx.exe and b/onyx.exe differ diff --git a/src/onyxparser.c b/src/onyxparser.c index 5d309d98..6703c88f 100644 --- a/src/onyxparser.c +++ b/src/onyxparser.c @@ -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;