1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
(* TEST
flags = "-bin-annot -bin-annot-occurrences";
compile_only = "true";
readonly_files = "index_objects.ml";
setup-ocamlc.byte-build-env;
all_modules = "index_objects.ml";
ocamlc.byte;
check-ocamlc.byte-output;
program = "-quiet -index -decls index_objects.cmt";
output = "out_objinfo";
ocamlobjinfo;
check-program-output;
*)
let o = object
method pop () = ()
end
(* FIXME: method usages are not indexed yet *)
let () = o#pop ()
class c = object
method cpop () = ()
end
let _ : c = new c
class d = object
inherit c
end
module type M = sig
class ct : object
method pop : unit
end
class dt : object inherit ct end
end
class ins_var = object (self)
val mutable ins = 0
method get_ins () = ins
method set_ins i = ins <- i
method other () = self#get_ins ()
method update = {< ins = 3 >}
end
|