Fix function call type error message

This commit is contained in:
Alex Bethel 2021-07-15 14:24:07 -05:00
parent a4d815cf7c
commit f6e6f8cea1

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