core: Add location to non-primitive value return error

This commit is contained in:
David Mak 2024-02-02 12:49:21 +08:00
parent d6302b6ec8
commit 27011f385b

View File

@ -337,8 +337,9 @@ impl<'a> Inferencer<'a> {
if !self.check_return_value_ty(ret_ty) {
return Err(HashSet::from([
format!(
"return value of type {} must be a primitive of a tuple of primitives",
"return value of type {} must be a primitive of a tuple of primitives at {:?}",
self.unifier.stringify(ret_ty),
value.location,
),
]))
}