mismatched arity -> wrong number of arguments

This commit is contained in:
Scott Richmond 2024-07-14 13:53:32 -04:00
parent 8cf84e63d3
commit 2f03bbb12f

View File

@ -435,12 +435,12 @@ Deferred until a later iteration of Ludus:
(def rest-arities (keys (arities :rest)))
(when (empty? rest-arities)
(array/push (validator :errors)
{:node ast :msg "mismatched arity"})
{:node ast :msg "wrong number of arguments"})
(break validator))
(def rest-min (min ;rest-arities))
(when (< num-args rest-min)
(array/push (validator :errors)
{:node ast :msg "mismatched arity"}))
{:node ast :msg "wrong number of arguments"}))
validator)
(defn- kw-root [validator]