From 513e4eb133fef637fdfef20145c35efb9b9ea4ab Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Thu, 26 Dec 2024 16:56:53 -0300 Subject: [PATCH] refix --- vlib/v/gen/c/autofree.v | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vlib/v/gen/c/autofree.v b/vlib/v/gen/c/autofree.v index bc5bbf1066d9a0..a7cd83891fffb3 100644 --- a/vlib/v/gen/c/autofree.v +++ b/vlib/v/gen/c/autofree.v @@ -95,6 +95,9 @@ fn (mut g Gen) autofree_scope_vars2(scope &ast.Scope, start_pos int, end_pos int // Do not free vars that were declared after this scope continue } + if obj.expr is ast.IfGuardExpr { + continue + } g.autofree_variable(obj) } else {}