type t = { x : int ref } let r = { x = ref 42 } let test () = let y = !(r.x) in y