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

cgen: for c in string; short struct init syntax fixes;

This commit is contained in:
Alexander Medvednikov
2020-03-26 17:03:14 +01:00
parent c71d36356b
commit ed3e0c43bc
6 changed files with 120 additions and 84 deletions

View File

@ -1,17 +1,17 @@
struct A {
struct AA {
mut:
val int
nums []int
}
struct B {
struct BB {
mut:
a A
a AA
}
struct C {
struct CC {
mut:
b B
b BB
nums []int
aarr []A
num int
@ -65,7 +65,7 @@ fn test_empty_struct() {
}
fn test_struct_levels() {
mut c := C{}
mut c := CC{}
assert c.nums.len == 0
c.nums << 3
assert c.nums.len == 1