; Fieldtest cut55-1b — decision (a), over-strict `own` that does NOT trip
; the lint (boundary case).
;
; Same shape as cut55-1 but `xs` is annotated `(own (con List))`. One might
; expect the `over-strict-mode` lint to fire (xs is only read at the top
; level). It does NOT: the Cons arm recurses via `(app length t)`, and
; `length`'s own self-param is `(own ...)`, so passing the heap tail `t`
; into it counts as a consume. The lint's premise (consume_count == 0) is
; therefore false, and no warning is emitted. The fixture still legitimately
; ACCEPTs (an over-strict but sound annotation is allowed). cut55_1c is the
; sibling where the lint DOES fire (a true read-only with no recursive
; consume).
;
; Expected: ail check -> ok, exit 0 (no over-strict-mode warning).

(module cut55_1b_overstrict_own

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

  (fn length
    (doc "Annotated own but only reads xs — should be flagged over-strict.")
    (type
      (fn-type
        (params (own (con List)))
        (ret (own (con Int)))))
    (params xs)
    (body
      (match xs
        (case (pat-ctor Nil) 0)
        (case (pat-ctor Cons h t)
          (app + 1 (app length t)))))))
