From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 9FAB1BB81 for ; Fri, 9 Dec 2005 00:51:59 +0100 (CET) Received: from comtv.ru (mail.comtv.ru [217.10.32.19]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id jB8NpwhQ010085 for ; Fri, 9 Dec 2005 00:51:59 +0100 X-UCL: actv Received: from av1474.oops ([10.0.66.9] verified) by comtv.ru (CommuniGate Pro SMTP 4.1.8) with ESMTP id 109876004; Fri, 09 Dec 2005 02:51:56 +0300 Date: Fri, 9 Dec 2005 02:51:58 +0300 (MSK) From: malc X-X-Sender: malc@home.oyster.ru To: Jacques Garrigue Cc: skaller@users.sourceforge.net, caml-list@yquem.inria.fr Subject: Re: [Caml-list] partial application warning unreliable? In-Reply-To: <20051208.121012.49167263.garrigue@math.nagoya-u.ac.jp> Message-ID: References: <1134009551.10435.24.camel@rosella> <20051208.121012.49167263.garrigue@math.nagoya-u.ac.jp> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Miltered: at concorde with ID 4398C71E.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; malc:01 malc:01 pulsesoft:01 caml-list:01 semicolon:01 endline:01 ocaml:01 -warn-error:01 pulsesoft:01 wrote:01 partial:01 int:01 int:01 jacques:01 newline:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.3 On Thu, 8 Dec 2005, Jacques Garrigue wrote: > > # class cc = object (self) > method f x y = x + y > method g () = self#f 1; > end;; > class cc : > object method f : int -> int -> int method g : unit -> int -> int end > > No warning, for the reason stated above: the semicolon does nothing. Here's a strange test case, i was bitten by it recently in a real code: let y o = o#moo; 1 let x (o:( unit>)) = y o let _ = print_int (x (object method moo s = print_endline s end)); print_newline () # ocaml -warn-error A mox.ml 1 In my case method moo was actually a method that locked a mutex, the implications were quite severe. -- mailto:malc@pulsesoft.com