From 2415f3d43740896ed296e9073cf9119b92fdf103 Mon Sep 17 00:00:00 2001 From: Scott Richmond Date: Sun, 19 May 2024 18:23:34 -0400 Subject: [PATCH] bugfixes --- janet/validate.janet | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/janet/validate.janet b/janet/validate.janet index 1b06fe2..8f9649b 100644 --- a/janet/validate.janet +++ b/janet/validate.janet @@ -345,6 +345,7 @@ Deferred until a later iteration of Ludus: (def the-fn (resolve-name ctx (fn-word :data))) (when (not the-fn) (break validator)) (when (= :function (type the-fn)) (break validator)) + (when (= :cfunction (type the-fn)) (break validator)) (print "fn name: " (the-fn :name)) (def arities (the-fn :arities)) (print "arities: ") @@ -625,7 +626,7 @@ Deferred until a later iteration of Ludus: (default ctx @{}) (def validator (new-validator ast)) (def base-ctx @{:^parent ctx}) - (set (validator :ctx) ctx) + (set (validator :ctx) base-ctx) (validate validator)) (defn foo [] :foo)