checker: minor cleanup in `call_method` (#9066)
parent
094936d764
commit
dad7c40306
|
@ -1360,11 +1360,9 @@ pub fn (mut c Checker) call_method(mut call_expr ast.CallExpr) table.Type {
|
||||||
// check fn
|
// check fn
|
||||||
c.check_map_and_filter(true, elem_typ, call_expr)
|
c.check_map_and_filter(true, elem_typ, call_expr)
|
||||||
arg_sym := c.table.get_type_symbol(arg_type)
|
arg_sym := c.table.get_type_symbol(arg_type)
|
||||||
// FIXME: match expr failed for now
|
ret_type := match arg_sym.info {
|
||||||
mut ret_type := 0
|
table.FnType { arg_sym.info.func.return_type }
|
||||||
match mut arg_sym.info {
|
else { arg_type }
|
||||||
table.FnType { ret_type = arg_sym.info.func.return_type }
|
|
||||||
else { ret_type = arg_type }
|
|
||||||
}
|
}
|
||||||
call_expr.return_type = c.table.find_or_register_array(ret_type)
|
call_expr.return_type = c.table.find_or_register_array(ret_type)
|
||||||
} else if method_name == 'filter' {
|
} else if method_name == 'filter' {
|
||||||
|
|
Loading…
Reference in New Issue