Hi, the following seems to do the trick  (?) :

Le 28 mars 10 à 18:38, Dario Teixeira a écrit :

let rec step1 ?story () = match story with
        | Some s -> step2 s#title
        | None   -> step2 "title1"


and step2 title =
        let story =
                object
                        method title = title
                        method count = 0
                end
        in step3 ~story


and step3 ~story = match story#count with
        | 0 ->

-               step1 ~story ()
+               step1 ~story:(story :> <title : string>) ()
        | 1 ->
                let story =
                        object
                                method title = "title2"
                        end
                in step1 ~story ()
        | _ ->
                true

Cheers,
--
Vincent Aravantinos - PhD Student - Laboratory of Informatics of Grenoble
http://membres-lig.imag.fr/aravantinos/

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to