1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

v2: cgen: remove type resolving for VarDecl

This commit is contained in:
Alexander Medvednikov 2020-02-03 11:32:00 +01:00
parent 6489b48c9c
commit 40fd918b58

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