checker: fix vtl compile error (#12550)

pull/12542/head
yuyi 2021-11-23 16:55:15 +08:00 committed by GitHub
parent 93bdff5589
commit 13a2d547b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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)