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)