Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] About polymorphic methods and recursive classes
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Andrzej M. Ostruszka <ostruszk@o...>
Subject: [Caml-list] Re: About polymorphic methods and recursive classes
On Mon, Mar 24 (2003), Sebastien Briais wrote:
> So I ask again : how should I interpret the error message given by ocaml ?

My guess it is a bug but FWIW

># class virtual ['a] visitor =
>   object
>     method virtual caseNil : 'a
>   end
>   and virtual int_list =
    ^^^
>   object
>     method virtual visit : 'a.('a visitor -> 'a)
>   end
>   ;;
[...]

the problem is with "and" above.  Change it to class (the two classes
are not recursive so there's no harm) and it'll be OK.

						Best regards
-- 
    ____   _  ___
   /  | \_/ |/ _ \		Andrzej Marek Ostruszka
  / _ |     | (_) | Instytut Fizyki, Uniwersytet Jagiellonski (Cracow)
 /_/ L|_|V|_|\___/	(PGP <-- finger ostruszk@order.if.uj.edu.pl)

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners