From 03103e4fa10100a2a1d7146a79185e48078da095 Mon Sep 17 00:00:00 2001 From: Jeff Date: Mon, 3 Feb 2025 18:11:45 -0500 Subject: [PATCH] Find a solution for the removal of the SetLocal instruction --- dust-lang/src/compiler/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dust-lang/src/compiler/mod.rs b/dust-lang/src/compiler/mod.rs index 371380b..e1a3c11 100644 --- a/dust-lang/src/compiler/mod.rs +++ b/dust-lang/src/compiler/mod.rs @@ -1608,6 +1608,9 @@ impl<'src> Compiler<'src> { self.current_scope, ); + // The last instruction is now an assignment, so it should not yield a value + self.instructions.last_mut().unwrap().1 = Type::None; + Ok(()) }