mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker/table: minor cleanup by removing unnecessary _
variable (#8801)
This commit is contained in:
parent
198b395cde
commit
a34a1ab864
@ -127,7 +127,7 @@ pub fn (mut c Checker) check_scope_vars(sc &ast.Scope) {
|
|||||||
else {}
|
else {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for _, child in sc.children {
|
for child in sc.children {
|
||||||
c.check_scope_vars(child)
|
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 {
|
if from.fields.len == 0 {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
for _, field in from.fields {
|
for field in from.fields {
|
||||||
filtered := to.fields.filter(it.name == field.name)
|
filtered := to.fields.filter(it.name == field.name)
|
||||||
if filtered.len != 1 {
|
if filtered.len != 1 {
|
||||||
// field doesn't exist
|
// 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
|
// it doesn't care about childs that are references
|
||||||
pub fn (mytable &Table) has_deep_child_no_ref(ts &TypeSymbol, name string) bool {
|
pub fn (mytable &Table) has_deep_child_no_ref(ts &TypeSymbol, name string) bool {
|
||||||
if ts.info is Struct {
|
if ts.info is Struct {
|
||||||
for _, field in ts.info.fields {
|
for field in ts.info.fields {
|
||||||
sym := mytable.get_type_symbol(field.typ)
|
sym := mytable.get_type_symbol(field.typ)
|
||||||
if !field.typ.is_ptr() && (sym.name == name || mytable.has_deep_child_no_ref(sym, name)) {
|
if !field.typ.is_ptr() && (sym.name == name || mytable.has_deep_child_no_ref(sym, name)) {
|
||||||
return true
|
return true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user