mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fix #3202
This commit is contained in:
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
|
||||
}
|
||||
|
@ -1964,7 +1964,7 @@ fn (p mut Parser) var_expr(v Var) string {
|
||||
// p.print_tok()
|
||||
// dc++
|
||||
if p.tok == .lsbr {
|
||||
// typ = p.index_expr(typ, fn_ph, v)
|
||||
typ = p.index_expr(typ, fn_ph)
|
||||
}
|
||||
}
|
||||
// `a++` and `a--`
|
||||
|
Loading…
Reference in New Issue
Block a user