mutable decl syntax change
This commit is contained in:
@@ -23,7 +23,7 @@ noisy func() bool {
|
||||
}
|
||||
|
||||
main func() i32 {
|
||||
total i32 = 0
|
||||
total i32 := 0
|
||||
|
||||
# comparisons drive if / else if / else
|
||||
total = total + classify(-5) # 1
|
||||
@@ -45,9 +45,9 @@ main func() i32 {
|
||||
}
|
||||
|
||||
# block scoping: inner bindings do not escape the block
|
||||
x i32 = 1
|
||||
x i32 := 1
|
||||
if x == 1 {
|
||||
inner_x i32 = 100
|
||||
inner_x i32 := 100
|
||||
if inner_x == 100 {
|
||||
total = total + 5 # 40
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user