From c604a5c02fceccb71ee91e1573594393a297d664 Mon Sep 17 00:00:00 2001 From: Henrixounez <30901439+Henrixounez@users.noreply.github.com> Date: Sat, 14 Sep 2019 12:40:59 +0200 Subject: [PATCH] compiler: no free on stack allocated array --- compiler/parser.v | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/parser.v b/compiler/parser.v index 83cea84575..b196e03029 100644 --- a/compiler/parser.v +++ b/compiler/parser.v @@ -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' }