checker: use a correct type name in an error

pull/10426/head
Alexander Medvednikov 2021-06-12 17:28:25 +03:00
parent b25c0e5ef6
commit 9ac661be5a
1 changed files with 1 additions and 1 deletions

View File

@ -3058,7 +3058,7 @@ pub fn (mut c Checker) return_stmt(mut node ast.Return) {
c.type_implements(got_typ, exp_type, node.pos)
continue
}
c.error('cannot use `$got_typ_sym.name` as type `$exp_typ_sym.name` in return argument',
c.error('cannot use `$got_typ_sym.name` as type `${c.table.type_to_str(exp_type)}` in return argument',
pos)
}
if (got_typ.is_ptr() || got_typ.is_pointer())