Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] stacking abstract base classes
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Francois Rouaix <frouaix@h...>
Subject: [Caml-list] stacking abstract base classes
I'm trying to stack up several abstract base classes, but apparently
that doesn't fit the current type system. Is there another way to do
this :

class virtual a = object
 method virtual x : int
end

class virtual b = object
 inherit a as super
 method x = pred super#x
end

Without getting this:

$ ocamlc /tmp/x.ml
File "/tmp/x.ml", line 7, characters 17-22:
This expression has no method x

(using OCaml 3.02)
--f
François Rouaix
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr