Files
pplus-library/mojo/probes/var-maybe-unset.mojo
T
alexm 568474d52f
Test (in pplus-core) / in-core (push) Failing after 28m44s
Initial commit
2026-11-12 22:23:48 -05:00

9 lines
236 B
Mojo

# probe: can a variable be read after an if that gives it a value on one path only? (no, even when the path is taken at run time)
# expect: compile-error
def main():
var n = 3
var w: Int
if n > 1:
w = 1
print(w)