Fix function call type error message

This commit is contained in:
Alex Bethel 2021-07-15 14:24:07 -05:00
parent 3d9f847862
commit 141220fb38

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(),
});
}