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:
parent
4262ff76c3
commit
5fb90e12b1
@ -567,7 +567,8 @@ fn (c mut Checker) stmt(node ast.Stmt) {
|
|||||||
sym.map_info().key_type
|
sym.map_info().key_type
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
table.int_type}
|
table.int_type
|
||||||
|
}
|
||||||
}
|
}
|
||||||
scope.override_var(ast.Var{
|
scope.override_var(ast.Var{
|
||||||
name: it.key_var
|
name: it.key_var
|
||||||
@ -581,7 +582,7 @@ fn (c mut Checker) stmt(node ast.Stmt) {
|
|||||||
}
|
}
|
||||||
scope.override_var(ast.Var{
|
scope.override_var(ast.Var{
|
||||||
name: it.val_var
|
name: it.val_var
|
||||||
typ: c.table.value_type(typ)
|
typ: value_type
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
c.stmts(it.stmts)
|
c.stmts(it.stmts)
|
||||||
|
Loading…
Reference in New Issue
Block a user