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

table: fix error in field/method lookup from previous commit

This commit is contained in:
Joe Conigliaro 2020-03-11 20:53:14 +11:00
parent 7513dab185
commit 7309be55a0

View File

@ -140,7 +140,7 @@ pub fn (t &Table) type_find_method(s &TypeSymbol, name string) ?Fn {
if method := ts.find_method(name) {
return method
}
if s.parent_idx == 0 {
if ts.parent_idx == 0 {
break
}
ts = &t.types[ts.parent_idx]
@ -164,7 +164,7 @@ pub fn (t &Table) struct_find_field(s &TypeSymbol, name string) ?Field {
if field := ts.find_field(name) {
return field
}
if s.parent_idx == 0 {
if ts.parent_idx == 0 {
break
}
ts = &t.types[ts.parent_idx]