11 lines
221 B
Mojo
11 lines
221 B
Mojo
# probe: can a variable with no value yet be passed to a mut parameter? (no: "use of uninitialized value")
|
|
# expect: compile-error
|
|
def set_it(mut x: Int):
|
|
x = 5
|
|
|
|
|
|
def main():
|
|
var x: Int
|
|
set_it(x)
|
|
print(x)
|