no :: in func decls
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Milestone 6: compound assignment (`+=`, `-=`, `*=`, `/=`) and the binary
|
||||
# arithmetic operators `-`, `*`, `/` with multiplicative precedence.
|
||||
|
||||
check_float :: func() i32 {
|
||||
check_float func() i32 {
|
||||
x f64 = 10.0
|
||||
x /= 4.0 # 2.5
|
||||
x *= 2.0 # 5.0
|
||||
@@ -13,7 +13,7 @@ check_float :: func() i32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
check_unsigned :: func() i32 {
|
||||
check_unsigned func() i32 {
|
||||
n u32 = 100
|
||||
n /= 7 # 14 (truncating integer division)
|
||||
n -= 4 # 10
|
||||
@@ -23,7 +23,7 @@ check_unsigned :: func() i32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
main :: func() i32 {
|
||||
main func() i32 {
|
||||
total i32 = 0
|
||||
total += 10 # 10
|
||||
total -= 3 # 7
|
||||
|
||||
Reference in New Issue
Block a user