From a8c0bcc2c9c65bd38838c8bf4d868bf70bfae463 Mon Sep 17 00:00:00 2001 From: Yi Sun Date: Mon, 6 Jan 2025 18:16:42 -0500 Subject: [PATCH] fix: make val in loop scope --- extensions/native/compiler/src/ir/builder.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/native/compiler/src/ir/builder.rs b/extensions/native/compiler/src/ir/builder.rs index e69dd0cc7..17dcb644d 100644 --- a/extensions/native/compiler/src/ir/builder.rs +++ b/extensions/native/compiler/src/ir/builder.rs @@ -940,7 +940,7 @@ impl<'a, C: Config, V: MemVariable> IteratorBuilder<'a, C, V> { let loop_variable: Var = self.builder.uninit(); let mut loop_body_builder = self.builder.create_sub_builder(); - let val: V = self.builder.uninit(); + let val: V = loop_body_builder.uninit(); loop_body_builder.load( val.clone(), Ptr {