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

ci: fix is not a variable and cannot be locked failing tests

This commit is contained in:
Delyan Angelov 2020-09-27 16:32:46 +03:00
parent 3a869c726b
commit a6d525eb92

View File

@ -3223,9 +3223,9 @@ pub fn (mut c Checker) select_expr(mut node ast.SelectExpr) table.Type {
}
pub fn (mut c Checker) lock_expr(mut node ast.LockExpr) table.Type {
for i, id in node.lockeds {
// c.ident(mut id)
for i in 0..node.lockeds.len {
c.ident(mut node.lockeds[i])
id := node.lockeds[i]
if id.obj is ast.Var as v {
if v.typ.share() != .shared_t {
c.error('`$id.name` must be declared `shared` to be locked', id.pos)