mirror of
https://github.com/vlang/v.git
synced 2025-09-14 06:52:36 +03:00
parser: restore outer variable in index exprs
This commit is contained in:
parent
3bb559b4c8
commit
6d35f68242
4 changed files with 38 additions and 5 deletions
|
@ -1946,6 +1946,7 @@ fn (p mut Parser) index_expr(typ_ string, fn_ph int) string {
|
|||
if close_bracket {
|
||||
p.gen(']/*r$typ $v.is_mut*/')
|
||||
}
|
||||
p.expr_var = v
|
||||
}
|
||||
// TODO move this from index_expr()
|
||||
// TODO if p.tok in ...
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue