summaryrefslogtreecommitdiffstats
path: root/virtual-programs
diff options
context:
space:
mode:
authorOmar Rizwan <omar@omar.website>2023-01-29 22:53:35 +0000
committerOmar Rizwan <omar@omar.website>2023-01-29 22:53:35 +0000
commit75c374a07d79435f3b31078922fffc7b470cfb24 (patch)
tree6a5663570a9af4cd293ceaaacd468d9cc23f0fb3 /virtual-programs
parentClean up Do matchId handling (does this fix a bug?) (diff)
downloadfolk-75c374a07d79435f3b31078922fffc7b470cfb24.tar.gz
folk-75c374a07d79435f3b31078922fffc7b470cfb24.zip
Guard destructor bc outer/inner execution order is not defined
Diffstat (limited to 'virtual-programs')
-rw-r--r--virtual-programs/with-all.folk6
1 files changed, 5 insertions, 1 deletions
diff --git a/virtual-programs/with-all.folk b/virtual-programs/with-all.folk
index 6c58311f..da40420b 100644
--- a/virtual-programs/with-all.folk
+++ b/virtual-programs/with-all.folk
@@ -10,7 +10,11 @@ When when the collected matches for /clause/ are /matchesVar/ /body/ with enviro
foreach varName $varNames { dict set match $varName [set $varName] }
dict set ::collectedMatches $clause $match true
- On unmatch { dict unset ::collectedMatches $clause $match }
+ On unmatch {
+ if {[dict exists $::collectedMatches $clause]} {
+ dict unset ::collectedMatches $clause $match
+ }
+ }
}
When $::nodename has step count /c/ {
set matchId $::matchId