diff --git a/vlib/v/checker/checker.v b/vlib/v/checker/checker.v index aea289f9db..a11b433ae8 100644 --- a/vlib/v/checker/checker.v +++ b/vlib/v/checker/checker.v @@ -127,7 +127,7 @@ pub fn (mut c Checker) check_scope_vars(sc &ast.Scope) { else {} } } - for _, child in sc.children { + for child in sc.children { c.check_scope_vars(child) } } @@ -5506,7 +5506,7 @@ fn (c Checker) check_struct_signature(from table.Struct, to table.Struct) bool { if from.fields.len == 0 { return false } - for _, field in from.fields { + for field in from.fields { filtered := to.fields.filter(it.name == field.name) if filtered.len != 1 { // field doesn't exist diff --git a/vlib/v/table/table.v b/vlib/v/table/table.v index 84eb1f5b72..41cc8d202f 100644 --- a/vlib/v/table/table.v +++ b/vlib/v/table/table.v @@ -773,7 +773,7 @@ pub fn (mytable &Table) known_type_names() []string { // it doesn't care about childs that are references pub fn (mytable &Table) has_deep_child_no_ref(ts &TypeSymbol, name string) bool { if ts.info is Struct { - for _, field in ts.info.fields { + for field in ts.info.fields { sym := mytable.get_type_symbol(field.typ) if !field.typ.is_ptr() && (sym.name == name || mytable.has_deep_child_no_ref(sym, name)) { return true