From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id C8A96BB9C for ; Tue, 20 Sep 2005 06:24:13 +0200 (CEST) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j8K4OBAF008927 for ; Tue, 20 Sep 2005 06:24:13 +0200 Received: from localhost (suiren [130.54.16.25]) by kurims.kurims.kyoto-u.ac.jp (8.13.1/8.13.1) with ESMTP id j8K4O79P006389; Tue, 20 Sep 2005 13:24:07 +0900 (JST) Date: Tue, 20 Sep 2005 13:24:05 +0900 (JST) Message-Id: <20050920.132405.25911109.garrigue@math.nagoya-u.ac.jp> To: micha-1@fantasymail.de Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] ocamlc throws exception From: Jacques Garrigue In-Reply-To: <20050920.101006.96686870.garrigue@math.nagoya-u.ac.jp> References: <200509191407.57650.micha-1@fantasymail.de> <20050920.101006.96686870.garrigue@math.nagoya-u.ac.jp> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 432F8EEB.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocamlc:01 ctype:01 unify:01 stack:01 backtrace:01 bug:01 bug:01 cvs:01 ctype:01 desc:01 flatten:01 iter:01 fvar:01 fabsent:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=DNS_FROM_RFC_ABUSE autolearn=disabled version=3.0.3 From: Jacques Garrigue > From: Michael Wohlwend > > that code : > [..] > > causes this exception: > > Fatal error: exception Ctype.Unify(_, 0) > > (Program not linked with -g, cannot print stack backtrace) > > This should be a bug report :-) > Indeed, the problem seems to be still there on the 3.08 branch after > 3.08.4. > On the other, this bug does not appear on the 3.09 branch. The last sentence is wrong: this bug is common to all versions. The fix is simple enough, and is already in CVS. You just have to replace the definition of hide_private_methods in typing/ctype.ml by let hide_private_methods ty = match (repr ty).desc with Tobject (fi, nm) -> nm := None; let (fl, _) = flatten_fields fi in List.iter (function (_, k, _) -> match field_kind_repr k with Fvar r -> set_kind r Fabsent | _ -> ()) fl | _ -> assert false Jacques Garrigue