Silently fail when calling a non-function
The most cursed possible way to deal with this error.
This commit is contained in:
parent
d3242484fc
commit
821eeae322
|
@ -258,14 +258,7 @@ impl ExecEnv {
|
||||||
if let Value::Functio(func) = func {
|
if let Value::Functio(func) = func {
|
||||||
self.fn_call(func, &args, &stmt.span)?;
|
self.fn_call(func, &args, &stmt.span)?;
|
||||||
} else {
|
} else {
|
||||||
return Err(Error {
|
// Fail silently for now.
|
||||||
kind: ErrorKind::TypeError(format!(
|
|
||||||
"attempt to call non-function `{}` (= {})",
|
|
||||||
iden.iden.to_owned(),
|
|
||||||
func
|
|
||||||
)),
|
|
||||||
span: stmt.span.clone(),
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
StmtKind::Loop { body } => loop {
|
StmtKind::Loop { body } => loop {
|
||||||
|
|
Loading…
Reference in a new issue