v2: cgen: remove type resolving for VarDecl

pull/3635/head^2
Alexander Medvednikov 2020-02-03 11:32:00 +01:00
parent 6489b48c9c
commit 40fd918b58
1 changed files with 1 additions and 6 deletions

View File

@ -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(';')
}