From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA13006 for caml-redistribution; Thu, 18 Nov 1999 20:21:34 +0100 (MET) 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 UAA11419 for ; Tue, 16 Nov 1999 20:16:29 +0100 (MET) Received: from ruby (kyle10.zip.com.au [61.8.17.138]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id UAA03558 for ; Tue, 16 Nov 1999 20:16:24 +0100 (MET) Received: from maxtal.com.au (IDENT:root@localhost [127.0.0.1]) by ruby (8.9.3/8.9.3) with ESMTP id KAA20408 for ; Wed, 17 Nov 1999 10:13:50 +1100 Sender: weis Message-ID: <3831E52D.55C5F68B@maxtal.com.au> Date: Wed, 17 Nov 1999 10:13:49 +1100 From: skaller Organization: Maxtal X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.12 i586) X-Accept-Language: en MIME-Version: 1.0 To: caml-list@inria.fr Subject: Re: What is this? References: <3830BAC4.BBA190F7@maxtal.com.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I wrote: > > Can anyone see this error? [] > This expression has type int but is here used with type unit [] > method run_file filename : int = [] > Py_exec_module.exec_file (self:>interpreter_t) ^^^^^^^^^^^^^^^^^^^ I have found the error. While I updated the interface for the module correctly, (that is, the class type) I did not update the abstract interface containing the more abstract class type to which the 'self' is coerced in the indicated term: in the class type 'interpreter_t', method 'run_file' has return type 'unit'. Because the inference engine has not yet deduced the type of 'run_file' for class type 'py_interpreter', it uses the information from the coercion to assume it returns 'unit', then reports an error when later finding it actually returns an 'int'. -- John Skaller, mailto:skaller@maxtal.com.au 10/1 Toxteth Rd Glebe NSW 2037 Australia homepage: http://www.maxtal.com.au/~skaller voice: 61-2-9660-0850