runtime mutable global state

This commit is contained in:
2026-07-03 21:48:23 +02:00
parent adf142736c
commit ee41a54e41
11 changed files with 569 additions and 40 deletions
+3 -3
View File
@@ -31,12 +31,12 @@ main func() i32 {
}
}
# The body-local k shadows only inside the body. The update still targets
# Body-local storage stays scoped to the body. The update still targets
# the mutable k declared before the loop.
k u32 = 0
while k < 4 : k = k + 1 {
k u32 = 100
if k == 100 {
body_k u32 = 100
if body_k == 100 {
total = total + 2
}
}