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 VAA23659; Fri, 11 Jan 2002 21:08:01 +0100 (MET) 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 VAA23040 for ; Fri, 11 Jan 2002 21:08:00 +0100 (MET) Received: from mel-rto7.wanadoo.fr (smtp-out-7.wanadoo.fr [193.252.19.26]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g0BK80T01787 for ; Fri, 11 Jan 2002 21:08:00 +0100 (MET) Received: from mel-rta8.wanadoo.fr (193.252.19.79) by mel-rto7.wanadoo.fr; 11 Jan 2002 21:08:00 +0100 Received: from debian (80.8.74.134) by mel-rta8.wanadoo.fr; 11 Jan 2002 21:07:43 +0100 Received: from moi by debian with local (Exim 3.33 #1 (Debian)) id 16P7Y2-0001FE-00 for ; Fri, 11 Jan 2002 20:41:06 +0100 To: caml-list@inria.fr Subject: Re: [Caml-list] Probleme avec des enregistrements References: <3C3EE202.8C306B0B@inrialpes.fr> From: Remi VANICAT Date: 11 Jan 2002 20:41:06 +0100 In-Reply-To: <3C3EE202.8C306B0B@inrialpes.fr> Message-ID: <87pu4g7k19.dlv@wanadoo.fr> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Frederic Tronel writes: > Bonjour, > > J'utilise la version 3.04 de caml. > Je veux utiliser des enregistrements dont certains > des champs portent le meme nom. Cela ne fonctionne pas. > Ainsi: > > ./ocaml > Objective Caml version 3.04 > > # type t1={a:int ; b:int} ;; > type t1 = { a : int; b : int; } > # type t2 = {a:int} ;; > type t2 = { a : int; } > # {a=2} ;; > - : t2 = {a = 2} > # {a=1;b=2} ;; > The record field label b belongs to the type t1 > but is here mixed with labels of type t2 > # > > > Il n'y a pourtant aucune ambiguite sur le type de > {a=1;b=2} ! > Est-ce un bug connu ? ce n'est pas un bug. C'est dans les spécifications de ocaml. Mais c'est en effet connu : la déclaration d'un champ de même nom qu'un précédemment définit le cache . -- Rémi Vanicat vanicat@labri.u-bordeaux.fr http://dept-info.labri.u-bordeaux.fr/~vanicat ------------------- 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