Add literal conversion based on context at compile time

This commit is contained in:
nub31
2025-06-07 20:34:10 +02:00
parent 23f955f8b2
commit 8d6f2f925a
10 changed files with 618 additions and 600 deletions

View File

@@ -1,5 +1,17 @@
namespace main
struct Human {
age: ^u64
}
export func main(args: []^string) {
sys::call(60, 0)
}
let x = [3]f64
x[0] = 1
x[1.2] = 2
x[2] = 3
c::printf("%d\n", x[0])
c::printf("%d\n", x[1])
c::printf("%d\n", x[2])
}