; Fieldtest raw-buf comprehensive .3 (Axis 5 — the param-in element-type ; restriction on a forbidden *core primitive*). ; ; The prior field test rejected RawBuf (the shipped fixture) and ; RawBuf (a user ADT). This probes the third natural mistake: a ; RawBuf of `Unit` — a core primitive that is NOT in the allowed set ; {Int, Float, Bool}. An LLM author might reach for `RawBuf` as a ; "presence buffer" / counter-of-slots before realising a Bool flag ; buffer is the right tool. The restriction must reject it, and per the ; B3 fix (#48) the diagnostic should now NAME the allowed set ; {Int, Float, Bool}, not just the offending type. ; ; Expected: `ail check` exits 1 with [param-not-in-restricted-set] ; naming `Unit` AND the allowed set {Int, Float, Bool}. (module rbx_3_unit_element_reject (fn make_presence (doc "Try to allocate a RawBuf of Unit — forbidden element type.") (type (fn-type (params (con Int)) (ret (own (con RawBuf (con Unit)))))) (params n) (body (new RawBuf (con Unit) n))) (fn main (type (fn-type (params) (ret (con Unit)) (effects IO))) (params) (body (let buf (app make_presence 3) (do io/print_str "unreachable\n")))))