From 0363d5a091339a34dcb57a8d4c9f4c9ceb3fd9a3 Mon Sep 17 00:00:00 2001 From: Scott Richmond Date: Thu, 20 Jun 2024 17:49:27 -0400 Subject: [PATCH] calling something other than a function causes a panic --- src/interpreter.janet | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/interpreter.janet b/src/interpreter.janet index e040e40..3f59fce 100644 --- a/src/interpreter.janet +++ b/src/interpreter.janet @@ -463,7 +463,8 @@ [:dict :keyword] (get prev curr :^nil) [:nil :keyword] :^nil [:pkg :keyword] (get prev curr :^nil) - [:pkg :pkg-kw] (get prev curr :^nil))) + [:pkg :pkg-kw] (get prev curr :^nil) + (error (string "cannot call " (b/ludus/type prev) " `" (b/show prev) "`")))) (defn- synthetic [ast ctx] (def terms (ast :data))