Two paths dropped a nil set member. phs-seq read members via phm-to-struct, whose Janet struct can't hold a nil key, so the nil was lost on seq/print and on into-an-existing-set even though the backing phm counted it (count/contains? then disagreed). Re-attach the nil from the phm's has-nil slot, keeping struct-key order for the rest so set printing stays stable. The transient set keyed its native table by canon-key and stored the member as the value; canon-key returns nil for nil and a nil value also drops the entry, so conj!/disj!/contains?/persistent! lost a nil member outright. Key by tbl-key (the same nil sentinel the transient map uses) and box a nil value through tbl-nil-key, unboxing on persistent!. A nil-containing set used as a map key still collides with the nil-free one (canon-key drops nil during key canonicalization) — separate latent bug, filed as jolt-zcm9. Co-authored-by: Yogthos <yogthos@gmail.com> |
||
|---|---|---|
| .. | ||
| bench | ||
| clojure-stdlib/clojure | ||
| fixtures/cgen-build | ||
| integration | ||
| spec | ||
| support | ||
| unit | ||