From 89cc611f7a2ccf02d47c7d3a7af5b82153d9405a Mon Sep 17 00:00:00 2001 From: Jakub Doka Date: Fri, 18 Oct 2024 16:57:00 +0200 Subject: [PATCH] good direction --- lang/src/son.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lang/src/son.rs b/lang/src/son.rs index 9544868..bf5bf98 100644 --- a/lang/src/son.rs +++ b/lang/src/son.rs @@ -1507,8 +1507,9 @@ impl Codegen { } if bres.store != scope.store { - let (to_store, from_store) = (bres.store.unwrap(), scope.store.unwrap()); - self.ci.nodes.unlock(to_store); + let (to_store, from_store, prev) = + (bres.store.unwrap(), scope.store.unwrap(), self.ci.scope.store.unwrap()); + self.ci.nodes.unlock_remove(prev); self.ci.scope.store = Some( self.ci .nodes