flan/test/programs/rl-with-empty.flan

22 lines
893 B
Plaintext

;;;; with-drawing given a body that is a bare ().
;;;;
;;;; The other way a body can be missing, and the one that used to get through.
;;;; rl-with-reject.flan beside this file is the zero-argument case, which the
;;;; guard always caught; one argument that happens to be () is one argument,
;;;; so it was spliced into the expansion verbatim and the refusal came out of
;;;; the middle of the expanded (do) — "() is not an expression", several forms
;;;; from anything anyone wrote.
;;;;
;;;; () has no value-position meaning in the language at all, so a lone one
;;;; where a body goes is never a body, and the guard answers the same name the
;;;; missing-body case already answered. (do) is what to write for a body that
;;;; is meant to be empty.
;;;;
;;;; Being refused is the whole test; this is never built.
(import rl "vendor:raylib")
(defn main [] i32
(rl/with-drawing ())
0)