mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: no free on stack allocated array
This commit is contained in:
parent
d340dd79b8
commit
c604a5c02f
@ -2760,6 +2760,7 @@ fn (p mut Parser) array_init() string {
|
|||||||
if p.table.known_type(array_elem_typ) {
|
if p.table.known_type(array_elem_typ) {
|
||||||
p.cgen.resetln('')
|
p.cgen.resetln('')
|
||||||
p.gen('{0}')
|
p.gen('{0}')
|
||||||
|
p.is_alloc = false
|
||||||
if is_const_len {
|
if is_const_len {
|
||||||
return '[${p.mod}__$lit]$array_elem_typ'
|
return '[${p.mod}__$lit]$array_elem_typ'
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user