resolve ^Type hint to canonical class name in var :tag

(def ^String tv ...) left (:tag (meta (var tv))) as the unresolved "String";
the JVM compiler resolves the hint to java.lang.String at def time. Add a
resolve-class-hint host seam (built from the existing class-token table) and
resolve a def's :tag through it in the analyzer. The reader path
(read-string "^String x") stays unresolved, matching the JVM (only the
compiler resolves). Closes ^Type-tag-on-var.
This commit is contained in:
Yogthos 2026-06-21 23:52:47 -04:00
parent d1c2811d13
commit 7db5fabc8d
5 changed files with 32 additions and 9 deletions

View file

@ -11,7 +11,7 @@
;; reset between cases so there is no leakage — same isolation a fresh process gives.
;;
;; chez --script host/chez/run-corpus.ss
;; JOLT_CHEZ_ZJ_FLOOR=N override the regression floor (default 2725)
;; JOLT_CHEZ_ZJ_FLOOR=N override the regression floor (default 2726)
;; JOLT_CORPUS_LIMIT=N every-Nth stride (fast iteration; floor drops to 0)
;; JOLT_DUMP_CRASH_LABELS=1 list crash + allowlisted labels
(import (chezscheme))
@ -88,7 +88,6 @@
(define known-fail-labels
'("getMessage on a thrown string"
"type of record" "chunked-seq? always false"
"^Type tag on var"
"close on throw" "macroexpand-1"
"bean is the map" "proxy resolves nil"
"bigdec" "bigdec int M" "bigdec suffix M"
@ -191,7 +190,7 @@
;; Regression floor: fail on any NEW divergence or if pass drops below the floor.
(define base-floor (let ((s (getenv "JOLT_CHEZ_ZJ_FLOOR")))
(if s (string->number s) 2725)))
(if s (string->number s) 2726)))
(define floor (if limit 0 base-floor))
(when (or (> (length diverged) 0) (< pass floor))
(printf "REGRESSION: pass ~a < floor ~a or ~a new divergence(s)\n"