From 9beb45adf0bde9f08bf470ae87b91d59bc8afac9 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 82473750..cd7dbdfd 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 {