From 13a2d547b48fd0e5c06810a4fa50aa983c1c2081 Mon Sep 17 00:00:00 2001 From: yuyi Date: Tue, 23 Nov 2021 16:55:15 +0800 Subject: [PATCH] checker: fix vtl compile error (#12550) --- vlib/v/checker/checker.v | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vlib/v/checker/checker.v b/vlib/v/checker/checker.v index 9866ccfe11..b7bd3e4320 100644 --- a/vlib/v/checker/checker.v +++ b/vlib/v/checker/checker.v @@ -1954,6 +1954,9 @@ pub fn (mut c Checker) method_call(mut node ast.CallExpr) ast.Type { node.return_type = left_type node.receiver_type = left_type + if c.table.cur_fn.generic_names.len > 0 { + c.table.unwrap_generic_type(left_type, c.table.cur_fn.generic_names, c.table.cur_concrete_types) + } unwrapped_left_type := c.unwrap_generic(left_type) left_sym := c.table.get_type_symbol(unwrapped_left_type) final_left_sym := c.table.get_final_type_symbol(unwrapped_left_type)