From: Remi VANICAT <vanicat@labri.u-bordeaux.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Probleme avec des enregistrements
Date: 11 Jan 2002 20:41:06 +0100 [thread overview]
Message-ID: <87pu4g7k19.dlv@wanadoo.fr> (raw)
In-Reply-To: <3C3EE202.8C306B0B@inrialpes.fr>
Frederic Tronel <Frederic.Tronel@inrialpes.fr> 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:
>
> <cime:479> ./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
next prev parent reply other threads:[~2002-01-11 20:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-11 13:00 Frederic Tronel
2002-01-11 19:41 ` Remi VANICAT [this message]
2002-01-12 7:16 ` Bruno Pagano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pu4g7k19.dlv@wanadoo.fr \
--to=vanicat@labri.u-bordeaux.fr \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox