Silently fail when calling a non-function

The most cursed possible way to deal with this error.
pull/43/head
Alex Bethel 2021-07-16 19:02:31 -05:00
parent 2912cc8594
commit 71a23ca4c2
1 changed files with 1 additions and 8 deletions

View File

@ -258,14 +258,7 @@ impl ExecEnv {
if let Value::Functio(func) = func {
self.fn_call(func, &args, &stmt.span)?;
} else {
return Err(Error {
kind: ErrorKind::TypeError(format!(
"attempt to call non-function `{}` (= {})",
iden.iden.to_owned(),
func
)),
span: stmt.span.clone(),
});
// Fail silently for now.
}
}
StmtKind::Loop { body } => loop {