mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: fix -autofree with arr[idx] or { default }
(#17096)
This commit is contained in:
parent
16e2ade9ff
commit
8b6fceb0a3
@ -314,7 +314,7 @@ fn (mut g Gen) index_of_array(node ast.IndexExpr, sym ast.TypeSymbol) {
|
||||
g.write('))')
|
||||
}
|
||||
}
|
||||
if needs_clone {
|
||||
if !gen_or && needs_clone {
|
||||
g.write(')')
|
||||
}
|
||||
if gen_or {
|
||||
|
Loading…
Reference in New Issue
Block a user