java.util.HashMap shim + a value in the "No method" error

A mutable Map keyed by jolt values (jolt-hash/=) with put/get/putAll/containsKey/
size/remove/keySet/values/entrySet — enough for libraries that build a fast
lookup table (malli's fast-registry doto's a HashMap then .get's it). The
"No method M for value" dot-dispatch error now includes the value, which makes
a wrong-type interop target far easier to pin down.
This commit is contained in:
Yogthos 2026-06-22 02:28:17 -04:00
parent 2de0543613
commit af163bad59
2 changed files with 51 additions and 1 deletions

View file

@ -266,7 +266,8 @@
(let ((v (jolt-first s))) (jiterator-cur-set! obj (jolt-rest s)) v))))
(else (error #f (string-append "No method " method-name " on Iterator")))))
((string=? method-name "iterator") (make-jiterator (jolt-seq obj)))
(else (error #f (string-append "No method " method-name " for value"))))))
(else (error #f (string-append "No method " method-name " for value: "
(jolt-pr-str obj)))))))
;; reify: instance-local method table. obj is a jreify carrying a method ht +
;; the protocol short-names it implements (for satisfies?/instance?).