Compiler: letrec for skip-annotations in compile-define

Self-referencing local function used let instead of letrec, causing
JIT failures: "VM undefined: skip-annotations" when compiling any
define with type annotations (:effects, :as). Retranspile needed
to eliminate JIT fallback warnings from the OCaml binary.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-11 13:06:28 +00:00
parent 55a4fba58f
commit ccd89dfa53

View File

@@ -728,7 +728,7 @@
(and
(not (empty? rest-args))
(= (type-of (first rest-args)) "keyword"))
(let
(letrec
((skip-annotations (fn (items) (if (empty? items) nil (if (= (type-of (first items)) "keyword") (skip-annotations (rest (rest items))) (first items))))))
(skip-annotations rest-args))
(first rest-args)))))