; Fieldtest kem.4-red (Axis 4, param-in restriction, must-fail path). ; Same NumBox with `param-in (a Int Float)`, but the consumer ; instantiates it with `(con Str)` — Str is not in the allowed set. ; Expected diagnostic per spec § Error handling table: ; `ParamNotInRestrictedSet`. (module kem_4_paramin_box_red (data NumBox (vars a) (doc "Int-or-Float container — param-in restriction on `a`.") (param-in (a Int Float)) (ctor MkNumBox a)) (fn unwrap_str (doc "BAD: NumBox is restricted to {Int, Float}, but we ask for Str. Expected: ParamNotInRestrictedSet on the type signature.") (type (fn-type (params (own (con NumBox (con Str)))) (ret (own (con Str))))) (params b) (body (match b (case (pat-ctor MkNumBox x) x)))) (fn main (type (fn-type (params) (ret (own (con Unit))) (effects IO))) (params) (body (do io/print_str ""))))