(module mrb_3_bool_capacity
  (fn capacity
    (doc "Read the size of a borrow-mode Bool RawBuf without ever touching get/set. The #51 legitimate-but-unobserved case: an explicit Bool element type is named at construction, but only .size is ever used.")
    (type (fn-type
      (params (borrow (con RawBuf (con Bool))))
      (ret (own (con Int)))))
    (params buf)
    (body (app RawBuf.size buf)))
  (fn main
    (doc "Allocate an 8-slot Bool RawBuf and print its capacity (8) via RawBuf.size only — never get/set. Exercises a size-only Bool buffer.")
    (type (fn-type (params) (ret (own (con Unit))) (effects IO)))
    (params)
    (body
      (let buf (new RawBuf (con Bool) 8)
        (app print (app capacity buf))))))
