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

checker: ForInStmt only call table.value_type once

This commit is contained in:
Joe Conigliaro 2020-03-18 23:29:28 +11:00
parent 4262ff76c3
commit 5fb90e12b1

View File

@ -567,7 +567,8 @@ fn (c mut Checker) stmt(node ast.Stmt) {
sym.map_info().key_type
}
else {
table.int_type}
table.int_type
}
}
scope.override_var(ast.Var{
name: it.key_var
@ -581,7 +582,7 @@ fn (c mut Checker) stmt(node ast.Stmt) {
}
scope.override_var(ast.Var{
name: it.val_var
typ: c.table.value_type(typ)
typ: value_type
})
}
c.stmts(it.stmts)