Baseline: tree as shared

This commit is contained in:
alexm committed 2026-10-05 03:03:38 +00:00
commit 659c03bbf8
1471 files changed
+990535

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
# probe: closures capturing mut state and var snapshots
# status: the expected output is Programming+'s interpreter's prediction; corpus.py verify confirms or refutes it on godbolt
# expect-stdout: count 4
# expect-stdout: count 9
# expect-stdout: 101 0
def main():
var count = 0
var step = 2
def tick() {mut count, imm step}:
count += step
tick()
tick()
print("count", count)
step = 5
tick()
print("count", count)
var base = 100
def from_base(x: Int) {var base} -> Int:
return base + x
base = 0
print(from_base(1), base)