compiler: no free on stack allocated array

pull/1974/head
Henrixounez 2019-09-14 12:40:59 +02:00 committed by Alexander Medvednikov
parent d340dd79b8
commit c604a5c02f
1 changed files with 1 additions and 0 deletions

View File

@ -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'
}