From: Brendan Hansen Date: Sat, 10 Sep 2022 23:42:13 +0000 (-0500) Subject: bugfix with do block symbol resolution X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=2138aa4c0224ad2dff1dae7bad3a8c740f50d737;p=onyx.git bugfix with do block symbol resolution --- diff --git a/compiler/src/symres.c b/compiler/src/symres.c index 6877718d..b5044fac 100644 --- a/compiler/src/symres.c +++ b/compiler/src/symres.c @@ -608,9 +608,12 @@ static SymresStatus symres_expression(AstTyped** expr) { SYMRES(directive_insert, (AstDirectiveInsert *) *expr); break; - case Ast_Kind_Do_Block: + case Ast_Kind_Do_Block: { + Scope* old_curr_scope = curr_scope; SYMRES(block, ((AstDoBlock *) *expr)->block); + curr_scope = old_curr_scope; break; + } case Ast_Kind_Param: if ((*expr)->flags & Ast_Flag_Param_Symbol_Dirty) {