v4 / vlib / v / checker / tests / c_struct_cast.vv
19 lines · 16 sloc · 172 bytes · 99216929d626db9feda804dec8ab0a9ce05c0d3a
Raw
1module main
2
3pub struct C.Vector3 {
4 x f32
5 y f32
6 z f32
7}
8
9pub type Vector3 = C.Vector3
10
11fn main() {
12 v := Vector3{
13 x: 0.0
14 y: 1.7
15 z: 0.0
16 }
17 dump(v)
18 dump(int(v))
19}
20