infer var type when initializer is a number constant

This commit is contained in:
2025-12-23 18:10:56 +01:00
parent 5682318915
commit c527aceecd
36 changed files with 118 additions and 100 deletions

View File

@@ -4,15 +4,15 @@ func collatz_num[n: i64] : i64
return n * 3 + 1
func collatz_seq[n: i64]: i64
let i: i64 = 1
let i = 1
while n != 1
n = collatz_num(n)
i = i + 1
return i
func main[] : i64
let max: i64 = 0
let max_index: i64 = 0
let max = 0
let max_index = 0
for i in 1..1000000
let seq: i64 = collatz_seq(i)