checker/table: minor cleanup by removing unnecessary `_` variable (#8801)
parent
198b395cde
commit
a34a1ab864
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue