Fix function call type error message
This commit is contained in:
parent
a4d815cf7c
commit
f6e6f8cea1
|
@ -260,7 +260,11 @@ impl ExecEnv {
|
||||||
self.fn_call(func, &args, &stmt.span)?;
|
self.fn_call(func, &args, &stmt.span)?;
|
||||||
} else {
|
} else {
|
||||||
return Err(Error {
|
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(),
|
span: stmt.span.clone(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue