compiler: check is ptr when free in closing scope (#1399)

pull/1409/head
Henrixounez 2019-07-31 19:21:49 +02:00 committed by Alexander Medvednikov
parent 37a0e6ebef
commit 715bd21118
1 changed files with 1 additions and 1 deletions

View File

@ -1029,7 +1029,7 @@ fn (p mut Parser) close_scope() {
else if v.typ == 'string' {
p.genln('v_string_free($v.name); // close_scope free')
}
else {
else if v.ptr {
p.genln('free($v.name); // close_scope free')
}
}