9 lines
236 B
Mojo
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)
|