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

pull/6490/head
Delyan Angelov 2020-09-27 16:32:46 +03:00
parent 3a869c726b
commit a6d525eb92
1 changed files with 2 additions and 2 deletions

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)