// module rc_match_arm_partial_drop_leak

data Wrap = MkWrap(Int)

data Cell = MkCell(Wrap, Wrap)

data Pair = MkPair(Cell, Cell)

fn build_pair(n: own Int) -> own Pair {
  MkPair(MkCell(MkWrap(n), MkWrap(2)), MkCell(MkWrap(3), MkWrap(4)))
}

// @suppress over-strict-mode: RC codegen test: exercises Iter A outer-arm-close partial-drop
fn use_first(p: own Pair) -> own Int {
  match p {
    MkPair(a, b) => match a {
      MkCell(w1, _) => 1
    }
  }
}

fn main() -> own Unit with IO {
  print(use_first(build_pair(1)))
}
