Add literal conversion based on context at compile time
This commit is contained in:
@@ -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])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user