memory: remove if false

pull/4099/head
Alexander Medvednikov 2020-03-22 08:59:44 +01:00
parent c50c6812ce
commit 1ad417734e
1 changed files with 2 additions and 2 deletions

View File

@ -550,14 +550,14 @@ fn (g mut Gen) gen_fn_decl(it ast.FnDecl) {
g.stmt(stmt) g.stmt(stmt)
} }
// //////////// // ////////////
if g.autofree && false { if g.autofree {
scope := g.file.scope.innermost(it.pos.pos - 1) scope := g.file.scope.innermost(it.pos.pos - 1)
for _, var in scope.vars { for _, var in scope.vars {
sym := g.table.get_type_symbol(var.typ) sym := g.table.get_type_symbol(var.typ)
if sym.kind == .array && !table.type_is_optional(var.typ) { if sym.kind == .array && !table.type_is_optional(var.typ) {
g.writeln('array_free($var.name); // autofree') g.writeln('array_free($var.name); // autofree')
} }
println(var.name) // println(var.name)
} }
} }
// ///////// // /////////