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 SAA01345; Thu, 23 Aug 2001 18:14:04 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 SAA01259 for ; Thu, 23 Aug 2001 18:14:03 +0200 (MET DST) Received: from postoffice.mail.cornell.edu (postoffice.mail.cornell.edu [132.236.56.7]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f7NGE2X02167 for ; Thu, 23 Aug 2001 18:14:02 +0200 (MET DST) Received: from milhouse.cs.cornell.edu.cs.cornell.edu (dhcp99-208.cs.cornell.edu [128.84.99.208]) by postoffice.mail.cornell.edu (8.9.3/8.9.3) with ESMTP id MAA16771 for ; Thu, 23 Aug 2001 12:14:00 -0400 (EDT) To: caml-list@inria.fr Subject: [Caml-list] Duplicate methods - bug or feature? From: Paul Stodghill Date: 23 Aug 2001 12:14:11 -0400 Message-ID: User-Agent: Gnus/5.090003 (Oort Gnus v0.03) XEmacs/21.4 (Academic Rigor) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Is it a bug or feature that a class can contain two methods with the same name? Thanks. milhouse$ uname -a CYGWIN_NT-5.0 MILHOUSE 1.3.2(0.39/3/2) 2001-05-20 23:28 i686 unknown milhouse$ ocamlc -v The Objective Caml compiler, version 3.02 Standard library directory: /usr/local/lib/ocaml milhouse$ milhouse$ milhouse$ cat double_method.ml class a = object method m = "a.m1" method m = "a.m2" end ;; let _ = let x = new a in Printf.printf "x=%s\n" x#m; () ;; milhouse$ milhouse$ milhouse$ ocamlc -o double_method.exe double_method.ml milhouse$ ./double_method.exe x=a.m2 milhouse$ ------------------- 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