From 141220fb381eb8d3eaea495cb9762b87dab1099e Mon Sep 17 00:00:00 2001 From: Alex Bethel Date: Thu, 15 Jul 2021 14:24:07 -0500 Subject: [PATCH] Fix function call type error message --- src/interpret.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/interpret.rs b/src/interpret.rs index 8290fa3..cc4b10e 100644 --- a/src/interpret.rs +++ b/src/interpret.rs @@ -260,7 +260,11 @@ impl ExecEnv { self.fn_call(func, &args, &stmt.span)?; } else { 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(), }); }