; Fieldtest cut55-1c — decision (a), over-strict lint on a true read-only.
;
; is_empty inspects only the head constructor of xs. No pattern binder is
; consumed (the Cons arm binds h and t but uses neither). xs is `(own)`.
; Per contract 0008 conditions 1-4 all hold (consume_count 0, no heap
; binder consumed, List is not a value type, body is not intrinsic), so
; over-strict-mode SHOULD fire suggesting borrow. Check exits 0 (Warning).
;
; Expected: ail check -> over-strict-mode warning naming xs/borrow, exit 0.

(module cut55_1c_overstrict_isempty

  (data List
    (ctor Nil)
    (ctor Cons (con Int) (con List)))

  (fn is_empty
    (doc "Own xs but only inspect its head ctor — over-strict, should be borrow.")
    (type
      (fn-type
        (params (own (con List)))
        (ret (own (con Bool)))))
    (params xs)
    (body
      (match xs
        (case (pat-ctor Nil) true)
        (case (pat-ctor Cons h t) false)))))
