mirror of
https://github.com/vlang/v.git
synced 2025-09-16 07:52:32 +03:00
compiler: no free on stack allocated array
This commit is contained in:
parent
d340dd79b8
commit
c604a5c02f
1 changed files with 1 additions and 0 deletions
|
@ -2760,6 +2760,7 @@ fn (p mut Parser) array_init() string {
|
|||
if p.table.known_type(array_elem_typ) {
|
||||
p.cgen.resetln('')
|
||||
p.gen('{0}')
|
||||
p.is_alloc = false
|
||||
if is_const_len {
|
||||
return '[${p.mod}__$lit]$array_elem_typ'
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue