Baseline: tree as shared
This commit is contained in:
commit
659c03bbf8
1471 files changed
+990535
No files matched your search
@@ -0,0 +1,20 @@
|
||||
# probe: var shadowing inside if and loop blocks
|
||||
# status: the expected output is Programming+'s interpreter's prediction; corpus.py verify confirms or refutes it on godbolt
|
||||
# expect-stdout: inner 11
|
||||
# expect-stdout: outer 1
|
||||
# expect-stdout: loop 0
|
||||
# expect-stdout: loop 100
|
||||
# expect-stdout: loop 200
|
||||
# expect-stdout: total 0
|
||||
def main():
|
||||
var x = 1
|
||||
if x == 1:
|
||||
var x = 10
|
||||
x += 1
|
||||
print("inner", x)
|
||||
print("outer", x)
|
||||
var total = 0
|
||||
for i in range(3):
|
||||
var total = i * 100
|
||||
print("loop", total)
|
||||
print("total", total)
|
||||
Reference in new issue
Block a user