Re: What is this?

From: skaller (
Date: Wed Nov 17 1999 - 00:13:49 MET

Date: Wed, 17 Nov 1999 10:13:49 +1100
From: skaller <>
Subject: Re: What is this?

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
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
the information from the coercion to assume it returns 'unit', then
an error when later finding it actually returns an 'int'.

John Skaller,
10/1 Toxteth Rd Glebe NSW 2037 Australia
voice: 61-2-9660-0850

This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:28 MET