From: Jerome Vouillon <Jerome.Vouillon@inria.fr>
To: Pierre Boulet <Pierre.Boulet@lifl.fr>, caml-list@inria.fr
Subject: Re: strange behavior of the object type-checker
Date: Thu, 9 Sep 1999 21:43:13 +0200 [thread overview]
Message-ID: <19990909214313.55795@pauillac.inria.fr> (raw)
In-Reply-To: <vtuvh9khwms.fsf@gala.lifl.fr>; from Pierre Boulet on Thu, Sep 09, 1999 at 06:34:19PM +0200
On Thu, Sep 09, 1999 at 06:34:19PM +0200, Pierre Boulet wrote:
> dear ocamllers,
>
> I have finally decided to give a try to the object subsystem of ocaml
> and I have stumbled on something very strange (for me, at least).
>
> In the code I present below, after some parametric class creation, I
> try to execute some method of an object. Three *successive* tries give
> three *different* results: two different typing error messages and
> finally success.
This is due to a type checker bug. Here is a patch (the bug should
also soon be corrected in cvs).
-- Jérôme
Index: typing/ctype.ml
===================================================================
RCS file: /net/pauillac/caml/repository/csl/typing/ctype.ml,v
retrieving revision 1.65
diff -u -u -r1.65 ctype.ml
--- ctype.ml 1999/02/24 15:21:49 1.65
+++ ctype.ml 1999/09/09 19:35:33
@@ -1068,7 +1068,8 @@
let t1' = expand_head env t1 in
let t2' = expand_head env t2 in
(* Expansion may have changed the representative of the types... *)
- let t1' = repr t1' and t2' = repr t2' in
+ let t1' = expand_head env t1' in
+ let t2' = expand_head env t2' in
if t1' == t2' then () else
let t1 = repr t1 and t2 = repr t2 in
next prev parent reply other threads:[~1999-09-10 14:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-09-09 16:34 Pierre Boulet
1999-09-09 19:43 ` Jerome Vouillon [this message]
1999-09-28 18:56 ` Can someone explain? skaller
1999-10-04 8:23 ` Pierre Weis
1999-10-04 22:57 ` skaller
1999-10-05 9:43 ` Jerome Vouillon
1999-10-05 19:35 ` Gerd Stolpmann
1999-10-06 9:42 ` skaller
1999-10-08 0:17 ` Problem of coercion in recursive class definitions Peter Schrammel
1999-10-05 21:42 ` Can someone explain? Lyn A Headley
1999-10-06 10:17 ` skaller
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=19990909214313.55795@pauillac.inria.fr \
--to=jerome.vouillon@inria.fr \
--cc=Pierre.Boulet@lifl.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