OOinferself.ml 163 Bytes
Newer Older
1 2 3 4 5 6
class virtual ['self] cell (init) = object (self : 'self)
  val mutable x = init
  method get = x
  method set y = x <- self#check y
  method virtual check: _
end