diff --git a/host/chez/natives-meta.ss b/host/chez/natives-meta.ss index 82b0dec..80c930d 100644 --- a/host/chez/natives-meta.ss +++ b/host/chez/natives-meta.ss @@ -79,9 +79,10 @@ (override (if (jolt-nil? m) jolt-nil (jolt-get m ty-kw-type jolt-nil)))) (cond ((not (jolt-nil? override)) override) ; :type meta wins - ;; record -> ns.Name symbol. No-ns sentinel is #f (not jolt-nil) so it = the - ;; overlay's (symbol (str t)) — jolt= compares the ns field with equal?. - ((jrec? x) (jolt-symbol #f (jrec-tag x))) + ;; record -> its ns-qualified class-name STRING (= (class x)). jolt models + ;; classes as strings, so (symbol (str (type r))) is NOT (type r) — as on the + ;; JVM where type is a Class, not a Symbol. + ((jrec? x) (jrec-tag x)) ((jolt-nil? x) jolt-nil) ((boolean? x) ty-boolean) ((number? x) ty-number) diff --git a/host/chez/run-corpus.ss b/host/chez/run-corpus.ss index 54f928a..376eda8 100644 --- a/host/chez/run-corpus.ss +++ b/host/chez/run-corpus.ss @@ -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 2726) +;; JOLT_CHEZ_ZJ_FLOOR=N override the regression floor (default 2727) ;; JOLT_CORPUS_LIMIT=N every-Nth stride (fast iteration; floor drops to 0) ;; JOLT_DUMP_CRASH_LABELS=1 list crash + allowlisted labels (import (chezscheme)) @@ -87,7 +87,7 @@ ;; a NEW (unlisted) divergence or a drop below the floor. (define known-fail-labels '("getMessage on a thrown string" - "type of record" "chunked-seq? always false" + "chunked-seq? always false" "close on throw" "macroexpand-1" "bean is the map" "proxy resolves nil" "transient vector" "transient map" @@ -189,7 +189,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) 2726))) + (if s (string->number s) 2727))) (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" diff --git a/test/chez/unit.edn b/test/chez/unit.edn index 5c3767c..95aa0b7 100644 --- a/test/chez/unit.edn +++ b/test/chez/unit.edn @@ -395,8 +395,8 @@ {:suite "type" :expr "(type (with-meta {:a 1} {:type :rec}))" :expected ":rec"} {:suite "type" :expr "(type (with-meta [1] {:other 9}))" :expected ":vector"} {:suite "type" :expr "(do (defrecord TyR [a]) (type (->TyR 1)))" :expected "user.TyR"} - {:suite "type" :expr "(do (defrecord TyR [a]) (= (symbol (str (type (->TyR 1)))) (type (->TyR 1))))" :expected "true"} - {:suite "type" :expr "(do (defrecord TyR [a]) (symbol? (type (->TyR 1))))" :expected "true"} + {:suite "type" :expr "(do (defrecord TyR [a]) (= (symbol (str (type (->TyR 1)))) (type (->TyR 1))))" :expected "false"} + {:suite "type" :expr "(do (defrecord TyR [a]) (symbol? (type (->TyR 1))))" :expected "false"} {:suite "type" :expr "(type (atom 1))" :expected ":jolt/atom"} {:suite "type" :expr "(type (volatile! 1))" :expected ":jolt/volatile"} {:suite "type" :expr "(type #\"re\")" :expected ":jolt/regex"}