Fix function call type error message

pull/43/head
Alex Bethel 2021-07-15 14:24:07 -05:00
parent 2632be1073
commit c1236228a9
1 changed files with 5 additions and 1 deletions

View File

@ -260,7 +260,11 @@ impl ExecEnv {
self.fn_call(func, &args, &stmt.span)?;
} else {
return Err(Error {
kind: ErrorKind::TypeError(iden.iden.to_owned()),
kind: ErrorKind::TypeError(format!(
"attempt to call non-function `{}` (= {})",
iden.iden.to_owned(),
func
)),
span: stmt.span.clone(),
});
}