improve addressof

This commit is contained in:
nub31
2025-06-08 13:54:10 +02:00
parent 6ea9cc0d54
commit 72eb3c89d8
12 changed files with 131 additions and 668 deletions

View File

@@ -5,15 +5,19 @@ struct Human {
}
export func main(args: []^string): i64 {
let x = [3]f64
let age: u64 = 23
x[0] = 1
x[1] = 2
x[2] = 3
let me = alloc Human {
age = &age
}
c::printf("%f\n", x[0])
c::printf("%f\n", x[1])
c::printf("%f\n", x[2])
me.age^ = 24.5
test(me.age^)
return 0
}
func test(me: u64) {
c::printf("%d\n", me)
}