From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA12942; Tue, 25 Mar 2003 16:49:52 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA12970 for caml-list@pauillac.inria.fr; Tue, 25 Mar 2003 16:49:51 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA00843 for ; Tue, 25 Mar 2003 10:21:26 +0100 (MET) Received: from order.if.uj.edu.pl (order.if.uj.edu.pl [149.156.90.15]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h2P9LPX28604 for ; Tue, 25 Mar 2003 10:21:26 +0100 (MET) Received: (from ostruszk@localhost) by order.if.uj.edu.pl (8.11.6/8.11.6) id h2P9Mbn16486 for caml-list@inria.fr; Tue, 25 Mar 2003 10:22:37 +0100 Date: Tue, 25 Mar 2003 10:22:37 +0100 From: "Andrzej M. Ostruszka" To: caml-list@inria.fr Subject: [Caml-list] Re: About polymorphic methods and recursive classes Message-ID: <20030325102237.A16189@order.if.uj.edu.pl> Mail-Followup-To: caml-list@inria.fr References: <3E7C4784.6000901@epfl.ch> <20030324094415.6679de19.Damien.Pous@ens-lyon.fr> <3E7F457A.80006@epfl.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <3E7F457A.80006@epfl.ch>; from sebastien.briais@epfl.ch on Mon, Mar 24, 2003 at 06:50:50PM +0100 X-Spam: no; 0.00; andrzej:01 ostruszka:01 ostruszk:01 bug:01 fwiw:01 instytut:01 fizyki:01 uniwersytet:01 jagiellonski:01 cracow:01 ocaml:01 int:01 polymorphic:01 pgp:02 classes:03 X-Spam: no; 0.00; andrzej:01 ostruszka:01 ostruszk:01 bug:01 fwiw:01 instytut:01 fizyki:01 uniwersytet:01 jagiellonski:01 cracow:01 ocaml:01 int:01 polymorphic:01 pgp:02 classes:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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