flan/test/programs/macro-arity.flan

13 lines
449 B
Plaintext

;;;; Too few arguments for the macro's parameter list, refused at the call.
;;;;
;;;; Nothing here is a run-time claim and nothing here expands: check_call
;;;; counts the call against the list before do-grid is ever run, so the
;;;; location is the line below and there is no expansion to report anywhere
;;;; else.
(defmacro do-grid [[r rows c cols] & body]
`(dotimes [~r ~rows] (dotimes [~c ~cols] ~@body)))
(defn main [] i32
(do-grid)
0)