From 821eeae322725148d0904bbd6d413831f04a6050 Mon Sep 17 00:00:00 2001 From: Alex Bethel Date: Fri, 16 Jul 2021 19:02:31 -0500 Subject: [PATCH] Silently fail when calling a non-function The most cursed possible way to deal with this error. --- src/interpret.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/interpret.rs b/src/interpret.rs index 8247375..cd7dbdf 100644 --- a/src/interpret.rs +++ b/src/interpret.rs @@ -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 {