Initial commit
Test (in pplus-core) / in-core (push) Failing after 28m44s

This commit is contained in:
alexm committed 2026-11-12 22:23:48 -05:00
commit 568474d52f
1591 files changed
+528213

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)