Version française
Home     About     Download     Resources     Contact us    
Browse thread
problem with optional arguments
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Gerd Stolpmann <gerd@g...>
Subject: Re: problem with optional arguments
On Wed, 20 Sep 2000, Remi VANICAT wrote:
>then there is another problem :
>
>class test2 ?(a=0) () =
>   object
>     val a = abs a
>     method a = a
>     method strange x = new test2 ~a: x ()
>   end
>
>don't work, but i don't see realy why (the message of error is :
>
>The expression "new test2" has type ?a:int -> unit -> test2
>but is used with type 'a -> unit -> 'b
>)

See bug # 151,
http://caml.inria.fr/bin/caml-bugs/fixed?id=151;page=8;user=guest

-- 
----------------------------------------------------------------------------
Gerd Stolpmann      Telefon: +49 6151 997705 (privat)
Viktoriastr. 100             
64293 Darmstadt     EMail:   gerd@gerd-stolpmann.de
Germany                     
----------------------------------------------------------------------------