1
(**** file testinterp/t301-object.ml
2
suggested by Jacques Garrigue to Basile Starynkevitch
5
ocamlc -nostdlib -I ../../stdlib \
6
../../stdlib/pervasives.cmo ../../stdlib/camlinternalOO.cmo \
7
t301-object.ml -o t301-object.byte
10
(* $Id: t301-object.ml 6363 2004-06-02 09:42:01Z basile $ *)
13
class c = object (self)
15
method privmet = self#pubmet + 1
16
val o = object method a = 3 method m = 4 end
22
(c#pubmet, c#privmet, c#dynmet);;
25
if x <> 1 then raise Not_found;
26
if y <> 2 then raise Not_found;
27
if z <> 4 then raise Not_found;;
29
(**** eof $Id: t301-object.ml 6363 2004-06-02 09:42:01Z basile $ *)