mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fix #3202
This commit is contained in:

committed by
Alexander Medvednikov

parent
1277ce22f8
commit
320174bd5b
@ -542,3 +542,17 @@ fn test_for_last() {
|
||||
assert s == '[1, 2, 3, 4]'
|
||||
}
|
||||
*/
|
||||
|
||||
struct Foo {
|
||||
mut:
|
||||
bar []int
|
||||
}
|
||||
|
||||
fn test_in_struct() {
|
||||
mut baz := Foo{
|
||||
bar: [0, 0, 0]
|
||||
}
|
||||
baz.bar[0] += 2
|
||||
baz.bar[0]++
|
||||
assert baz.bar[0] == 3
|
||||
}
|
||||
|
Reference in New Issue
Block a user