From 7309be55a01a45eca15da2ddd32364eac9c0e22d Mon Sep 17 00:00:00 2001 From: Joe Conigliaro Date: Wed, 11 Mar 2020 20:53:14 +1100 Subject: [PATCH] table: fix error in field/method lookup from previous commit --- vlib/v/table/table.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/v/table/table.v b/vlib/v/table/table.v index 553ec2586d..fbe355c1f9 100644 --- a/vlib/v/table/table.v +++ b/vlib/v/table/table.v @@ -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]