From 40c0933619b9fb6f1cc3f9422edf9e4b5094af11 Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Tue, 4 Oct 2022 19:20:34 -0500 Subject: [PATCH] forgot to make "#auto" work with compound declarations --- compiler/src/parser.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/compiler/src/parser.c b/compiler/src/parser.c index 8c878f61..4d1ed888 100644 --- a/compiler/src/parser.c +++ b/compiler/src/parser.c @@ -1299,7 +1299,13 @@ static i32 parse_possible_compound_symbol_declaration(OnyxParser* parser, AstNod prev_local->next = (AstNode *) assignment; } else { - AstType* type_for_all = parse_type(parser); + AstType* type_for_all = NULL; + + // See comment in parse_possible_symbol_declaration about "#auto" + if (!parse_possible_directive(parser, "auto")) { + type_for_all = parse_type(parser); + } + forll (AstLocal, local, first_local, next) { local->type_node = type_for_all; } -- 2.25.1