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 MAA03541; Sat, 28 Jun 2003 12:14:06 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA03390 for ; Sat, 28 Jun 2003 12:14:05 +0200 (MET DST) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h5SAE3j24450 for ; Sat, 28 Jun 2003 12:14:03 +0200 (MET DST) Received: from localhost (suiren.kurims.kyoto-u.ac.jp [130.54.16.25]) by kurims.kurims.kyoto-u.ac.jp (8.9.3p2/3.7W) with ESMTP id TAA25447; Sat, 28 Jun 2003 19:13:52 +0900 (JST) In-Reply-To: <76516923376.20030627173549@glenisys.hu> References: <76516923376.20030627173549@glenisys.hu> Subject: Re: [Caml-list] Oo.copy To: attila.babo@glenisys.hu Cc: caml-list@inria.fr X-Mailer: Mew version 1.94.2 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20030628191404L.garrigue@kurims.kyoto-u.ac.jp> Date: Sat, 28 Jun 2003 19:14:04 +0900 From: Jacques Garrigue X-Dispatcher: imput version 20000228(IM140) X-Spam: no; 0.00; jacques:01 caml-list:01 ocamlc:01 3.06:01 bug:01 compiler:01 ocaml:01 inherit:01 garrigue:01 compile:02 interpreter:03 object:03 anyway:05 cvs:05 dup:05 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > What's wrong with this code? When I try to compile it using ocamlc > 3.06 the compiler hangs on Win32 and on Debian Linux as well. The > ocaml interpreter does the same. > > It works when I changed Oo.copy self to {<>} or simply self. > > class virtual duplicatable = > object (_ : 'a) > method virtual dup : 'a > end > > class test = > object (self) > inherit duplicatable > method dup = Oo.copy self > end Looks like a bug. But the CVS version chomps it happily, so this bug is already fixed for the next release. Anyway, it makes more sense to use {< >} to get a copy of self (the meaning is just the same as Oo.copy self). Jacques Garrigue ------------------- 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