1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

sort structs: handle fixed size arrays

This commit is contained in:
Alexander Medvednikov
2019-12-12 13:51:05 +03:00
parent 576618d8cc
commit 88ec9c235d
3 changed files with 36 additions and 4 deletions

View File

@ -154,3 +154,26 @@ fn test_assoc_with_constants() {
assert again.b == 22
}
/*
[typedef]
struct C.fixed {
points [10]C.point
}
[typedef]
struct C.point {
x int
y int
}
fn test_fixed_field() {
f := &C.fixed{}
p := f.points[0]
//f.nums[0] = 10
//println(f.nums[0])
println(p.x)
//nums: [10]int
//}
}
*/