mismatched arity -> wrong number of arguments
This commit is contained in:
parent
8cf84e63d3
commit
2f03bbb12f
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue
Block a user