Add literal conversion based on context at compile time

This commit is contained in:
nub31
2025-06-07 20:34:10 +02:00
parent 49c4e94515
commit 3c3a48d3b4
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])
}