summaryrefslogtreecommitdiff
path: root/sem_6/HLIN603/ocaml/TP2/test.caml
blob: a454ab353999a750da8a622d0c65f82225226863 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
class aa =
object
  method print = print_endline("Je suis A")
end;;
class bb =
object
  inherit aa
  method print = print_endline("Je suis B")
end;;
class cc =
object
  inherit bb as superb
end;;
class dd =
object (self)
  inherit cc as super
  method print = print_endline("Je suis D")
  method m = super#print
end;;
let a = new dd;;
a#m;;