-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
You're looking for a polymorphic method:
class a = object
method f : 'a. ([>] as 'a) -> unit = fun _ -> ()
end
Peng
On Friday 06 March 2009 10:57:43 am Samuel Mimram wrote:
> Hi,
>
> When I try to compile the following code:
>
> class a =
> object
Hi,
When I try to compile the following code:
class a =
object
method f (x:[>]) = ()
end
I get the following error:
Error: Some type variables are unbound in this type:
class a : object method f : [> ] -> unit end
The method f has type ([> ] as 'a) -> unit where 'a is unboun