From 40fd918b58f544b5c80c6cb60a35efa5b137d4e6 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Mon, 3 Feb 2020 11:32:00 +0100 Subject: [PATCH] v2: cgen: remove type resolving for VarDecl --- vlib/v/gen/cgen.v | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/vlib/v/gen/cgen.v b/vlib/v/gen/cgen.v index 6f35616fa4..265f75e854 100644 --- a/vlib/v/gen/cgen.v +++ b/vlib/v/gen/cgen.v @@ -117,12 +117,7 @@ fn (g mut Gen) stmt(node ast.Stmt) { } ast.VarDecl { mut typ := it.typ - if typ.kind == .unresolved { - // g.write('/*unresolved*/') - // ti = table.void_type // g.table.get_expr_ti(it.expr) - typ = g.checker.expr(it.expr) - } - g.write('$typ.name $it.name = ') + g.write('$it.typ.name $it.name = ') g.expr(it.expr) g.writeln(';') }