Yes, it works, thanks. :-) Actually I tried ((self#ant a0 : ant) :> _ mlist) before, the parens matter here On Thu, Jan 10, 2013 at 4:06 PM, Jeremie Dimino wrote: > On Thu, 10 Jan 2013 15:15:31 -0500 > bob zhang wrote: > > > Hi List, > > I have came across a corner case in ocaml typing here, > > The source code is pasted below(extracted from a large code base), it > > triggers the warning 18. > > My question, is there any elegant solution without introducing local > > types? > > You can use an explicit coercion: (self#ant a0 : ant :> _ mlist) > > Cheers, > Jeremie > -- Regards -- Bob